diff --git a/config-ui.html b/config-ui.html
index 6511717..5863bbe 100644
--- a/config-ui.html
+++ b/config-ui.html
@@ -21,7 +21,7 @@
rx.scoreodonto.com
-
Client v1.1.0
+
Client v...
diff --git a/config-ui.js b/config-ui.js
index d0bf10e..2e1eddb 100644
--- a/config-ui.js
+++ b/config-ui.js
@@ -40,6 +40,12 @@ document.addEventListener('DOMContentLoaded', async () => {
// Initialize layout and load config
try {
+ if (window.api && window.api.getVersion) {
+ const version = await window.api.getVersion();
+ const badge = document.getElementById('app-version-badge');
+ if (badge) badge.innerText = `Client v${version}`;
+ }
+
loadedConfig = await window.api.getConfig();
// Populate settings form
diff --git a/index.js b/index.js
index 71719e8..839a0e4 100644
--- a/index.js
+++ b/index.js
@@ -17,6 +17,13 @@ autoUpdater.on('checking-for-update', () => {
autoUpdater.on('update-available', (info) => {
console.log('🔄 Nova versão disponÃvel:', info.version);
+ if (tray) {
+ tray.displayBalloon({
+ title: 'Nova Atualização Encontrada',
+ content: `A versão ${info.version} está sendo baixada silenciosamente em segundo plano...`,
+ iconType: 'info'
+ });
+ }
});
autoUpdater.on('update-not-available', () => {
@@ -286,6 +293,10 @@ ipcMain.handle('get-config', () => {
return loadConfig();
});
+ipcMain.handle('get-version', () => {
+ return app.getVersion();
+});
+
ipcMain.handle('save-config', (event, newConfig) => {
const success = saveConfig(newConfig);
if (success) {
diff --git a/package.json b/package.json
index 193014d..25f7d1b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "rx.scoreodonto.com-client",
- "version": "1.2.1",
+ "version": "1.2.2",
"author": "ScoreOdonto",
"description": "Cliente Windows para envio de imagens dentais da ScoreOdonto",
"main": "index.js",
diff --git a/preload.js b/preload.js
index 87f9b7e..b78e2af 100644
--- a/preload.js
+++ b/preload.js
@@ -2,6 +2,7 @@ const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('api', {
getConfig: () => ipcRenderer.invoke('get-config'),
+ getVersion: () => ipcRenderer.invoke('get-version'),
saveConfig: (config) => ipcRenderer.invoke('save-config', config),
testServer: (url) => ipcRenderer.invoke('test-server', url),
verifyCredentials: (url, email, password, token) => ipcRenderer.invoke('verify-credentials', url, email, password, token),