diff --git a/src/electron/electron/main/services/WindowService.ts b/src/electron/electron/main/services/WindowService.ts index eef9d71e..72b011c1 100644 --- a/src/electron/electron/main/services/WindowService.ts +++ b/src/electron/electron/main/services/WindowService.ts @@ -14,6 +14,7 @@ export class WindowService { private readonly appUpdaterService: AppUpdaterService; private tray: Tray; private experienceSamplingWindow: BrowserWindow; + private aboutWindow: BrowserWindow; constructor(appUpdaterService: AppUpdaterService) { this.appUpdaterService = appUpdaterService; @@ -96,10 +97,13 @@ export class WindowService { } public async createAboutWindow() { + this.aboutWindow?.close(); + this.aboutWindow = null; + const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const preload = join(__dirname, '../preload/index.mjs'); - const aboutWindow = new BrowserWindow({ + this.aboutWindow = new BrowserWindow({ width: 800, height: 600, show: false, @@ -114,13 +118,19 @@ export class WindowService { }); if (process.env.VITE_DEV_SERVER_URL) { - await aboutWindow.loadURL(process.env.VITE_DEV_SERVER_URL + '#about'); + await this.aboutWindow.loadURL(process.env.VITE_DEV_SERVER_URL + '#about'); } else { - await aboutWindow.loadFile(path.join(process.env.DIST, 'index.html'), { + await this.aboutWindow.loadFile(path.join(process.env.DIST, 'index.html'), { hash: 'about' }); } - aboutWindow.show(); + + this.aboutWindow.webContents.setWindowOpenHandler((details) => { + shell.openExternal(details.url); + return { action: 'deny' }; + }); + + this.aboutWindow.show(); } public updateTray( diff --git a/src/electron/src/assets/logo_hasel.svg b/src/electron/src/assets/logo_hasel.svg new file mode 100644 index 00000000..e1d196f1 --- /dev/null +++ b/src/electron/src/assets/logo_hasel.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/electron/src/assets/logo_uzh.svg b/src/electron/src/assets/logo_uzh.svg new file mode 100644 index 00000000..2b887dde --- /dev/null +++ b/src/electron/src/assets/logo_uzh.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/electron/src/views/AboutView.vue b/src/electron/src/views/AboutView.vue index 70e8a9ef..c2e7d213 100644 --- a/src/electron/src/views/AboutView.vue +++ b/src/electron/src/views/AboutView.vue @@ -10,18 +10,17 @@ onMounted(async () => { }); @@ -57,4 +91,9 @@ onMounted(async () => { .primary-blue { color: @primary-color; } +h1, +h2, +h3 { + @apply !font-medium; +}