diff --git a/index.html b/index.html index b52b995..906b502 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ - SimpleConnect + SimpleConnect diff --git a/main.js b/main.js index efffbae..e766551 100644 --- a/main.js +++ b/main.js @@ -67,7 +67,7 @@ function createWindow() { webSecurity: false }, icon: path.join(__dirname, 'icon.png'), - title: 'SimpleConnect', + title: `SimpleConnect v${app.getVersion()}`, autoHideMenuBar: true // Cache la barre de menu par défaut }); @@ -411,6 +411,11 @@ ipcMain.handle('get-config', () => { return config; }); +// Obtenir la version de l'application +ipcMain.handle('get-app-version', () => { + return app.getVersion(); +}); + // Obtenir le statut SignalR ipcMain.handle('get-signalr-status', () => { return signalRStatus; @@ -532,7 +537,7 @@ ipcMain.handle('login-agent', async (event, credentials) => { // Mettre à jour le titre de la fenêtre if (mainWindow) { mainWindow.setTitle( - `SimpleConnect - Agent: ${currentAgent.accessCode} (${result.firstName} ${result.lastName}) - Tel: ${credentials.terminal}` + `SimpleConnect v${app.getVersion()} - Agent: ${currentAgent.accessCode} (${result.firstName} ${result.lastName}) - Tel: ${credentials.terminal}` ); } @@ -631,7 +636,7 @@ ipcMain.handle('logout', async () => { // Réinitialiser le titre de la fenêtre if (mainWindow) { - mainWindow.setTitle('SimpleConnect - Gestion Centralisée des Plannings'); + mainWindow.setTitle(`SimpleConnect v${app.getVersion()}`); } return { success: true }; diff --git a/renderer.js b/renderer.js index 2015ae2..e9023df 100644 --- a/renderer.js +++ b/renderer.js @@ -18,15 +18,22 @@ let notesStartX = 0; // === GESTION DE LA CONNEXION === document.addEventListener('DOMContentLoaded', async () => { + // Afficher la version de l'application + const appVersion = await ipcRenderer.invoke('get-app-version'); + const versionElement = document.getElementById('appVersion'); + if (versionElement && appVersion) { + versionElement.textContent = `v${appVersion}`; + } + // Initialiser l'indicateur SignalR - + // Écouter les changements de statut SignalR ipcRenderer.on('signalr-status', (event, status) => { updateSignalRIndicator(status); // Recharger les terminaux à chaque changement de statut loadTerminals(); }); - + // Obtenir le statut initial SignalR const initialStatus = await ipcRenderer.invoke('get-signalr-status'); updateSignalRIndicator(initialStatus); diff --git a/styles-modern.css b/styles-modern.css index c358587..3a8ec5d 100644 --- a/styles-modern.css +++ b/styles-modern.css @@ -322,6 +322,14 @@ body { margin: 0; } +.app-version { + font-size: 12px; + color: #999; + font-weight: 400; + margin-left: 8px; + opacity: 0.8; +} + .agent-name { font-size: 14px; color: #666;