Merge branch 'feature/affichage-version'
This commit is contained in:
@@ -1,5 +1,27 @@
|
|||||||
# Changelog - SimpleConnect Electron
|
# Changelog - SimpleConnect Electron
|
||||||
|
|
||||||
|
## [1.4.0] - 2025-10-21
|
||||||
|
|
||||||
|
### Ajouté
|
||||||
|
- **Affichage de la version dans l'interface** : La version de l'application s'affiche désormais clairement
|
||||||
|
- Version affichée sous le titre "SimpleConnect" sur la page de connexion (centrée, gris clair)
|
||||||
|
- Version affichée dans le header de la page principale à côté du logo
|
||||||
|
- Handler IPC `get-app-version` pour exposer la version du package.json
|
||||||
|
- Injection automatique de la version au chargement de l'application
|
||||||
|
|
||||||
|
### Modifié
|
||||||
|
- **Titre de la fenêtre avec version** : Le titre de la barre native affiche maintenant "SimpleConnect vX.X.X"
|
||||||
|
- Titre initial défini dans BrowserWindow avec la version
|
||||||
|
- Titre mis à jour dynamiquement lors de la connexion/déconnexion agent
|
||||||
|
- Listener `did-finish-load` pour forcer le titre après chargement du HTML
|
||||||
|
- Format : "SimpleConnect v1.4.0 - Agent: XXX - Tel: XXX" quand connecté
|
||||||
|
|
||||||
|
### Technique
|
||||||
|
- Nouveau style CSS `.app-version-login` pour l'affichage de la version sur la page de login
|
||||||
|
- Style CSS `.app-version` pour l'affichage dans le header principal
|
||||||
|
- Utilisation de `app.getVersion()` pour récupérer la version depuis package.json
|
||||||
|
- Résolution du conflit entre `<title>` HTML et titre de BrowserWindow
|
||||||
|
|
||||||
## [1.3.1] - 2025-10-17
|
## [1.3.1] - 2025-10-17
|
||||||
|
|
||||||
### Ajouté
|
### Ajouté
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<div id="loginPage" class="page active">
|
<div id="loginPage" class="page active">
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<h1>SimpleConnect</h1>
|
<h1>SimpleConnect</h1>
|
||||||
|
<div class="app-version-login" id="appVersionLogin"></div>
|
||||||
<div class="signalr-status">
|
<div class="signalr-status">
|
||||||
<span class="signalr-indicator" id="signalrIndicator"></span>
|
<span class="signalr-indicator" id="signalrIndicator"></span>
|
||||||
<span class="signalr-text" id="signalrText"
|
<span class="signalr-text" id="signalrText"
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
<!-- Header et onglets combinés -->
|
<!-- Header et onglets combinés -->
|
||||||
<header class="header-with-tabs">
|
<header class="header-with-tabs">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<h1>SimpleConnect</h1>
|
<h1>SimpleConnect <span id="appVersion" class="app-version"></span></h1>
|
||||||
<span id="agentName" class="agent-name"></span>
|
<span id="agentName" class="agent-name"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
16
main.js
16
main.js
@@ -67,7 +67,7 @@ function createWindow() {
|
|||||||
webSecurity: false
|
webSecurity: false
|
||||||
},
|
},
|
||||||
icon: path.join(__dirname, 'icon.png'),
|
icon: path.join(__dirname, 'icon.png'),
|
||||||
title: 'SimpleConnect',
|
title: `SimpleConnect v${app.getVersion()}`,
|
||||||
autoHideMenuBar: true // Cache la barre de menu par défaut
|
autoHideMenuBar: true // Cache la barre de menu par défaut
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,6 +77,11 @@ function createWindow() {
|
|||||||
// Charger l'interface HTML
|
// Charger l'interface HTML
|
||||||
mainWindow.loadFile('index.html');
|
mainWindow.loadFile('index.html');
|
||||||
|
|
||||||
|
// Forcer le titre après le chargement de la page (le <title> HTML l'écrase sinon)
|
||||||
|
mainWindow.webContents.on('did-finish-load', () => {
|
||||||
|
mainWindow.setTitle(`SimpleConnect v${app.getVersion()}`);
|
||||||
|
});
|
||||||
|
|
||||||
// Ouvrir les DevTools uniquement en mode développement
|
// Ouvrir les DevTools uniquement en mode développement
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
mainWindow.webContents.openDevTools();
|
mainWindow.webContents.openDevTools();
|
||||||
@@ -411,6 +416,11 @@ ipcMain.handle('get-config', () => {
|
|||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Obtenir la version de l'application
|
||||||
|
ipcMain.handle('get-app-version', () => {
|
||||||
|
return app.getVersion();
|
||||||
|
});
|
||||||
|
|
||||||
// Obtenir le statut SignalR
|
// Obtenir le statut SignalR
|
||||||
ipcMain.handle('get-signalr-status', () => {
|
ipcMain.handle('get-signalr-status', () => {
|
||||||
return signalRStatus;
|
return signalRStatus;
|
||||||
@@ -532,7 +542,7 @@ ipcMain.handle('login-agent', async (event, credentials) => {
|
|||||||
// Mettre à jour le titre de la fenêtre
|
// Mettre à jour le titre de la fenêtre
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setTitle(
|
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 +641,7 @@ ipcMain.handle('logout', async () => {
|
|||||||
|
|
||||||
// Réinitialiser le titre de la fenêtre
|
// Réinitialiser le titre de la fenêtre
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setTitle('SimpleConnect - Gestion Centralisée des Plannings');
|
mainWindow.setTitle(`SimpleConnect v${app.getVersion()}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "simpleconnect-electron",
|
"name": "simpleconnect-electron",
|
||||||
"version": "1.3.1",
|
"version": "1.4.0",
|
||||||
"description": "Application de gestion centralisée des plannings médicaux pour centres d'appels",
|
"description": "Application de gestion centralisée des plannings médicaux pour centres d'appels",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
11
renderer.js
11
renderer.js
@@ -18,6 +18,17 @@ let notesStartX = 0;
|
|||||||
|
|
||||||
// === GESTION DE LA CONNEXION ===
|
// === GESTION DE LA CONNEXION ===
|
||||||
document.addEventListener('DOMContentLoaded', async () => {
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
// Afficher la version de l'application
|
||||||
|
const appVersion = await ipcRenderer.invoke('get-app-version');
|
||||||
|
const versionElement = document.getElementById('appVersion');
|
||||||
|
const versionLoginElement = document.getElementById('appVersionLogin');
|
||||||
|
if (versionElement && appVersion) {
|
||||||
|
versionElement.textContent = `v${appVersion}`;
|
||||||
|
}
|
||||||
|
if (versionLoginElement && appVersion) {
|
||||||
|
versionLoginElement.textContent = `v${appVersion}`;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialiser l'indicateur SignalR
|
// Initialiser l'indicateur SignalR
|
||||||
|
|
||||||
// Écouter les changements de statut SignalR
|
// Écouter les changements de statut SignalR
|
||||||
|
|||||||
@@ -109,10 +109,18 @@ body {
|
|||||||
.login-container h1 {
|
.login-container h1 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #667eea;
|
color: #667eea;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 5px;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-version-login {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
/* Indicateur de statut SignalR */
|
/* Indicateur de statut SignalR */
|
||||||
.signalr-status {
|
.signalr-status {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -322,6 +330,14 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-version {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-left: 8px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
.agent-name {
|
.agent-name {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|||||||
Reference in New Issue
Block a user