working companion prototype

This commit is contained in:
2025-11-24 23:32:36 +01:00
parent e7978024d7
commit e2bea9a126
175 changed files with 23227 additions and 3519 deletions

View File

@@ -2,8 +2,10 @@ import { app, BrowserWindow } from 'electron';
import * as path from 'path';
import { setupIpcHandlers } from './ipc-handlers';
function createWindow() {
const mainWindow = new BrowserWindow({
let mainWindow: BrowserWindow | null = null;
function createWindow(): BrowserWindow {
mainWindow = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
@@ -17,14 +19,15 @@ function createWindow() {
mainWindow.loadURL('http://localhost:5173');
mainWindow.webContents.openDevTools();
} else {
// Path from dist/main to dist/renderer
mainWindow.loadFile(path.join(__dirname, '../renderer/index.html'));
}
setupIpcHandlers(mainWindow);
return mainWindow;
}
app.whenReady().then(() => {
app.whenReady().then(async () => {
createWindow();
app.on('activate', () => {