소스 검색

fix: move the app to system tray when closed

master
kj1352 1 년 전
부모
커밋
7011cdd0c1
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. +7
    -4
      main.js

+ 7
- 4
main.js 파일 보기

@@ -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 = {}) {


불러오는 중...
취소
저장