37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
|
// Copyright (c) 2023, Sam Hadow
|
||
|
//
|
||
|
//main.js
|
||
|
//
|
||
|
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
|
||
|
const { app, BrowserWindow } = require('electron')
|
||
|
|
||
|
|
||
|
let mainWindow = null;
|
||
|
|
||
|
app.whenReady().then(() => {
|
||
|
// We cannot require the screen module until the app is ready.
|
||
|
const { screen } = require('electron')
|
||
|
|
||
|
// Create a window that fills the screen's available work area.
|
||
|
const primaryDisplay = screen.getPrimaryDisplay()
|
||
|
const { width, height } = primaryDisplay.workAreaSize
|
||
|
|
||
|
|
||
|
mainWindow = new BrowserWindow({
|
||
|
width,
|
||
|
height,
|
||
|
autoHideMenuBar: true,
|
||
|
resizable: true,
|
||
|
//icon: 'logo.png',
|
||
|
frame: true
|
||
|
})
|
||
|
|
||
|
|
||
|
mainWindow.loadFile('index.html')
|
||
|
})
|