Adapt the web version to Electron

This commit is contained in:
2025-08-24 23:15:20 +03:00
Unverified
parent 3bbfafa9e5
commit 8348547baa
12 changed files with 286 additions and 175 deletions
+12 -1
View File
@@ -1,10 +1,21 @@
import { app, BrowserWindow } from 'electron';
import path from "node:path";
app.whenReady().then(() => {
const win = new BrowserWindow({
title: 'Main window',
minWidth: 650,
minHeight: 420
minHeight: 420,
webPreferences: {
preload: path.join(import.meta.dirname, "preload.mjs")
},
titleBarStyle: "hidden",
...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {}),
trafficLightPosition: {
x: 16 - 4,
y: 16 - 4
},
titleBarOverlay: process.platform !== "darwin"
})
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`