removing backend, making electron app, adding tuner

This commit is contained in:
itsamejms
2026-03-05 21:28:02 +00:00
parent 8a0f9f51fa
commit bb71abe827
39 changed files with 7829 additions and 3680 deletions
+37
View File
@@ -0,0 +1,37 @@
import { app, BrowserWindow } from 'electron';
import path from 'path';
import { fileURLToPath } from 'url';
const isDev = process.env.NODE_ENV !== 'production';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function createWindow() {
const win = new BrowserWindow({
width: 1024,
height: 768,
webPreferences: {
preload: path.join(__dirname, 'preload.cjs'),
contextIsolation: true,
nodeIntegration: false
}
});
if (isDev) {
const devUrl = process.env.ELECTRON_START_URL || 'http://localhost:5173';
win.loadURL(devUrl);
win.webContents.openDevTools();
} else {
win.loadFile(path.join(__dirname, '..', 'dist', 'index.html'));
}
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow();
});
+5
View File
@@ -0,0 +1,5 @@
const { contextBridge } = require('electron');
contextBridge.exposeInMainWorld('electronAPI', {
// Add IPC helpers here if needed later
});