diff --git a/electron/mainWindow.ts b/electron/mainWindow.ts index d361521..0b71d09 100644 --- a/electron/mainWindow.ts +++ b/electron/mainWindow.ts @@ -38,25 +38,25 @@ class Main { this.configDev = new ConfigureDev(this.settingsDev); app.on("ready", async () => { - // let loading = new BrowserWindow({ - // show: false, - // frame: false, - // width: 300, - // height: 300, - // transparent: true, - // }); - - this.window = await this.createWindow(); - this.onEvent.emit("window-created"); - - // loading.once("show", async () => { - // this.window = await this.createWindow(); - // this.onEvent.emit("window-created"); - // loading.hide(); - // loading.close(); - // }); - // loading.loadURL(path.join(__dirname, "www", "loading.html")); - // loading.show(); + let loading = new BrowserWindow({ + show: false, + frame: false, + width: 300, + height: 300, + transparent: true, + }); + + // this.window = await this.createWindow(); + // this.onEvent.emit("window-created"); + + loading.once("show", async () => { + this.window = await this.createWindow(); + this.onEvent.emit("window-created"); + loading.hide(); + loading.close(); + }); + loading.loadURL(path.join(__dirname, "www", "loading.html")); + loading.show(); }); app.on("window-all-closed", this.onWindowAllClosed); @@ -81,7 +81,7 @@ class Main { try { await window.loadURL("http://localhost:5173/"); } catch (error) { - console.log(`ERROR: window.loadURL("http://localhost:3000/");`); + console.log(`ERROR: window.loadURL("http://localhost:5173/");`); console.log(error); } } else if (this.configDev.isElectronServe()) { diff --git a/svelte/static/loading.html b/svelte/static/loading.html new file mode 100644 index 0000000..561438d --- /dev/null +++ b/svelte/static/loading.html @@ -0,0 +1,18 @@ + + + + + + + + + Loading + + +
+
+ +
+
+ + \ No newline at end of file diff --git a/svelte/static/loading.png b/svelte/static/loading.png new file mode 100644 index 0000000..7f2b317 Binary files /dev/null and b/svelte/static/loading.png differ