aboutsummaryrefslogtreecommitdiffstats
path: root/dist/main/index.sync-conflict-20260228-074140-M6474AW.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/main/index.sync-conflict-20260228-074140-M6474AW.js')
-rw-r--r--dist/main/index.sync-conflict-20260228-074140-M6474AW.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/dist/main/index.sync-conflict-20260228-074140-M6474AW.js b/dist/main/index.sync-conflict-20260228-074140-M6474AW.js
new file mode 100644
index 0000000..a10a371
--- /dev/null
+++ b/dist/main/index.sync-conflict-20260228-074140-M6474AW.js
@@ -0,0 +1,54 @@
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const electron_1 = require("electron");
7const node_path_1 = __importDefault(require("node:path"));
8const db_1 = require("./db");
9const handlers_1 = require("./ipc/handlers");
10const isDev = !electron_1.app.isPackaged;
11let mainWindow = null;
12function createWindow() {
13 mainWindow = new electron_1.BrowserWindow({
14 width: 1400,
15 height: 900,
16 minWidth: 1000,
17 minHeight: 600,
18 show: false,
19 titleBarStyle: "hiddenInset",
20 webPreferences: {
21 contextIsolation: true,
22 nodeIntegration: false,
23 preload: node_path_1.default.join(__dirname, "preload.js"),
24 },
25 });
26 (0, handlers_1.registerIpcHandlers)(mainWindow);
27 if (isDev) {
28 const url = process.env.VITE_DEV_SERVER_URL ?? "http://localhost:5173";
29 mainWindow.loadURL(url).finally(() => {
30 mainWindow.show();
31 mainWindow.webContents.openDevTools({ mode: "detach" });
32 });
33 }
34 else {
35 const indexHtml = node_path_1.default.join(electron_1.app.getAppPath(), "renderer", "dist", "index.html");
36 mainWindow.loadFile(indexHtml).finally(() => mainWindow.show());
37 }
38}
39electron_1.app.whenReady().then(() => {
40 // Initialize database
41 (0, db_1.getDb)();
42 createWindow();
43 electron_1.app.on("activate", () => {
44 if (electron_1.BrowserWindow.getAllWindows().length === 0) {
45 createWindow();
46 }
47 });
48});
49electron_1.app.on("window-all-closed", () => {
50 (0, db_1.closeDb)();
51 if (process.platform !== "darwin") {
52 electron_1.app.quit();
53 }
54});