File size: 1,076 Bytes
78617b8
 
 
 
 
fd1ff15
78617b8
fd1ff15
 
78617b8
 
 
 
 
 
 
 
 
 
 
 
 
 
fd1ff15
78617b8
 
 
 
 
 
 
fd1ff15
78617b8
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
  title: "LEDITS++",
  icon: "magician.png",
  description: "Limitless Image Editing using Text-to-Image Models",
  menu: async (kernel) => {
    let installed = await kernel.exists(__dirname, "venv")
    if (installed) {
      let session = await kernel.require(__dirname, "session.json")
      let running = await kernel.running(__dirname, "start.json")
      if (running) {
        return [{
          icon: "fa-solid fa-spin fa-circle-notch",
          text: "Running"
        }, {
          icon: "fa-solid fa-rocket",
          text: "Open UI",
          href: (session && session.url ? session.url : "http://127.0.0.1:7860"),
          target: "_blank"
        }]
      } else {
        return [{
          icon: "fa-solid fa-power-off",
          text: "Launch",
          href: "start.json",
          params: { fullscreen: true, run: true }
        }]
      }
    } else {
      return [{
        icon: "fa-solid fa-plug",
        text: "Install",
        href: "install.json",
        params: { run: true, fullscreen: true }
      }]
    }
  }
}