From c5ec736f595cd7ddcbed6342454567f51e3fe99e Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Thu, 9 Mar 2023 15:25:38 +0200 Subject: [PATCH] feat(ui): added "components index updated" toast Should be informative for users. They could download new components once they released --- anime-launcher-sdk | 2 +- assets/locales/de/main.ftl | 4 ++++ assets/locales/en/main.ftl | 4 ++++ assets/locales/es/main.ftl | 4 ++++ assets/locales/fr/main.ftl | 4 ++++ assets/locales/ru/main.ftl | 3 +++ assets/locales/tr/main.ftl | 4 ++++ assets/locales/zh-cn/main.ftl | 4 ++++ src/ui/main.rs | 10 +++++++++- 9 files changed, 37 insertions(+), 2 deletions(-) diff --git a/anime-launcher-sdk b/anime-launcher-sdk index ba11109..e47af52 160000 --- a/anime-launcher-sdk +++ b/anime-launcher-sdk @@ -1 +1 @@ -Subproject commit ba1110908259fa893036f9b37ffef2576d0c2f92 +Subproject commit e47af5264697e67753ed71b37c08d224bca0922b diff --git a/assets/locales/de/main.ftl b/assets/locales/de/main.ftl index 090d4a1..0e7eba5 100644 --- a/assets/locales/de/main.ftl +++ b/assets/locales/de/main.ftl @@ -22,6 +22,7 @@ exit = Beenden check = Überprüfen restart = Neustarten + loading-data = Laden Daten downloading-background-picture = Hintergrundbild am Herunterladen updating-components-index = Aktualisiere index der Komponenten @@ -40,6 +41,9 @@ verifying-files = Verifiziere Dateien repairing-files = Repariere Dateien +components-index-updated = Components index was updated + + launch = Starten apply-patch = Patch anwenden download-wine = Wine Herunterladen diff --git a/assets/locales/en/main.ftl b/assets/locales/en/main.ftl index 85a6bbe..d33b85e 100644 --- a/assets/locales/en/main.ftl +++ b/assets/locales/en/main.ftl @@ -22,6 +22,7 @@ exit = Exit check = Check restart = Restart + loading-data = Loading data downloading-background-picture = Downloading background picture updating-components-index = Updating components index @@ -40,6 +41,9 @@ verifying-files = Verifying files repairing-files = Repairing files +components-index-updated = Components index was updated + + launch = Launch apply-patch = Apply patch download-wine = Download wine diff --git a/assets/locales/es/main.ftl b/assets/locales/es/main.ftl index ff87a43..ceab70f 100755 --- a/assets/locales/es/main.ftl +++ b/assets/locales/es/main.ftl @@ -22,6 +22,7 @@ exit = Salir check = Comprobar restart = Reiniciar + loading-data = Cargando datos downloading-background-picture = Descargando imagen de fondo updating-components-index = Actualizando índice de componentes @@ -40,6 +41,9 @@ verifying-files = Verifying files repairing-files = Repairing files +components-index-updated = Components index was updated + + launch = Iniciar apply-patch = Aplicar parche download-wine = Descargar wine diff --git a/assets/locales/fr/main.ftl b/assets/locales/fr/main.ftl index 7e92780..ff64334 100644 --- a/assets/locales/fr/main.ftl +++ b/assets/locales/fr/main.ftl @@ -22,6 +22,7 @@ exit = Quitter check = Vérifier restart = Redémarer + loading-data = Chargement des données downloading-background-picture = Téléchargement de l'image de fond updating-components-index = Updating components index @@ -40,6 +41,9 @@ verifying-files = Vérification des fichiers repairing-files = Réparation des fichiers +components-index-updated = Components index was updated + + launch = Lancer apply-patch = Appliquer le patch download-wine = Télécharger wine diff --git a/assets/locales/ru/main.ftl b/assets/locales/ru/main.ftl index 7a2ba5f..ae90fd4 100644 --- a/assets/locales/ru/main.ftl +++ b/assets/locales/ru/main.ftl @@ -47,6 +47,9 @@ verifying-files = Проверка файлов repairing-files = Починка файлов +components-index-updated = Индекс компонентов был обновлен + + launch = Запустить apply-patch = Применить патч download-wine = Установить Wine diff --git a/assets/locales/tr/main.ftl b/assets/locales/tr/main.ftl index e7d9856..a69b079 100644 --- a/assets/locales/tr/main.ftl +++ b/assets/locales/tr/main.ftl @@ -22,6 +22,7 @@ exit = Çıkış yap check = Kontrol et restart = Tekrardan başlat + loading-data = Bilgiler yükleniyor downloading-background-picture = Arkaplan dosyasi indiriliyor updating-components-index = Bileşenlerin dizini güncelleniyor @@ -40,6 +41,9 @@ verifying-files = Dosyalar Doğrulanıyor repairing-files = Dosyalar tamir ediliyor +components-index-updated = Components index was updated + + launch = Çalıştır apply-patch = Yamayı uygula download-wine = Wine indir diff --git a/assets/locales/zh-cn/main.ftl b/assets/locales/zh-cn/main.ftl index 36a4b6b..76a8f08 100644 --- a/assets/locales/zh-cn/main.ftl +++ b/assets/locales/zh-cn/main.ftl @@ -22,6 +22,7 @@ exit = 退出 check = 检查 restart = 重启 + loading-data = 正在加载数据 downloading-background-picture = 正在下载背景图片 updating-components-index = 正在更新组件索引 @@ -40,6 +41,9 @@ verifying-files = 正在检验文件 repairing-files = 正在修复文件 +components-index-updated = Components index was updated + + launch = 启动 apply-patch = 安装补丁 download-wine = 下载 Wine diff --git a/src/ui/main.rs b/src/ui/main.rs index e1d1484..962042b 100644 --- a/src/ui/main.rs +++ b/src/ui/main.rs @@ -613,7 +613,15 @@ impl SimpleComponent for App { Ok(false) => { for host in &CONFIG.components.servers { match components.sync(host) { - Ok(true) => break, + Ok(true) => { + // TODO: add changelog log here + + sender.input(AppMsg::Toast { + title: tr("components-index-updated"), + description: None + }); + } + Ok(false) => continue, Err(err) => {