mirror of
https://codeberg.org/Kankys/doxa.git
synced 2026-11-11 14:44:36 +01:00
32 lines
801 B
JavaScript
32 lines
801 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
const path = require('path');
|
|
|
|
function createWindow() {
|
|
const win = new BrowserWindow({
|
|
width: 1200,
|
|
height: 800,
|
|
icon: path.join(__dirname, 'brain-solid-full.svg'), // Pokud máš ikonu, jinak můžeš řádek smazat
|
|
webPreferences: {
|
|
nodeIntegration: false,
|
|
contextIsolation: true
|
|
}
|
|
});
|
|
|
|
// Načte tvůj hlavní HTML soubor webu
|
|
win.loadFile('index.html');
|
|
|
|
// Skryje horní menu (File, Edit atd.) pro čistý, minimalistický vzhled
|
|
win.setMenu(null);
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow();
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
});
|
|
});
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') app.quit();
|
|
}); |