Desktop app #5

Merged
benoit merged 30 commits from desktop-app into main 2026-07-03 17:34:52 +02:00
Showing only changes of commit 8a7e98ae47 - Show all commits
+12 -12
View File
@@ -272,17 +272,19 @@ async function pingServer() {
});
}
// ========== IPC Handlers ==========
// ========== App Lifecycle ==========
ipcMain.handle('server:start', async () => {
app.whenReady().then(async () => {
// Setup IPC Handlers (doit être après app.whenReady)
ipcMain.handle('server:start', async () => {
return await startServer();
});
});
ipcMain.handle('server:stop', async () => {
ipcMain.handle('server:stop', async () => {
return await stopServer();
});
});
ipcMain.handle('server:status', async () => {
ipcMain.handle('server:status', async () => {
if (!serverStarted) {
return { running: false };
}
@@ -293,15 +295,13 @@ ipcMain.handle('server:status', async () => {
health: health.data,
url: SERVER_URL
};
});
});
ipcMain.handle('server:ping', async () => {
ipcMain.handle('server:ping', async () => {
return await pingServer();
});
});
// ========== App Lifecycle ==========
app.whenReady().then(async () => {
// Créer fenêtre
createWindow();
createTray();