Spaces:
Configuration error
Configuration error
| module.exports = { | |
| version: "3.0", | |
| title: "LEDITS++", | |
| icon: "magician.png", | |
| description: "Limitless Image Editing using Text-to-Image Models", | |
| menu: async (kernel, info) => { | |
| let installed = info.exists("env") | |
| let running = { | |
| install: info.running("install.json"), | |
| start: info.running("start.json"), | |
| reset: info.running("reset.json") | |
| } | |
| if (running.install) { | |
| return [{ | |
| default: true, | |
| icon: "fa-solid fa-plug", | |
| text: "Installing", | |
| href: "install.json", | |
| }] | |
| } else if (installed) { | |
| if (running.start) { | |
| let local = info.local("start.json") | |
| if (local && local.url) { | |
| return [{ | |
| default: true, | |
| icon: "fa-solid fa-rocket", | |
| text: "Open Web UI", | |
| href: local.url, | |
| }, { | |
| icon: 'fa-solid fa-terminal', | |
| text: "Terminal", | |
| href: "start.json", | |
| }] | |
| } else { | |
| return [{ | |
| default: true, | |
| icon: 'fa-solid fa-terminal', | |
| text: "Terminal", | |
| href: "start.json", | |
| }] | |
| } | |
| } else if (running.reset) { | |
| return [{ | |
| default: true, | |
| icon: 'fa-solid fa-terminal', | |
| text: "Resetting", | |
| href: "reset.json", | |
| }] | |
| } else { | |
| return [{ | |
| default: true, | |
| icon: "fa-solid fa-power-off", | |
| text: "Start", | |
| href: "start.json", | |
| }, { | |
| icon: "fa-solid fa-plug", | |
| text: "Install", | |
| href: "install.json", | |
| }, { | |
| icon: "fa-regular fa-circle-xmark", | |
| text: "Reset", | |
| href: "reset.json", | |
| }] | |
| } | |
| } else { | |
| return [{ | |
| default: true, | |
| icon: "fa-solid fa-plug", | |
| text: "Install", | |
| href: "install.json", | |
| }] | |
| } | |
| } | |
| } | |