Spaces:
Configuration error
Configuration error
update (#10)
Browse files- update (33dd01b8322ad941e9b12c60523b2e8c1f9cab3e)
Co-authored-by: Morpheus <[email protected]>
- pinokio.js +25 -22
pinokio.js
CHANGED
@@ -1,57 +1,61 @@
|
|
1 |
module.exports = {
|
|
|
2 |
title: "LEDITS++",
|
3 |
icon: "magician.png",
|
4 |
description: "Limitless Image Editing using Text-to-Image Models",
|
5 |
-
menu: async (kernel) => {
|
6 |
-
let installed =
|
7 |
-
let
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
return [{
|
10 |
default: true,
|
11 |
icon: "fa-solid fa-plug",
|
12 |
text: "Installing",
|
13 |
href: "install.json",
|
14 |
-
params: { fullscreen: true }
|
15 |
}]
|
16 |
} else if (installed) {
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
if (session && session.url) {
|
21 |
return [{
|
22 |
-
icon: "fa-solid fa-spin fa-circle-notch",
|
23 |
-
text: "Running"
|
24 |
-
}, {
|
25 |
default: true,
|
26 |
icon: "fa-solid fa-rocket",
|
27 |
text: "Open Web UI",
|
28 |
-
href:
|
29 |
-
target: "_blank"
|
30 |
}, {
|
31 |
icon: 'fa-solid fa-terminal',
|
32 |
text: "Terminal",
|
33 |
href: "start.json",
|
34 |
-
params: { fullscreen: true }
|
35 |
}]
|
36 |
} else {
|
37 |
return [{
|
38 |
-
icon: "fa-solid fa-spin fa-circle-notch",
|
39 |
-
text: "Running"
|
40 |
-
}, {
|
41 |
default: true,
|
42 |
icon: 'fa-solid fa-terminal',
|
43 |
text: "Terminal",
|
44 |
href: "start.json",
|
45 |
-
params: { fullscreen: true }
|
46 |
}]
|
47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
} else {
|
49 |
return [{
|
50 |
default: true,
|
51 |
icon: "fa-solid fa-power-off",
|
52 |
-
text: "
|
53 |
href: "start.json",
|
54 |
-
|
|
|
|
|
|
|
55 |
}, {
|
56 |
icon: "fa-regular fa-circle-xmark",
|
57 |
text: "Reset",
|
@@ -64,7 +68,6 @@ module.exports = {
|
|
64 |
icon: "fa-solid fa-plug",
|
65 |
text: "Install",
|
66 |
href: "install.json",
|
67 |
-
params: { run: true, fullscreen: true }
|
68 |
}]
|
69 |
}
|
70 |
}
|
|
|
1 |
module.exports = {
|
2 |
+
version: "3.0",
|
3 |
title: "LEDITS++",
|
4 |
icon: "magician.png",
|
5 |
description: "Limitless Image Editing using Text-to-Image Models",
|
6 |
+
menu: async (kernel, info) => {
|
7 |
+
let installed = info.exists("env")
|
8 |
+
let running = {
|
9 |
+
install: info.running("install.json"),
|
10 |
+
start: info.running("start.json"),
|
11 |
+
reset: info.running("reset.json")
|
12 |
+
}
|
13 |
+
if (running.install) {
|
14 |
return [{
|
15 |
default: true,
|
16 |
icon: "fa-solid fa-plug",
|
17 |
text: "Installing",
|
18 |
href: "install.json",
|
|
|
19 |
}]
|
20 |
} else if (installed) {
|
21 |
+
if (running.start) {
|
22 |
+
let local = info.local("start.json")
|
23 |
+
if (local && local.url) {
|
|
|
24 |
return [{
|
|
|
|
|
|
|
25 |
default: true,
|
26 |
icon: "fa-solid fa-rocket",
|
27 |
text: "Open Web UI",
|
28 |
+
href: local.url,
|
|
|
29 |
}, {
|
30 |
icon: 'fa-solid fa-terminal',
|
31 |
text: "Terminal",
|
32 |
href: "start.json",
|
|
|
33 |
}]
|
34 |
} else {
|
35 |
return [{
|
|
|
|
|
|
|
36 |
default: true,
|
37 |
icon: 'fa-solid fa-terminal',
|
38 |
text: "Terminal",
|
39 |
href: "start.json",
|
|
|
40 |
}]
|
41 |
}
|
42 |
+
} else if (running.reset) {
|
43 |
+
return [{
|
44 |
+
default: true,
|
45 |
+
icon: 'fa-solid fa-terminal',
|
46 |
+
text: "Resetting",
|
47 |
+
href: "reset.json",
|
48 |
+
}]
|
49 |
} else {
|
50 |
return [{
|
51 |
default: true,
|
52 |
icon: "fa-solid fa-power-off",
|
53 |
+
text: "Start",
|
54 |
href: "start.json",
|
55 |
+
}, {
|
56 |
+
icon: "fa-solid fa-plug",
|
57 |
+
text: "Install",
|
58 |
+
href: "install.json",
|
59 |
}, {
|
60 |
icon: "fa-regular fa-circle-xmark",
|
61 |
text: "Reset",
|
|
|
68 |
icon: "fa-solid fa-plug",
|
69 |
text: "Install",
|
70 |
href: "install.json",
|
|
|
71 |
}]
|
72 |
}
|
73 |
}
|