diff --git a/src/main/index.ts b/src/main/index.ts index 8d43201..c745337 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -4,6 +4,7 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils' import icon from '../../resources/icon.png?asset' let mainWindow: BrowserWindow; +let splash: BrowserWindow; let tray: Tray; function createWindow(): void { @@ -20,8 +21,21 @@ function createWindow(): void { } }) + // TODO Create splash screen + splash = new BrowserWindow({ + width: 500, + height: 300, + transparent: true, + frame: false, + alwaysOnTop: true + }); + splash.loadFile('src/renderer/splash.html'); + splash.center(); + splash.show(); + // TODO show window according to the app settings mainWindow.on('ready-to-show', () => { + splash.close(); mainWindow.show() }) diff --git a/src/renderer/splash.html b/src/renderer/splash.html new file mode 100644 index 0000000..130680c --- /dev/null +++ b/src/renderer/splash.html @@ -0,0 +1,70 @@ + + +
+ +