main.js 383 B

12345678910111213141516
  1. const { app, BrowserWindow } = require('electron')
  2. function createWindow () {
  3. const win = new BrowserWindow({
  4. // remove the default titlebar
  5. titleBarStyle: 'hidden',
  6. // expose window controls in Windows/Linux
  7. ...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {})
  8. })
  9. win.loadFile('index.html')
  10. }
  11. app.whenReady().then(() => {
  12. createWindow()
  13. })