Skip to content

Commit 44a1564

Browse files
committed
open settings on start up
1 parent d4b49e2 commit 44a1564

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/overlayManager.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { app, BrowserWindow } from 'electron';
22
import type { DashboardLayout, DashboardWidget } from '@irdashies/types';
33
import path from 'node:path';
44
import { trackWindowMovement } from './trackWindowMovement';
5+
import { Notification } from 'electron';
56

67
// used for Hot Module Replacement
78
declare const MAIN_WINDOW_VITE_DEV_SERVER_URL: string;
@@ -44,6 +45,7 @@ export class OverlayManager {
4445
const window = this.createOverlayWindow(widget);
4546
trackWindowMovement(widget, window);
4647
});
48+
this.createSettingsWindow();
4749
}
4850

4951
public createOverlayWindow(widget: DashboardWidget): BrowserWindow {
@@ -149,6 +151,7 @@ export class OverlayManager {
149151
const browserWindow = new BrowserWindow({
150152
title: `iRacing Dashies - Settings`,
151153
frame: true,
154+
autoHideMenuBar: true,
152155
webPreferences: {
153156
preload: path.join(__dirname, 'preload.js'),
154157
},
@@ -167,6 +170,12 @@ export class OverlayManager {
167170
}
168171

169172
browserWindow.on('closed', () => {
173+
// Show notification about tray access
174+
new Notification({
175+
title: 'iRacing Dashies',
176+
body: 'Settings window is still accessible via the system tray icon'
177+
}).show();
178+
170179
this.currentSettingsWindow = undefined;
171180
});
172181

0 commit comments

Comments
 (0)