From 6c1da973872b22fcea692b7bf0a1a4a98ca4ead5 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 31 Oct 2026 04:43:12 +0000 Subject: [PATCH] updates: show check results with craft-update's CheckResultDialog --- Cargo.lock | 15 ++--- Cargo.toml | 10 +-- crates/ui-egui/src/i18n/ar.tsv | 11 ---- crates/ui-egui/src/i18n/cs.tsv | 9 --- crates/ui-egui/src/i18n/da.tsv | 11 ---- crates/ui-egui/src/i18n/de.tsv | 9 --- crates/ui-egui/src/i18n/el.tsv | 9 --- crates/ui-egui/src/i18n/es.tsv | 9 --- crates/ui-egui/src/i18n/fi.tsv | 11 ---- crates/ui-egui/src/i18n/fr.tsv | 9 --- crates/ui-egui/src/i18n/hu.tsv | 9 --- crates/ui-egui/src/i18n/id.tsv | 9 --- crates/ui-egui/src/i18n/it.tsv | 9 --- crates/ui-egui/src/i18n/ja.tsv | 9 --- crates/ui-egui/src/i18n/ko.tsv | 9 --- crates/ui-egui/src/i18n/nb.tsv | 11 ---- crates/ui-egui/src/i18n/nl.tsv | 9 --- crates/ui-egui/src/i18n/pl.tsv | 9 --- crates/ui-egui/src/i18n/pt-br.tsv | 9 --- crates/ui-egui/src/i18n/ru.tsv | 9 --- crates/ui-egui/src/i18n/sr.tsv | 9 --- crates/ui-egui/src/i18n/sv.tsv | 11 ---- crates/ui-egui/src/i18n/tr.tsv | 9 --- crates/ui-egui/src/i18n/uk.tsv | 9 --- crates/ui-egui/src/i18n/vi.tsv | 9 --- crates/ui-egui/src/i18n/zh-hans.tsv | 9 --- crates/ui-egui/src/i18n/zh-hant.tsv | 9 --- crates/ui-egui/src/updates_ui.rs | 97 +++++++++-------------------- 28 files changed, 44 insertions(+), 313 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a2a355c199..725776fa79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1350,17 +1350,17 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" dependencies = [ "thiserror 2.0.21", ] @@ -1391,9 +1391,10 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" dependencies = [ "craft-winprint-gdi", + "log", "miniz_oxide 0.9.1", "roxmltree 0.21.1", "tempfile", @@ -1404,7 +1405,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=92d392cff132eaf53e13afff77f38b5c11b73aa0#92d392cff132eaf53e13afff77f38b5c11b73aa0" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1425,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=04aa1703b32d299e54f78fcde4182f2b393a9116#04aa1703b32d299e54f78fcde4182f2b393a9116" +source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" dependencies = [ "chrono", "dunce", diff --git a/Cargo.toml b/Cargo.toml index 7427c45283..da26a96405 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0", features = ["serde"] } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["serde"] } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } @@ -39,11 +39,11 @@ photocraft-tablet = { path = "crates/tablet" } photocraft-ipp = { path = "crates/ipp" } # external -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" } -craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } +craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "04aa1703b32d299e54f78fcde4182f2b393a9116", features = ["egui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["egui"] } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsv index a58fbc86ca..e887cfa6a5 100644 --- a/crates/ui-egui/src/i18n/ar.tsv +++ b/crates/ui-egui/src/i18n/ar.tsv @@ -3330,17 +3330,8 @@ curves Smooth تنعيم Shadow Tint صبغة الظلال # PhotoCraft release checks. Check for Updates… التحقق من وجود تحديثات… - PhotoCraft Updates تحديثات PhotoCraft - Checking for updates… جارٍ التحقق من وجود تحديثات… Open the release page to choose an installer for your system. افتح صفحة الإصدار لاختيار برنامج التثبيت المناسب لنظامك. - Open Download Page فتح صفحة التنزيل - PhotoCraft is up to date. PhotoCraft محدّث. - Could not check for updates. تعذر التحقق من وجود تحديثات. - Updates have not been checked yet. لم يتم التحقق من التحديثات بعد. - Check Again التحقق مرة أخرى Automatically Check for Updates التحقق من وجود تحديثات تلقائيًا - Installed version: {version} الإصدار المثبت: {version} - PhotoCraft {version} is available. يتوفر PhotoCraft {version}. # History panel › History Brush source (#2966) Paints from the History panel's source state يرسم من حالة المصدر في لوحة السجل Sets the source for the history brush يحدد مصدر فرشاة السجل @@ -3541,13 +3532,11 @@ curves Smooth تنعيم Drawn on the CPU: {reason}. Click for System Info. يُرسم على CPU: {reason}. انقر لعرض معلومات النظام. Level: المستوى: Percentile: المئين: - Release Notes ملاحظات الإصدار Remember Settings تذكر الإعدادات Show Channels in Color عرض القنوات بالألوان Show Statistics عرض الإحصائيات Source: المصدر: Uncached Refresh تحديث دون ذاكرة التخزين المؤقت - Update and Restart التحديث وإعادة التشغيل X X Y Y diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index ed1a1e6462..324eb5b23c 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -3943,17 +3943,8 @@ navigator Zoom Zvětšení Kept {name}: written by another application Soubor {name} ponechán: zapsala ho jiná aplikace Shadow Tint Odstín stínů Check for Updates… Zkontrolovat aktualizace… - PhotoCraft Updates Aktualizace PhotoCraft - Checking for updates… Kontrola aktualizací… Open the release page to choose an installer for your system. Otevřete stránku vydání a vyberte instalační program pro svůj systém. - Open Download Page Otevřít stránku ke stažení - PhotoCraft is up to date. PhotoCraft je aktuální. - Could not check for updates. Aktualizace se nepodařilo zkontrolovat. - Updates have not been checked yet. Aktualizace ještě nebyly zkontrolovány. - Check Again Zkontrolovat znovu Automatically Check for Updates Automaticky kontrolovat aktualizace - Installed version: {version} Nainstalovaná verze: {version} - PhotoCraft {version} is available. PhotoCraft {version} je k dispozici. Paints from the History panel's source state Maluje ze zdrojového stavu panelu Historie Sets the source for the history brush Nastaví zdroj pro štětec historie Highlight Mode Režim světel diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index fd23713dd4..744d678dbc 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -3278,17 +3278,8 @@ curves Smooth Udjævn Shadow Opacity Skyggeopacitet # PhotoCraft release checks. Check for Updates… Søg efter opdateringer… - PhotoCraft Updates PhotoCraft-opdateringer - Checking for updates… Søger efter opdateringer… Open the release page to choose an installer for your system. Åbn udgivelsessiden for at vælge et installationsprogram til dit system. - Open Download Page Åbn downloadsiden - PhotoCraft is up to date. PhotoCraft er opdateret. - Could not check for updates. Kunne ikke søge efter opdateringer. - Updates have not been checked yet. Der er endnu ikke søgt efter opdateringer. - Check Again Søg igen Automatically Check for Updates Søg automatisk efter opdateringer - Installed version: {version} Installeret version: {version} - PhotoCraft {version} is available. PhotoCraft {version} er tilgængelig. # Embedded Profile Mismatch: profile names beside the choices, Remember this choice Use the embedded profile ({profile}) Brug den indlejrede profil ({profile}) Convert to the working space ({profile}) Konvertér til arbejdsfarverummet ({profile}) @@ -4723,7 +4714,6 @@ shape Appearance Udseende Level: Niveau: Percentile: Percentil: Refine Edge… Forfin kant… - Release Notes Udgivelsesnoter Remember Settings Husk indstillinger Reset Essentials Nulstil Grundlæggende Rounded Rectangle Tool Afrundet rektangelværktøj @@ -4734,7 +4724,6 @@ shape Appearance Udseende Tile Horizontally Side om side vandret Tile Vertically Side om side lodret Uncached Refresh Opdatering uden cache - Update and Restart Opdatér og genstart Warming Filter (81) Opvarmningsfilter (81) Warming Filter (LBA) Opvarmningsfilter (LBA) @plural {n} document|{n} documents {n} dokument|{n} dokumenter diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 60eb5a1508..6837c7c7a6 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -3342,17 +3342,8 @@ curves Smooth Glätten Kept {name}: written by another application {name} beibehalten: von einer anderen Anwendung geschrieben Shadow Tint Schattentönung Check for Updates… Nach Updates suchen… - PhotoCraft Updates PhotoCraft-Updates - Checking for updates… Suche nach Updates… Open the release page to choose an installer for your system. Öffnen Sie die Versionsseite und wählen Sie ein Installationspaket für Ihr System. - Open Download Page Downloadseite öffnen - PhotoCraft is up to date. PhotoCraft ist auf dem neuesten Stand. - Could not check for updates. Updates konnten nicht geprüft werden. - Updates have not been checked yet. Es wurde noch nicht nach Updates gesucht. - Check Again Erneut prüfen Automatically Check for Updates Automatisch nach Updates suchen - Installed version: {version} Installierte Version: {version} - PhotoCraft {version} is available. PhotoCraft {version} ist verfügbar. Paints from the History panel's source state Malt aus dem Quellzustand des Protokollbedienfelds Sets the source for the history brush Legt die Quelle für den Protokollpinsel fest Highlight Mode Lichtermodus diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 785df71b6e..dd25cf0440 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -4026,17 +4026,8 @@ curves Smooth Εξομάλυνση Kept {name}: written by another application Το {name} διατηρήθηκε: γράφτηκε από άλλη εφαρμογή Shadow Tint Χροιά σκιών Check for Updates… Έλεγχος ενημερώσεων… - PhotoCraft Updates Ενημερώσεις PhotoCraft - Checking for updates… Έλεγχος για ενημερώσεις… Open the release page to choose an installer for your system. Ανοίξτε τη σελίδα της έκδοσης για να επιλέξετε πρόγραμμα εγκατάστασης για το σύστημά σας. - Open Download Page Άνοιγμα σελίδας λήψης - PhotoCraft is up to date. Το PhotoCraft είναι ενημερωμένο. - Could not check for updates. Δεν ήταν δυνατός ο έλεγχος ενημερώσεων. - Updates have not been checked yet. Δεν έχει γίνει ακόμη έλεγχος ενημερώσεων. - Check Again Νέος έλεγχος Automatically Check for Updates Αυτόματος έλεγχος ενημερώσεων - Installed version: {version} Εγκατεστημένη έκδοση: {version} - PhotoCraft {version} is available. Το PhotoCraft {version} είναι διαθέσιμο. Paints from the History panel's source state Βάφει από την κατάσταση πηγής του πίνακα Ιστορικό Sets the source for the history brush Ορίζει την πηγή για το πινέλο ιστορικού Highlight Mode Λειτουργία φωτεινών τόνων diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 20cb6a7f5d..40ac467561 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -4239,17 +4239,8 @@ navigator Zoom Zoom Kept {name}: written by another application Se conservó {name}: lo escribió otra aplicación Shadow Tint Tinte de sombras Check for Updates… Buscar actualizaciones… - PhotoCraft Updates Actualizaciones de PhotoCraft - Checking for updates… Buscando actualizaciones… Open the release page to choose an installer for your system. Abra la página de la versión para elegir un instalador para su sistema. - Open Download Page Abrir página de descarga - PhotoCraft is up to date. PhotoCraft está actualizado. - Could not check for updates. No se pudieron buscar actualizaciones. - Updates have not been checked yet. Aún no se han buscado actualizaciones. - Check Again Comprobar de nuevo Automatically Check for Updates Buscar actualizaciones automáticamente - Installed version: {version} Versión instalada: {version} - PhotoCraft {version} is available. PhotoCraft {version} está disponible. Paints from the History panel's source state Pinta a partir del estado de origen del panel Historia Sets the source for the history brush Establece el origen del pincel de historia Highlight Mode Modo de luces diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 0dd3e6df91..b934207c2d 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -3279,17 +3279,8 @@ curves Smooth Tasoita Shadow Opacity Varjon peittävyys # PhotoCraft release checks. Check for Updates… Tarkista päivitykset… - PhotoCraft Updates PhotoCraftin päivitykset - Checking for updates… Tarkistetaan päivityksiä… Open the release page to choose an installer for your system. Avaa julkaisusivu ja valitse järjestelmällesi sopiva asennusohjelma. - Open Download Page Avaa lataussivu - PhotoCraft is up to date. PhotoCraft on ajan tasalla. - Could not check for updates. Päivityksiä ei voitu tarkistaa. - Updates have not been checked yet. Päivityksiä ei ole vielä tarkistettu. - Check Again Tarkista uudelleen Automatically Check for Updates Tarkista päivitykset automaattisesti - Installed version: {version} Asennettu versio: {version} - PhotoCraft {version} is available. PhotoCraft {version} on saatavilla. # Embedded Profile Mismatch: profile names beside the choices, Remember this choice Use the embedded profile ({profile}) Käytä upotettua profiilia ({profile}) Convert to the working space ({profile}) Muunna työavaruuteen ({profile}) @@ -4724,7 +4715,6 @@ shape Appearance Ulkoasu Level: Sävytaso: Percentile: Persentiili: Refine Edge… Tarkenna reunaa… - Release Notes Julkaisutiedot Remember Settings Muista asetukset Reset Essentials Nollaa Perusteet Rounded Rectangle Tool Pyöristetyn suorakulmion työkalu @@ -4735,7 +4725,6 @@ shape Appearance Ulkoasu Tile Horizontally Allekkain Tile Vertically Rinnakkain Uncached Refresh Päivitä ilman välimuistia - Update and Restart Päivitä ja käynnistä uudelleen Warming Filter (81) Lämmityssuodatin (81) Warming Filter (LBA) Lämmityssuodatin (LBA) @plural {n} document|{n} documents {n} asiakirja|{n} asiakirjaa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 38ab652e73..f13169f5a0 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3333,17 +3333,8 @@ curves Smooth Lisser Kept {name}: written by another application {name} conservé : écrit par une autre application Shadow Tint Teinte des ombres Check for Updates… Rechercher des mises à jour… - PhotoCraft Updates Mises à jour de PhotoCraft - Checking for updates… Recherche de mises à jour… Open the release page to choose an installer for your system. Ouvrez la page de la version pour choisir un programme d’installation pour votre système. - Open Download Page Ouvrir la page de téléchargement - PhotoCraft is up to date. PhotoCraft est à jour. - Could not check for updates. Impossible de rechercher des mises à jour. - Updates have not been checked yet. Les mises à jour n’ont pas encore été vérifiées. - Check Again Vérifier à nouveau Automatically Check for Updates Rechercher automatiquement des mises à jour - Installed version: {version} Version installée : {version} - PhotoCraft {version} is available. PhotoCraft {version} est disponible. Paints from the History panel's source state Peint à partir de l'état source du panneau Historique Sets the source for the history brush Définit la source du pinceau d'historique Highlight Mode Mode des tons clairs diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 4ad91eb2d0..cef4f7acc1 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -4226,17 +4226,8 @@ cameraRaw Yellow Sárga Shadow Color Árnyék színe Shadow Opacity Árnyék fedettsége Check for Updates… Frissítések keresése… - PhotoCraft Updates PhotoCraft-frissítések - Checking for updates… Frissítések keresése… Open the release page to choose an installer for your system. Nyissa meg a kiadás oldalát, és válassza ki a rendszerének megfelelő telepítőt. - Open Download Page Letöltési oldal megnyitása - PhotoCraft is up to date. A PhotoCraft naprakész. - Could not check for updates. Nem sikerült ellenőrizni a frissítéseket. - Updates have not been checked yet. A frissítések még nem lettek ellenőrizve. - Check Again Újraellenőrzés Automatically Check for Updates Frissítések automatikus keresése - Installed version: {version} Telepített verzió: {version} - PhotoCraft {version} is available. Elérhető a PhotoCraft {version}. Use the embedded profile ({profile}) A beágyazott profil használata ({profile}) Convert to the working space ({profile}) Átalakítás a munkaszíntérbe ({profile}) Remember this choice for future images A választás megjegyzése a későbbi képekhez diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index d369df5d4d..b6911c756c 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3338,17 +3338,8 @@ curves Smooth Haluskan Kept {name}: written by another application {name} dipertahankan: ditulis oleh aplikasi lain Shadow Tint Rona bayangan Check for Updates… Periksa Pembaruan… - PhotoCraft Updates Pembaruan PhotoCraft - Checking for updates… Memeriksa pembaruan… Open the release page to choose an installer for your system. Buka halaman rilis untuk memilih penginstal bagi sistem Anda. - Open Download Page Buka Halaman Unduhan - PhotoCraft is up to date. PhotoCraft sudah versi terbaru. - Could not check for updates. Tidak dapat memeriksa pembaruan. - Updates have not been checked yet. Pembaruan belum diperiksa. - Check Again Periksa Lagi Automatically Check for Updates Periksa Pembaruan Secara Otomatis - Installed version: {version} Versi terpasang: {version} - PhotoCraft {version} is available. PhotoCraft {version} tersedia. Paints from the History panel's source state Melukis dari status sumber panel Riwayat Sets the source for the history brush Menetapkan sumber untuk kuas riwayat Highlight Mode Mode Sorotan diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 817ed0ddd7..8fae0928ca 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -4289,17 +4289,8 @@ navigator Zoom Zoom Kept {name}: written by another application {name} mantenuto: scritto da un’altra applicazione Shadow Tint Tinta ombre Check for Updates… Cerca aggiornamenti… - PhotoCraft Updates Aggiornamenti di PhotoCraft - Checking for updates… Ricerca aggiornamenti… Open the release page to choose an installer for your system. Apri la pagina della versione per scegliere un programma di installazione per il tuo sistema. - Open Download Page Apri pagina di download - PhotoCraft is up to date. PhotoCraft è aggiornato. - Could not check for updates. Impossibile cercare aggiornamenti. - Updates have not been checked yet. Gli aggiornamenti non sono ancora stati verificati. - Check Again Controlla di nuovo Automatically Check for Updates Cerca automaticamente aggiornamenti - Installed version: {version} Versione installata: {version} - PhotoCraft {version} is available. PhotoCraft {version} è disponibile. Paints from the History panel's source state Dipinge dallo stato di origine del pannello Cronologia Sets the source for the history brush Imposta l'origine del pennello storia Highlight Mode Metodo luci diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 1d157810a1..e9a8c45e2b 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -4001,17 +4001,8 @@ curves Smooth スムーズ Kept {name}: written by another application {name} はそのままにしました: 別のアプリケーションが書き込んだファイルです Shadow Tint シャドウの色かぶり補正 Check for Updates… アップデートを確認… - PhotoCraft Updates PhotoCraft のアップデート - Checking for updates… アップデートを確認中… Open the release page to choose an installer for your system. リリースページでお使いのシステム用のインストーラーを選択してください。 - Open Download Page ダウンロードページを開く - PhotoCraft is up to date. PhotoCraft は最新です。 - Could not check for updates. アップデートを確認できませんでした。 - Updates have not been checked yet. まだアップデートを確認していません。 - Check Again 再確認 Automatically Check for Updates アップデートを自動的に確認 - Installed version: {version} インストール済みのバージョン: {version} - PhotoCraft {version} is available. PhotoCraft {version} が利用可能です。 Paints from the History panel's source state ヒストリーパネルのソース状態からペイントします Sets the source for the history brush ヒストリーブラシのソースを設定します Highlight Mode ハイライトモード diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 7ccf3e32f0..3ed098763c 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -3532,17 +3532,8 @@ curves Smooth 매끄럽게 Kept {name}: written by another application {name}을(를) 유지함: 다른 응용 프로그램이 작성한 파일 Shadow Tint 그림자 색조 Check for Updates… 업데이트 확인… - PhotoCraft Updates PhotoCraft 업데이트 - Checking for updates… 업데이트 확인 중… Open the release page to choose an installer for your system. 릴리스 페이지에서 시스템에 맞는 설치 프로그램을 선택하세요. - Open Download Page 다운로드 페이지 열기 - PhotoCraft is up to date. PhotoCraft가 최신 버전입니다. - Could not check for updates. 업데이트를 확인할 수 없습니다. - Updates have not been checked yet. 아직 업데이트를 확인하지 않았습니다. - Check Again 다시 확인 Automatically Check for Updates 자동으로 업데이트 확인 - Installed version: {version} 설치된 버전: {version} - PhotoCraft {version} is available. PhotoCraft {version}을 사용할 수 있습니다. Paints from the History panel's source state 작업 내역 패널의 소스 상태에서 칠합니다 Sets the source for the history brush 작업 내역 브러시의 소스를 설정합니다 Highlight Mode 하이라이트 모드 diff --git a/crates/ui-egui/src/i18n/nb.tsv b/crates/ui-egui/src/i18n/nb.tsv index 6723e06857..6cbb2f5d8f 100644 --- a/crates/ui-egui/src/i18n/nb.tsv +++ b/crates/ui-egui/src/i18n/nb.tsv @@ -3278,17 +3278,8 @@ curves Smooth Jevn ut Shadow Opacity Skyggedekkevne # PhotoCraft release checks. Check for Updates… Se etter oppdateringer… - PhotoCraft Updates PhotoCraft-oppdateringer - Checking for updates… Ser etter oppdateringer… Open the release page to choose an installer for your system. Åpne utgivelsessiden for å velge en installasjonspakke for systemet ditt. - Open Download Page Åpne nedlastingssiden - PhotoCraft is up to date. PhotoCraft er oppdatert. - Could not check for updates. Kunne ikke se etter oppdateringer. - Updates have not been checked yet. Oppdateringer er ikke sjekket ennå. - Check Again Sjekk igjen Automatically Check for Updates Se etter oppdateringer automatisk - Installed version: {version} Installert versjon: {version} - PhotoCraft {version} is available. PhotoCraft {version} er tilgjengelig. # Embedded Profile Mismatch: profile names beside the choices, Remember this choice Use the embedded profile ({profile}) Bruk den innebygde profilen ({profile}) Convert to the working space ({profile}) Konverter til arbeidsfargerommet ({profile}) @@ -4723,7 +4714,6 @@ shape Appearance Utseende Level: Nivå: Percentile: Persentil: Refine Edge… Forbedre kant… - Release Notes Versjonsmerknader Remember Settings Husk innstillinger Reset Essentials Tilbakestill grunnleggende Rounded Rectangle Tool Verktøy for avrundet rektangel @@ -4734,7 +4724,6 @@ shape Appearance Utseende Tile Horizontally Side om side vannrett Tile Vertically Side om side loddrett Uncached Refresh Oppdater uten buffer - Update and Restart Oppdater og start på nytt Warming Filter (81) Oppvarmingsfilter (81) Warming Filter (LBA) Oppvarmingsfilter (LBA) @plural {n} document|{n} documents {n} dokument|{n} dokumenter diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 0acca7c2d3..bb044cd9e2 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -4085,17 +4085,8 @@ curves Smooth Vloeiend maken Kept {name}: written by another application {name} behouden: geschreven door een andere toepassing Shadow Tint Schaduwtint Check for Updates… Controleren op updates… - PhotoCraft Updates PhotoCraft-updates - Checking for updates… Controleren op updates… Open the release page to choose an installer for your system. Open de releasepagina om een installatieprogramma voor uw systeem te kiezen. - Open Download Page Downloadpagina openen - PhotoCraft is up to date. PhotoCraft is bijgewerkt. - Could not check for updates. Kan niet controleren op updates. - Updates have not been checked yet. Er is nog niet op updates gecontroleerd. - Check Again Opnieuw controleren Automatically Check for Updates Automatisch op updates controleren - Installed version: {version} Geïnstalleerde versie: {version} - PhotoCraft {version} is available. PhotoCraft {version} is beschikbaar. Paints from the History panel's source state Schildert vanuit de bronstatus van het deelvenster Geschiedenis Sets the source for the history brush Stelt de bron voor het historiepenseel in Highlight Mode Hooglichtmodus diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 3c39c5183c..daca73673d 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3942,17 +3942,8 @@ curves Smooth Wygładź Kept {name}: written by another application Zachowano {name}: zapisany przez inną aplikację Shadow Tint Tinta cieni Check for Updates… Sprawdź aktualizacje… - PhotoCraft Updates Aktualizacje PhotoCraft - Checking for updates… Sprawdzanie aktualizacji… Open the release page to choose an installer for your system. Otwórz stronę wydania, aby wybrać instalator dla swojego systemu. - Open Download Page Otwórz stronę pobierania - PhotoCraft is up to date. PhotoCraft jest aktualny. - Could not check for updates. Nie udało się sprawdzić aktualizacji. - Updates have not been checked yet. Aktualizacje nie zostały jeszcze sprawdzone. - Check Again Sprawdź ponownie Automatically Check for Updates Automatycznie sprawdzaj aktualizacje - Installed version: {version} Zainstalowana wersja: {version} - PhotoCraft {version} is available. PhotoCraft {version} jest dostępny. Paints from the History panel's source state Maluje ze stanu źródłowego panelu Historia Sets the source for the history brush Ustawia źródło dla pędzla historii Highlight Mode Tryb świateł diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 889489181c..656cb673df 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4125,17 +4125,8 @@ layerLabel No Color Sem cor Kept {name}: written by another application {name} mantido: gravado por outro aplicativo Shadow Tint Matiz das sombras Check for Updates… Verificar atualizações… - PhotoCraft Updates Atualizações do PhotoCraft - Checking for updates… Verificando atualizações… Open the release page to choose an installer for your system. Abra a página da versão para escolher um instalador para o seu sistema. - Open Download Page Abrir página de download - PhotoCraft is up to date. O PhotoCraft está atualizado. - Could not check for updates. Não foi possível verificar atualizações. - Updates have not been checked yet. As atualizações ainda não foram verificadas. - Check Again Verificar novamente Automatically Check for Updates Verificar atualizações automaticamente - Installed version: {version} Versão instalada: {version} - PhotoCraft {version} is available. PhotoCraft {version} está disponível. Paints from the History panel's source state Pinta a partir do estado de origem do painel Histórico Sets the source for the history brush Define a origem do pincel do histórico Highlight Mode Modo de realces diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index a4f7971dd9..cbe3bff266 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3314,17 +3314,8 @@ curves Smooth Сгладить Shadow Color Цвет теней Shadow Opacity Непрозрачность теней Check for Updates… Проверить обновления… - PhotoCraft Updates Обновления PhotoCraft - Checking for updates… Проверка обновлений… Open the release page to choose an installer for your system. Откройте страницу выпуска и выберите установщик для своей системы. - Open Download Page Открыть страницу загрузки - PhotoCraft is up to date. Установлена последняя версия PhotoCraft. - Could not check for updates. Не удалось проверить обновления. - Updates have not been checked yet. Обновления ещё не проверялись. - Check Again Проверить снова Automatically Check for Updates Автоматически проверять обновления - Installed version: {version} Установленная версия: {version} - PhotoCraft {version} is available. Доступна версия PhotoCraft {version}. Use the embedded profile ({profile}) Использовать встроенный профиль ({profile}) Convert to the working space ({profile}) Преобразовать в рабочее пространство ({profile}) Remember this choice for future images Запомнить этот выбор для следующих изображений diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv index cae001490c..266831c5eb 100644 --- a/crates/ui-egui/src/i18n/sr.tsv +++ b/crates/ui-egui/src/i18n/sr.tsv @@ -4524,17 +4524,8 @@ shape Appearance Izgled Not rendered: this adjustment ({key}) is kept as imported. Није приказано: ово прилагођавање ({key}) је задржано онако како је увезено. Print preview image Print preview image Check for Updates… Proveri ažuriranja… - PhotoCraft Updates Ažuriranja za PhotoCraft - Checking for updates… Provera ažuriranja… Open the release page to choose an installer for your system. Otvorite stranicu izdanja da biste izabrali instalacioni program za svoj sistem. - Open Download Page Otvori stranicu za preuzimanje - PhotoCraft is up to date. PhotoCraft je ažuran. - Could not check for updates. Nije moguće proveriti ažuriranja. - Updates have not been checked yet. Ažuriranja još nisu proverena. - Check Again Proveri ponovo Automatically Check for Updates Automatski proveravaj ažuriranja - Installed version: {version} Instalirana verzija: {version} - PhotoCraft {version} is available. Dostupan je PhotoCraft {version}. Hue Cube Kocka nijanse Brightness Cube Kocka osvetljenosti Color Wheel Točak boja diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index fcbdbe79cf..1b3e58f661 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -3276,17 +3276,8 @@ curves Smooth Jämna ut Shadow Opacity Skuggopacitet # PhotoCraft release checks. Check for Updates… Sök efter uppdateringar… - PhotoCraft Updates PhotoCraft-uppdateringar - Checking for updates… Söker efter uppdateringar… Open the release page to choose an installer for your system. Öppna versionssidan för att välja ett installationsprogram för ditt system. - Open Download Page Öppna hämtningssida - PhotoCraft is up to date. PhotoCraft är uppdaterat. - Could not check for updates. Det gick inte att söka efter uppdateringar. - Updates have not been checked yet. Ingen sökning efter uppdateringar har gjorts ännu. - Check Again Sök igen Automatically Check for Updates Sök efter uppdateringar automatiskt - Installed version: {version} Installerad version: {version} - PhotoCraft {version} is available. PhotoCraft {version} finns tillgänglig. # Embedded Profile Mismatch: profile names beside the choices, Remember this choice Use the embedded profile ({profile}) Använd den inbäddade profilen ({profile}) Convert to the working space ({profile}) Konvertera till arbetsfärgrymden ({profile}) @@ -4721,7 +4712,6 @@ shape Appearance Utseende Level: Nivå: Percentile: Percentil: Refine Edge… Förfina kant… - Release Notes Versionsinformation Remember Settings Kom ihåg inställningar Reset Essentials Återställ Grundläggande Rounded Rectangle Tool Verktyget Rundad rektangel @@ -4732,7 +4722,6 @@ shape Appearance Utseende Tile Horizontally Lägg sida vid sida vågrätt Tile Vertically Lägg sida vid sida lodrätt Uncached Refresh Uppdatera utan cache - Update and Restart Uppdatera och starta om Warming Filter (81) Värmefilter (81) Warming Filter (LBA) Värmefilter (LBA) @plural {n} document|{n} documents {n} dokument|{n} dokument diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index fef730cf53..908de92681 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -4033,17 +4033,8 @@ cameraData Lens Lens Shadow Color Gölge Rengi Shadow Opacity Gölge Opaklığı Check for Updates… Güncellemeleri Denetle… - PhotoCraft Updates PhotoCraft Güncellemeleri - Checking for updates… Güncellemeler denetleniyor… Open the release page to choose an installer for your system. Sisteminize uygun yükleyiciyi seçmek için sürüm sayfasını açın. - Open Download Page İndirme Sayfasını Aç - PhotoCraft is up to date. PhotoCraft güncel. - Could not check for updates. Güncellemeler denetlenemedi. - Updates have not been checked yet. Güncellemeler henüz denetlenmedi. - Check Again Yeniden Denetle Automatically Check for Updates Güncellemeleri Otomatik Denetle - Installed version: {version} Yüklü sürüm: {version} - PhotoCraft {version} is available. PhotoCraft {version} kullanılabilir. Use the embedded profile ({profile}) Gömülü profili kullanın ({profile}) Convert to the working space ({profile}) Çalışma alanına dönüştürün ({profile}) Remember this choice for future images Bu seçimi sonraki görüntüler için hatırla diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index f894f2522a..b97e2ff002 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -4028,17 +4028,8 @@ curves Smooth Згладити Kept {name}: written by another application {name} залишено без змін: записаний іншою програмою Shadow Tint Відтінок тіней Check for Updates… Перевірити оновлення… - PhotoCraft Updates Оновлення PhotoCraft - Checking for updates… Перевірка оновлень… Open the release page to choose an installer for your system. Відкрийте сторінку випуску й виберіть інсталятор для своєї системи. - Open Download Page Відкрити сторінку завантаження - PhotoCraft is up to date. PhotoCraft оновлено до останньої версії. - Could not check for updates. Не вдалося перевірити оновлення. - Updates have not been checked yet. Оновлення ще не перевірялися. - Check Again Перевірити знову Automatically Check for Updates Автоматично перевіряти оновлення - Installed version: {version} Встановлена версія: {version} - PhotoCraft {version} is available. Доступна версія PhotoCraft {version}. Paints from the History panel's source state Малює з вихідного стану панелі «Історія» Sets the source for the history brush Задає джерело для пензля історії Highlight Mode Режим світлих тонів diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index e2971f975f..f1cf200164 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -3794,17 +3794,8 @@ curves Smooth Làm mượt Kept {name}: written by another application Đã giữ {name}: do ứng dụng khác ghi Shadow Tint Sắc độ bóng tối Check for Updates… Kiểm tra bản cập nhật… - PhotoCraft Updates Bản cập nhật PhotoCraft - Checking for updates… Đang kiểm tra bản cập nhật… Open the release page to choose an installer for your system. Mở trang phát hành để chọn bộ cài đặt cho hệ thống của bạn. - Open Download Page Mở trang tải xuống - PhotoCraft is up to date. PhotoCraft đã được cập nhật. - Could not check for updates. Không thể kiểm tra bản cập nhật. - Updates have not been checked yet. Chưa kiểm tra bản cập nhật. - Check Again Kiểm tra lại Automatically Check for Updates Tự động kiểm tra bản cập nhật - Installed version: {version} Phiên bản đã cài: {version} - PhotoCraft {version} is available. PhotoCraft {version} đã có sẵn. Paints from the History panel's source state Vẽ từ trạng thái nguồn của bảng Lịch sử Sets the source for the history brush Đặt nguồn cho cọ lịch sử Highlight Mode Chế độ vùng sáng diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 4afdf897a3..c786c28712 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -2983,17 +2983,8 @@ curves Smooth 平滑 Kept {name}: written by another application 已保留 {name}:由其他应用程序写入 Shadow Tint 阴影色调 Check for Updates… 检查更新… - PhotoCraft Updates PhotoCraft 更新 - Checking for updates… 正在检查更新… Open the release page to choose an installer for your system. 打开发布页,选择适合您系统的安装包。 - Open Download Page 打开下载页面 - PhotoCraft is up to date. PhotoCraft 已是最新版本。 - Could not check for updates. 无法检查更新。 - Updates have not been checked yet. 尚未检查更新。 - Check Again 重新检查 Automatically Check for Updates 自动检查更新 - Installed version: {version} 已安装版本:{version} - PhotoCraft {version} is available. PhotoCraft {version} 已发布。 Paints from the History panel's source state 从历史记录面板的源状态绘画 Sets the source for the history brush 设置历史记录画笔的源 Highlight Mode 高光模式 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index d5b3f7fc8a..92bc98a709 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2944,17 +2944,8 @@ curves Smooth 平滑 Kept {name}: written by another application 已保留 {name}:由其他應用程式寫入 Shadow Tint 陰影色調 Check for Updates… 檢查更新… - PhotoCraft Updates PhotoCraft 更新 - Checking for updates… 正在檢查更新… Open the release page to choose an installer for your system. 開啟發佈頁,選擇適合您系統的安裝程式。 - Open Download Page 開啟下載頁面 - PhotoCraft is up to date. PhotoCraft 已是最新版本。 - Could not check for updates. 無法檢查更新。 - Updates have not been checked yet. 尚未檢查更新。 - Check Again 重新檢查 Automatically Check for Updates 自動檢查更新 - Installed version: {version} 已安裝版本:{version} - PhotoCraft {version} is available. PhotoCraft {version} 已發佈。 Paints from the History panel's source state 從步驟記錄面板的來源狀態繪畫 Sets the source for the history brush 設定步驟記錄筆刷的來源 Highlight Mode 亮部模式 diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index 2c5a1bea9a..c69a3ec099 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -49,6 +49,8 @@ pub(crate) fn check(app: &mut PhotocraftApp, _ctx: &egui::Context, params: Value if result.is_ok() || failed_to_start { app.ui.updates_open = true; app.updates_rt.startup_checked = true; + // A release the user dismissed is offered again by a manual check. + app.updates_rt.notified_version = None; } result } @@ -78,10 +80,12 @@ pub(crate) fn tick(app: &mut PhotocraftApp, ctx: &egui::Context) { } } +#[cfg(target_arch = "wasm32")] +pub(crate) fn show(_app: &mut PhotocraftApp, _ctx: &egui::Context) {} + +#[cfg(not(target_arch = "wasm32"))] pub(crate) fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { let mut download: Option = None; - - #[cfg(not(target_arch = "wasm32"))] { let was_open = app.updates_rt.updater.prompt_open(); app.updates_rt.updater.tick(ctx); @@ -97,74 +101,35 @@ pub(crate) fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { if was_open && !app.updates_rt.updater.prompt_open() { app.ui.updates_open = false; } - if app.updates_rt.updater.prompt_open() { - return; - } } - - if !app.ui.updates_open { - if let Some(url) = download { - crate::links::open(app, ctx, &url); - } - return; - } - let mut open = true; - let status = app.session.updates.status.clone(); - let mut retry = false; - egui::Window::new(tl!("PhotoCraft Updates")) - .id(egui::Id::unique("photocraft_updates")) - .open(&mut open) - .collapsible(false) - .resizable(false) - .default_width(380.0) - .show(ctx, |ui| { - let t = crate::theme::Tokens::get(ctx); - ui.label(crate::i18n::fmt(crate::i18n::t("Installed version: {version}"), &[("version", photocraft_engine::build_info::VERSION)])); - ui.add_space(8.0); - match &status { - Status::Checking => { - ui.horizontal(|ui| { - ui.spinner(); - ui.label(tl!("Checking for updates…")); - }); - } - Status::Available { release } => { - ui.label(crate::i18n::fmt(crate::i18n::t("PhotoCraft {version} is available."), &[("version", &release.version)])); - #[cfg(not(target_arch = "wasm32"))] - { - if crate::widgets::primary_button(ui, tl!("Update and Restart"), 180.0).clicked() { - app.updates_rt.updater.offer(release_of(release)); - } - if ui.button(tl!("Release Notes")).clicked() { - download = Some(release.url.clone()); - } - } - #[cfg(target_arch = "wasm32")] - if crate::widgets::primary_button(ui, tl!("Open Download Page"), 160.0).clicked() { - download = Some(release.url.clone()); - } - } - Status::UpToDate => { - ui.label(tl!("PhotoCraft is up to date.")); - } - Status::Failed { message } => { - ui.colored_label(t.warning, tl!("Could not check for updates.")); - ui.label(message); - } - Status::Idle => { - ui.label(tl!("Updates have not been checked yet.")); - } - } - if !matches!(status, Status::Checking) && ui.button(tl!("Check Again")).clicked() { - retry = true; - } - }); - app.ui.updates_open = open; if let Some(url) = download { crate::links::open(app, ctx, &url); } - if retry { - let _ = check(app, ctx, serde_json::json!({})); + if app.updates_rt.updater.prompt_open() { + return; + } + if app.ui.updates_open { + let dialog = craft_update::CheckResultDialog::new(&crate::UPDATE_APP, photocraft_engine::build_info::VERSION); + match dialog.show(ctx, &check_status(&app.session.updates.status)) { + craft_update::CheckResultResponse::None => {} + craft_update::CheckResultResponse::Close => app.ui.updates_open = false, + craft_update::CheckResultResponse::CheckAgain => { + let _ = check(app, ctx, serde_json::json!({})); + } + } + } +} + +/// The engine's check state as the result dialog shows it. An available release goes to the +/// startup prompt, so the dialog draws nothing for it. +#[cfg(not(target_arch = "wasm32"))] +fn check_status(status: &Status) -> craft_update::updater::Status { + use craft_update::updater::Status as Shown; + match status { + Status::Checking => Shown::Checking, + Status::UpToDate => Shown::UpToDate, + Status::Failed { message } => Shown::Failed(message.clone()), + Status::Idle | Status::Available { .. } => Shown::Idle, } }