Ver a proveniência

fix: move the app to system tray when closed

master
kj1352 há 1 ano
ascendente
cometimento
7011cdd0c1
1 ficheiros alterados com 7 adições e 4 eliminações
  1. +7
    -4
      main.js

+ 7
- 4
main.js Ver ficheiro

@@ -40,20 +40,23 @@ app.on('ready', () => {
});

function createMainWindow() {
const userDataPath = path.join(app.getPath('userData'), 'Cache');
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
nodeIntegration: false,
contextIsolation: true,
nodeIntegration: false,
},
});

app.setPath('userData', userDataPath);
mainWindow.loadFile('index.html');

// Hide the window instead of quitting
mainWindow.on('close', (event) => {
event.preventDefault();
mainWindow.hide();
});
}

async function sendAPIRequest(data = {}) {


Carregando…
Cancelar
Guardar