From 13390910f218c331ccb871b4130146727240a86a Mon Sep 17 00:00:00 2001 From: Mosmain Date: Fri, 12 Jun 2026 19:55:24 +0300 Subject: [PATCH 1/8] feat(updater): enhance update functionality and UI components - Added new updater features including automatic update checks and user notifications. - Introduced `AboutFooter` component for displaying version information and update controls. - Updated English and Russian locale files with new updater messages. - Implemented updater logic in the store for managing update checks and installations. - Added functionality to open the GitHub releases page from the application. This commit improves the user experience by providing clear update information and controls, ensuring users can easily manage application updates. --- apps/client/src/features/i18n/locales/en.json | 7 +- apps/client/src/features/i18n/locales/ru.json | 7 +- .../src/features/settings/SettingsPanel.vue | 4 + .../updater/components/AboutFooter.vue | 87 +++++++++++++++++++ .../updater/components/UpdateBanner.vue | 46 ++-------- .../updater/composables/useAppVersion.ts | 27 ++++++ apps/client/src/features/updater/store.ts | 59 +++++++++++++ apps/desktop/src-tauri/src/commands.rs | 12 +++ apps/desktop/src-tauri/src/lib.rs | 1 + apps/desktop/src-tauri/src/updater.rs | 5 ++ 10 files changed, 215 insertions(+), 40 deletions(-) create mode 100644 apps/client/src/features/updater/components/AboutFooter.vue create mode 100644 apps/client/src/features/updater/composables/useAppVersion.ts create mode 100644 apps/client/src/features/updater/store.ts diff --git a/apps/client/src/features/i18n/locales/en.json b/apps/client/src/features/i18n/locales/en.json index 9c4be7e..4a964ef 100644 --- a/apps/client/src/features/i18n/locales/en.json +++ b/apps/client/src/features/i18n/locales/en.json @@ -72,7 +72,12 @@ "available": "Update v{version} available", "install": "Update", "installing": "Updating…", - "error": "Update failed. Grab the new exe manually: GitHub → Releases." + "error": "Update failed. Grab the new exe manually: GitHub → Releases.", + "checkButton": "Check for updates", + "upToDate": "Up to date", + "checkFailed": "Check failed", + "updateTo": "Update to v{version}", + "autoCheckLabel": "Check for updates on startup" }, "overlay": { "heading": "Overlay", diff --git a/apps/client/src/features/i18n/locales/ru.json b/apps/client/src/features/i18n/locales/ru.json index 1a1df13..3883814 100644 --- a/apps/client/src/features/i18n/locales/ru.json +++ b/apps/client/src/features/i18n/locales/ru.json @@ -72,7 +72,12 @@ "available": "Доступно обновление v{version}", "install": "Обновить", "installing": "Обновляем…", - "error": "Не получилось обновиться. Скачай новый exe вручную: GitHub → Releases." + "error": "Не получилось обновиться. Скачай новый exe вручную: GitHub → Releases.", + "checkButton": "Проверить обновления", + "upToDate": "Актуальная версия", + "checkFailed": "Не удалось проверить", + "updateTo": "Обновить до v{version}", + "autoCheckLabel": "Проверять обновления при запуске" }, "overlay": { "heading": "Оверлей", diff --git a/apps/client/src/features/settings/SettingsPanel.vue b/apps/client/src/features/settings/SettingsPanel.vue index 4f3f065..ecb86a7 100644 --- a/apps/client/src/features/settings/SettingsPanel.vue +++ b/apps/client/src/features/settings/SettingsPanel.vue @@ -2,6 +2,7 @@ import { z } from 'zod'; import { useSettingsSections } from './registry'; import { persistedRef } from '@/shared/persisted-store'; +import AboutFooter from '@/features/updater/components/AboutFooter.vue'; const { t } = useI18n(); const systemSections = useSettingsSections(); @@ -67,5 +68,8 @@ const openSections = persistedRef( + + diff --git a/apps/client/src/features/updater/components/AboutFooter.vue b/apps/client/src/features/updater/components/AboutFooter.vue new file mode 100644 index 0000000..b71c17d --- /dev/null +++ b/apps/client/src/features/updater/components/AboutFooter.vue @@ -0,0 +1,87 @@ + + + diff --git a/apps/client/src/features/updater/components/UpdateBanner.vue b/apps/client/src/features/updater/components/UpdateBanner.vue index f35b2b4..b12d3c9 100644 --- a/apps/client/src/features/updater/components/UpdateBanner.vue +++ b/apps/client/src/features/updater/components/UpdateBanner.vue @@ -1,49 +1,19 @@