diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index e6dc6b50..e44dc7ea 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -200,7 +200,7 @@ "repack_list_updated": "Repack list updated", "repack_count_one": "{{count}} repack added", "repack_count_other": "{{count}} repacks added", - "new_update_available": "New update available", + "new_update_available": "Version {{version}} available", "restart_to_install_update": "Restart Hydra to install the update" }, "system_tray": { diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index a0fdf92a..77b43dd8 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -199,7 +199,8 @@ "game_ready_to_install": "{{title}} está listo para instalarse", "repack_list_updated": "Lista de repacks actualizadas", "repack_count_one": "{{count}} repack ha sido añadido", - "repack_count_other": "{{count}} repacks añadidos" + "repack_count_other": "{{count}} repacks añadidos", + "new_update_available": "Version {{version}} disponible" }, "system_tray": { "open": "Abrir Hydra", diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json index aa03b0f1..f1a4e77e 100644 --- a/src/locales/pt/translation.json +++ b/src/locales/pt/translation.json @@ -196,7 +196,7 @@ "repack_list_updated": "Lista de repacks atualizada", "repack_count_one": "{{count}} novo repack", "repack_count_other": "{{count}} novos repacks", - "new_update_available": "Nova versão disponível", + "new_update_available": "Versão {{version}} disponível", "restart_to_install_update": "Reinicie o Hydra para instalar a nova versão" }, "system_tray": { diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json index 322ad3b4..69a9c33d 100644 --- a/src/locales/ru/translation.json +++ b/src/locales/ru/translation.json @@ -197,7 +197,8 @@ "game_ready_to_install": "{{title}} готова к установке", "repack_list_updated": "Список репаков обновлен", "repack_count_one": "{{count}} репак добавлен", - "repack_count_other": "{{count}} репаков добавлено" + "repack_count_other": "{{count}} репаков добавлено", + "new_update_available": "Доступна версия {{version}}" }, "system_tray": { "open": "Открыть Hydra", diff --git a/src/main/events/autoupdater/check-for-updates.ts b/src/main/events/autoupdater/check-for-updates.ts index e0a7eb8d..6c8d3cb0 100644 --- a/src/main/events/autoupdater/check-for-updates.ts +++ b/src/main/events/autoupdater/check-for-updates.ts @@ -21,14 +21,17 @@ const mockValuesForDebug = () => { sendEvent({ type: "update-downloaded" }); }; +const newVersionInfo = { version: "" }; + const checkForUpdates = async (_event: Electron.IpcMainInvokeEvent) => { autoUpdater .once("update-available", (info: UpdateInfo) => { sendEvent({ type: "update-available", info }); + newVersionInfo.version = info.version; }) .once("update-downloaded", () => { sendEvent({ type: "update-downloaded" }); - publishNotificationUpdateReadyToInstall(); + publishNotificationUpdateReadyToInstall(newVersionInfo.version); }); if (app.isPackaged) { diff --git a/src/main/services/notifications.ts b/src/main/services/notifications.ts index 5a487f9f..274ffc91 100644 --- a/src/main/services/notifications.ts +++ b/src/main/services/notifications.ts @@ -67,10 +67,13 @@ export const publishNewRepacksNotifications = async (count: number) => { } }; -export const publishNotificationUpdateReadyToInstall = async () => { +export const publishNotificationUpdateReadyToInstall = async ( + version: string +) => { new Notification({ title: t("new_update_available", { ns: "notifications", + version, }), body: t("restart_to_install_update", { ns: "notifications",