From 7ac8fe5071c2d399f57d967700393716a1d79207 Mon Sep 17 00:00:00 2001 From: guowei0105 Date: Wed, 7 Jan 2026 15:11:02 +0800 Subject: [PATCH] wallpaper successfully added page --- core/embed/firmware/version.h | 2 +- core/src/trezor/lvglui/i18n/keys.py | 16 ++++-- core/src/trezor/lvglui/i18n/locales/de.py | 8 ++- core/src/trezor/lvglui/i18n/locales/en.py | 8 ++- core/src/trezor/lvglui/i18n/locales/es.py | 8 ++- core/src/trezor/lvglui/i18n/locales/fr.py | 8 ++- core/src/trezor/lvglui/i18n/locales/it.py | 8 ++- core/src/trezor/lvglui/i18n/locales/ja.py | 8 ++- core/src/trezor/lvglui/i18n/locales/ko.py | 8 ++- core/src/trezor/lvglui/i18n/locales/pt_br.py | 8 ++- core/src/trezor/lvglui/i18n/locales/ru.py | 8 ++- core/src/trezor/lvglui/i18n/locales/zh_cn.py | 8 ++- core/src/trezor/lvglui/i18n/locales/zh_hk.py | 8 ++- core/src/trezor/lvglui/scrs/homescreen.py | 33 ++++++++++-- core/src/trezor/lvglui/scrs/nftmanager.py | 55 ++++++++++++++------ 15 files changed, 148 insertions(+), 46 deletions(-) diff --git a/core/embed/firmware/version.h b/core/embed/firmware/version.h index 5d346aa2c..2ebaaaabf 100644 --- a/core/embed/firmware/version.h +++ b/core/embed/firmware/version.h @@ -9,7 +9,7 @@ #define FIX_VERSION_BUILD VERSION_BUILD #define ONEKEY_VERSION_MAJOR 4 -#define ONEKEY_VERSION_MINOR 18 +#define ONEKEY_VERSION_MINOR 19 #define ONEKEY_VERSION_PATCH 0 #define ONEKEY_VERSION_BUILD 0 diff --git a/core/src/trezor/lvglui/i18n/keys.py b/core/src/trezor/lvglui/i18n/keys.py index 5a1263655..dff3ccc08 100644 --- a/core/src/trezor/lvglui/i18n/keys.py +++ b/core/src/trezor/lvglui/i18n/keys.py @@ -2320,9 +2320,9 @@ # . Both methods meet cryptographic security standards. BUTTON__USE_MULTIPLE_SOURCES_OF_ENTROPY_DESC = 1050 # Set Language -TITLE_SET_LANGUAGE = 1051 +TITLE__SET_LANGUAGE = 1051 # Do you want to change language to {language}? -SUBTITLE_SET_LANGUAGE = 1052 +SUBTITLE__SET_LANGUAGE = 1052 # Set Auto-Lock TITLE_SET_AUTO_LOCK = 1053 # Do you want to change Auto-Lock time to {time}? @@ -2331,9 +2331,9 @@ TITLE_SET_AUTO_SHUTDOWN = 1055 # Do you want to change Auto-Shutdown time to {time}? SUBTITLE_SET_AUTO_SHUTDOWN = 1056 -# Do you want to open Keyboard Haptic ? +# Do you want to open Haptic ? SUBTITLE_OPEN_VIBRATION_HAPTIC = 1057 -# Do you want to close Keyboard Haptic ? +# Do you want to close Haptic ? SUBTITLE_CLOSE_VIBRATION_HAPTIC = 1058 # Do you want to switch PIN Keypad to default ? (The numbers on PIN keypad arr # anged in sequence) @@ -2359,4 +2359,12 @@ TITLE__DEVICE_PAIRED = 1067 # Please continue to complete the OneKey App Check & Update. TITLE__ALREADY_PAIRED_DESC = 1068 +# Set Successfully +TITLE__SET_SUCCESSFULLY = 1069 +# Apply +BUTTON__APPLY = 1070 +# Open +BUTTON_OPEN = 1071 +# Set Brightness +TITLE__SET_BRIGHTNESS = 1072 # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/de.py b/core/src/trezor/lvglui/i18n/locales/de.py index 0d288517c..ee8e09e17 100644 --- a/core/src/trezor/lvglui/i18n/locales/de.py +++ b/core/src/trezor/lvglui/i18n/locales/de.py @@ -1057,8 +1057,8 @@ "Möchtest du die Auto-Sperrzeit auf {time} ändern?", "Automatische Abschaltung festlegen", "Möchten Sie die automatische Abschaltzeit auf {time} ändern?", - "Möchten Sie die Tastaturhaptik öffnen?", - "Möchtest du die Tastaturhaptik deaktivieren?", + "Möchten Sie die Haptik öffnen?", + "Möchten Sie die Haptik schließen?", "Möchten Sie die PIN-Tastatur auf die Standardeinstellung umstellen? (Die Zahlen auf der PIN-Tastatur sind der Reihe nach angeordnet)", "Möchten Sie die PIN-Tastatur auf zufällige Anordnung umstellen? (Die Zahlen auf der PIN-Tastatur werden zufällig angeordnet)", "Möchten Sie die USB-Sperre öffnen? (Das Gerät wird bei jedem Ein- oder Ausstecken eines USB-Geräts automatisch gesperrt)", @@ -1069,5 +1069,9 @@ "Stellen Sie sicher, dass Ihr Gerät in der Nähe Ihres OneKey Pro ist, und versuchen Sie es dann erneut.", "Gerät gekoppelt", "Bitte fahre fort, um die OneKey App-Prüfung und -Aktualisierung abzuschließen.", + "Erfolgreich festgelegt", + "Anwenden", + "Öffnen", + "Helligkeit einstellen", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/en.py b/core/src/trezor/lvglui/i18n/locales/en.py index 0798ad1c0..eb43fda5d 100644 --- a/core/src/trezor/lvglui/i18n/locales/en.py +++ b/core/src/trezor/lvglui/i18n/locales/en.py @@ -1057,8 +1057,8 @@ "Do you want to change Auto-Lock time to {time}?", "Set Auto Shutdown", "Do you want to change Auto-Shutdown time to {time}?", - "Do you want to open Keyboard Haptic ?", - "Do you want to close Keyboard Haptic ?", + "Do you want to open Haptic ?", + "Do you want to close Haptic ?", "Do you want to switch PIN Keypad to default ? (The numbers on PIN keypad arranged in sequence)", "Do you want to switch PIN Keypad to randomized ? (The numbers on PIN keypad arrange randomly)", "Do you want to open USB Lock ? (Device will auto lock every time when USB plug or unplug)", @@ -1069,5 +1069,9 @@ "Make sure your device is near your OneKey Pro, then try again.", "Device Paired", "Please continue to complete the OneKey App Check & Update.", + "Set Successfully", + "Apply", + "Open", + "Set Brightness", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/es.py b/core/src/trezor/lvglui/i18n/locales/es.py index 2e3e15225..53801a9e3 100644 --- a/core/src/trezor/lvglui/i18n/locales/es.py +++ b/core/src/trezor/lvglui/i18n/locales/es.py @@ -1057,8 +1057,8 @@ "¿Quieres cambiar el tiempo de Bloqueo automático a {time}?", "Configurar apagado automático", "¿Deseas cambiar el tiempo de apagado automático a {time}?", - "¿Quieres activar la respuesta háptica del teclado?", - "¿Quieres desactivar la respuesta háptica del teclado?", + "¿Quieres abrir la respuesta háptica?", + "¿Quieres cerrar la respuesta háptica?", "¿Deseas cambiar el teclado PIN al predeterminado? (Los números en el teclado PIN están ordenados en secuencia)", "¿Deseas cambiar el teclado PIN a aleatorio? (Los números del teclado PIN se disponen de forma aleatoria)", "¿Quieres abrir USB Lock? (El dispositivo se bloqueará automáticamente cada vez que se conecte o desconecte un USB)", @@ -1069,5 +1069,9 @@ "Asegúrate de que tu dispositivo esté cerca de tu OneKey Pro y vuelve a intentarlo.", "Dispositivo emparejado", "Por favor, continúa para completar la comprobación y actualización de OneKey App.", + "Configurado correctamente", + "Aplicar", + "Abrir", + "Establecer brillo", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/fr.py b/core/src/trezor/lvglui/i18n/locales/fr.py index 2ecfc084a..49e2dc93f 100644 --- a/core/src/trezor/lvglui/i18n/locales/fr.py +++ b/core/src/trezor/lvglui/i18n/locales/fr.py @@ -1057,8 +1057,8 @@ "Voulez-vous modifier le délai de verrouillage automatique à {time} ?", "Définir l'arrêt automatique", "Voulez-vous modifier l'heure d'arrêt automatique à {time} ?", - "Voulez-vous ouvrir le retour haptique du clavier ?", - "Voulez-vous fermer le retour haptique du clavier ?", + "Voulez-vous ouvrir le retour haptique ?", + "Voulez-vous fermer le retour haptique ?", "Voulez-vous rétablir le clavier PIN par défaut ? (Les chiffres du clavier PIN sont disposés en séquence)", "Voulez-vous activer le clavier PIN aléatoire ? (Les chiffres du clavier PIN sont disposés de manière aléatoire)", "Voulez-vous activer le verrouillage USB ? (L'appareil se verrouillera automatiquement à chaque branchement ou débranchement USB)", @@ -1069,5 +1069,9 @@ "Assurez-vous que votre appareil est à proximité de votre OneKey Pro, puis réessayez.", "Appareil jumelé", "Veuillez continuer pour terminer la vérification et la mise à jour de OneKey App.", + "Défini avec succès", + "Appliquer", + "Ouvrir", + "Régler la luminosité", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/it.py b/core/src/trezor/lvglui/i18n/locales/it.py index dff55d2a4..f1f3918be 100644 --- a/core/src/trezor/lvglui/i18n/locales/it.py +++ b/core/src/trezor/lvglui/i18n/locales/it.py @@ -1057,8 +1057,8 @@ "Vuoi cambiare il tempo di Blocco automatico a {time}?", "Imposta spegnimento automatico", "Vuoi cambiare il tempo di spegnimento automatico a {time}?", - "Vuoi attivare il feedback aptico della tastiera?", - "Vuoi disattivare il feedback aptico della tastiera?", + "Vuoi aprire il feedback aptico?", + "Vuoi chiudere il feedback aptico?", "Vuoi ripristinare il tastierino PIN alle impostazioni predefinite? (I numeri sul tastierino PIN sono disposti in sequenza)", "Vuoi impostare il tastierino PIN su modalità casuale? (I numeri sul tastierino PIN sono disposti in modo casuale)", "Vuoi aprire Blocco USB? (Il dispositivo si bloccherà automaticamente ogni volta che la USB viene collegata o scollegata)", @@ -1069,5 +1069,9 @@ "Assicurati che il tuo dispositivo sia vicino al tuo OneKey Pro, quindi riprova.", "Dispositivo associato", "Continua per completare il controllo e l’aggiornamento di OneKey App.", + "Impostazione riuscita", + "Fare domanda a", + "Apri", + "Imposta luminosità", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/ja.py b/core/src/trezor/lvglui/i18n/locales/ja.py index 5771c9182..95bf8046a 100644 --- a/core/src/trezor/lvglui/i18n/locales/ja.py +++ b/core/src/trezor/lvglui/i18n/locales/ja.py @@ -1057,8 +1057,8 @@ "自動ロック時間を{time}に変更しますか?", "自動シャットダウンを設定", "自動シャットダウン時刻を{time}に変更しますか?", - "キーボードの触覚フィードバックを開きますか?", - "キーボードの触覚フィードバックを終了しますか?", + "触覚フィードバックを開きますか?", + "触覚フィードバックを閉じますか?", "PINキーパッドをデフォルトに切り替えますか?(PINキーパッドの数字が順番に配置されます)", "PINキーパッドをランダム配置に切り替えますか?(PINキーパッドの数字がランダムに配置されます)", "USB ロックを有効にしますか?(USB の抜き差しの度にデバイスが自動的にロックされます)", @@ -1069,5 +1069,9 @@ "デバイスがOneKey Proの近くにあることを確認してから、もう一度お試しください。", "デバイスがペアリングされました", "OneKey App のチェックとアップデートを続けて完了してください。", + "設定が完了しました", + "適用する", + "開く", + "明るさを設定する", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/ko.py b/core/src/trezor/lvglui/i18n/locales/ko.py index 3933d5edf..3c1041f9f 100644 --- a/core/src/trezor/lvglui/i18n/locales/ko.py +++ b/core/src/trezor/lvglui/i18n/locales/ko.py @@ -1057,8 +1057,8 @@ "자동 잠금 시간을 {time}(으)로 변경하시겠습니까?", "자동 종료 설정", "자동 종료 시간을 {time}(으)로 변경하시겠습니까?", - "키보드 햅틱을 켜시겠어요?", - "키보드 햅틱을 종료하시겠습니까?", + "햅틱을 여시겠습니까?", + "햅틱을 닫으시겠습니까?", "PIN 키패드를 기본 설정으로 전환하시겠습니까? (PIN 키패드의 숫자가 순서대로 배열됩니다)", "PIN 키패드를 무작위로 전환하시겠습니까? (PIN 키패드의 숫자가 무작위로 배열됩니다)", "USB 잠금을 열겠습니까? (USB를 꽂거나 빼면 매번 기기가 자동으로 잠깁니다)", @@ -1069,5 +1069,9 @@ "기기가 OneKey Pro 가까이에 있는지 확인한 후 다시 시도하세요.", "장치가 페어링됨", "OneKey App 확인 및 업데이트를 계속 완료해 주세요.", + "설정 완료", + "적용하다", + "열기", + "밝기 설정", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/pt_br.py b/core/src/trezor/lvglui/i18n/locales/pt_br.py index 41fcaa5f4..28cbd6eec 100644 --- a/core/src/trezor/lvglui/i18n/locales/pt_br.py +++ b/core/src/trezor/lvglui/i18n/locales/pt_br.py @@ -1057,8 +1057,8 @@ "Deseja alterar o tempo de Bloqueio Automático para {time}?", "Definir Desligamento Automático", "Deseja alterar o tempo de Desligamento Automático para {time}?", - "Deseja abrir o Teclado Háptico?", - "Deseja fechar o Teclado Háptico?", + "Deseja abrir o Háptico?", + "Deseja fechar o Háptico?", "Deseja alternar o Teclado de PIN para o padrão? (Os números no teclado de PIN organizados em sequência)", "Deseja alternar o Teclado de PIN para aleatório? (Os números no teclado de PIN são organizados aleatoriamente)", "Deseja abrir o Bloqueio USB? (O dispositivo será bloqueado automaticamente toda vez que o USB for conectado ou desconectado)", @@ -1069,5 +1069,9 @@ "Certifique-se de que seu dispositivo esteja próximo ao seu OneKey Pro e tente novamente.", "Dispositivo Pareado", "Continue para concluir a Verificação e Atualização do OneKey App.", + "Definido com Sucesso", + "Aplicar", + "Abrir", + "Definir Brilho", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/ru.py b/core/src/trezor/lvglui/i18n/locales/ru.py index 13ad75f06..2a15f4f28 100644 --- a/core/src/trezor/lvglui/i18n/locales/ru.py +++ b/core/src/trezor/lvglui/i18n/locales/ru.py @@ -1057,8 +1057,8 @@ "Вы хотите изменить время автоблокировки на {time}?", "Установить автоматическое выключение", "Вы хотите изменить время автоматического выключения на {time}?", - "Вы хотите открыть тактильную обратную связь клавиатуры?", - "Вы хотите закрыть тактильную обратную связь клавиатуры?", + "Вы хотите открыть тактильную обратную связь?", + "Вы хотите закрыть тактильную обратную связь?", "Вы хотите переключить клавиатуру PIN-кода на стандартную? (Цифры на клавиатуре PIN-кода расположены последовательно)", "Вы хотите переключить клавиатуру PIN-кода на случайный порядок? (Цифры на клавиатуре PIN-кода располагаются в случайном порядке)", "Вы хотите включить блокировку USB? (Устройство будет автоматически блокироваться каждый раз при подключении или отключении USB)", @@ -1069,5 +1069,9 @@ "Убедитесь, что ваше устройство находится рядом с OneKey Pro, затем повторите попытку.", "Устройство подключено", "Пожалуйста, продолжите проверку и обновление OneKey App.", + "Успешно установлено", + "Применять", + "Открыть", + "Установить яркость", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/zh_cn.py b/core/src/trezor/lvglui/i18n/locales/zh_cn.py index e621b5079..a68ee9211 100644 --- a/core/src/trezor/lvglui/i18n/locales/zh_cn.py +++ b/core/src/trezor/lvglui/i18n/locales/zh_cn.py @@ -1057,8 +1057,8 @@ "您要将自动锁定时间更改为 {time} 吗?", "设置自动关机", "您想将自动关机时间更改为 {time} 吗?", - "您要打开键盘触感反馈吗?", - "您要关闭键盘触感反馈吗?", + "您要打开触感反馈吗?", + "您要关闭触感反馈吗?", "您要将 PIN 键盘切换为默认设置吗?(PIN 键盘上的数字按顺序排列)", "您想将 PIN 键盘切换为随机排列吗?(PIN 键盘上的数字将随机排列)", "您要开启 USB 锁定吗?(每次插入或拔出 USB 时设备将自动锁定)", @@ -1069,5 +1069,9 @@ "确保您的设备靠近 OneKey Pro,然后重试。", "设备已配对", "请继续完成 OneKey App 检查和更新。", + "设置成功", + "应用", + "开启", + "设置亮度", ] # fmt: on diff --git a/core/src/trezor/lvglui/i18n/locales/zh_hk.py b/core/src/trezor/lvglui/i18n/locales/zh_hk.py index 7c0c841e6..90730653c 100644 --- a/core/src/trezor/lvglui/i18n/locales/zh_hk.py +++ b/core/src/trezor/lvglui/i18n/locales/zh_hk.py @@ -1057,8 +1057,8 @@ "您想將自動鎖定時間更改為 {time} 嗎?", "設定自動關機", "您想將自動關機時間更改為 {time} 嗎?", - "你想開啟鍵盤觸感回饋嗎?", - "您想關閉鍵盤觸感反饋嗎?", + "你想開啟觸感回饋嗎?", + "你想關閉觸感回饋嗎?", "您想將 PIN 鍵盤切換為預設嗎?(PIN 鍵盤上的數字按順序排列)", "您想將 PIN 鍵盤切換為隨機排列嗎?(PIN 鍵盤上的數字會隨機排列)", "您想開啟 USB 鎖定功能嗎?(每次插入或拔出 USB 時,裝置將自動鎖定)", @@ -1069,5 +1069,9 @@ "請確保您的設備靠近 OneKey Pro,然後重試。", "設備已配對", "請繼續完成 OneKey App 檢查及更新。", + "設定成功", + "应用", + "開啟", + "設定亮度", ] # fmt: on diff --git a/core/src/trezor/lvglui/scrs/homescreen.py b/core/src/trezor/lvglui/scrs/homescreen.py index 12decfab9..d762493d8 100644 --- a/core/src/trezor/lvglui/scrs/homescreen.py +++ b/core/src/trezor/lvglui/scrs/homescreen.py @@ -99,6 +99,25 @@ def _unlink_if_exists(path: str | None) -> None: io.fatfs.unlink(path) +_SUCCESS_ICON = "A:/res/success.png" + + +def _show_set_success_and_return(callback) -> None: + success_screen = FullSizeWindow( + _(i18n_keys.TITLE__SET_SUCCESSFULLY), + None, + icon_path=_SUCCESS_ICON, + anim_dir=0, + ) + + async def _delayed_callback(): + await loop.sleep(1400) + success_screen.destroy(delay_ms=100) + callback() + + workflow.spawn(_delayed_callback()) + + def _normalize_wallpaper_src(raw, *, allow_default: bool = True, default=None) -> str: if isinstance(raw, bytes): if hasattr(raw, "decode"): @@ -4160,8 +4179,11 @@ def on_click_ext(self, target): if current_wallpaper: apply_lock_wallpaper(current_wallpaper) - if self.prev_scr is not None: - self._return_to_previous_screen() + def _do_return(): + if self.prev_scr is not None: + self._return_to_previous_screen() + + _show_set_success_and_return(_do_return) def _return_to_previous_screen(self): if not self.prev_scr: @@ -6676,8 +6698,11 @@ def on_click_ext(self, target): if current_wallpaper: apply_home_wallpaper(current_wallpaper) - if self.prev_scr is not None: - self._return_to_previous_screen() + def _do_return(): + if self.prev_scr is not None: + self._return_to_previous_screen() + + _show_set_success_and_return(_do_return) def _return_to_previous_screen(self): if not self.prev_scr: diff --git a/core/src/trezor/lvglui/scrs/nftmanager.py b/core/src/trezor/lvglui/scrs/nftmanager.py index 31e9dbaab..d7b7767a1 100644 --- a/core/src/trezor/lvglui/scrs/nftmanager.py +++ b/core/src/trezor/lvglui/scrs/nftmanager.py @@ -14,7 +14,7 @@ font_GeistSemiBold38, font_GeistSemiBold48, ) -from .common import AnimScreen, Screen, lv +from .common import AnimScreen, FullSizeWindow, Screen, lv from .components.banner import LEVEL, Banner from .components.button import NormalButton from .components.container import ContainerGrid @@ -41,6 +41,25 @@ _K1 = "nft_preview_container" _K2 = "nft_device_name" _K3 = "nft_bluetooth_name" +_SUCCESS_ICON = "A:/res/success.png" + + +def _show_set_success_and_return(callback: Callable[[], None]) -> None: + from trezor import loop + + success_screen = FullSizeWindow( + _(i18n_keys.TITLE__SET_SUCCESSFULLY), + None, + icon_path=_SUCCESS_ICON, + anim_dir=0, + ) + + async def _delayed_callback(): + await loop.sleep(1400) + success_screen.destroy(delay_ms=100) + callback() + + workflow.spawn(_delayed_callback()) def _cached_style(_name: str, factory: Callable[[], StyleWrapper]) -> StyleWrapper: @@ -647,13 +666,16 @@ def eventhandler(self, event_obj): apply_lock_wallpaper(self.nft_path) - MainScreen = _get_main_screen_cls() - main_screen = ( - MainScreen._instance - if hasattr(MainScreen, "_instance") and MainScreen._instance - else MainScreen() - ) - self.load_screen(main_screen, destroy_self=True) + def _return_to_main(): + MainScreen = _get_main_screen_cls() + main_screen = ( + MainScreen._instance + if hasattr(MainScreen, "_instance") and MainScreen._instance + else MainScreen() + ) + self.load_screen(main_screen, destroy_self=True) + + _show_set_success_and_return(_return_to_main) return # Sync with current Display toggle if it changed while this screen is open refresh_preview_device_labels( @@ -763,13 +785,16 @@ def eventhandler(self, event_obj): apply_home_wallpaper(self.current_wallpaper_path) - MainScreen = _get_main_screen_cls() - main_screen = ( - MainScreen._instance - if hasattr(MainScreen, "_instance") and MainScreen._instance - else MainScreen() - ) - self.load_screen(main_screen, destroy_self=True) + def _return_to_main(): + MainScreen = _get_main_screen_cls() + main_screen = ( + MainScreen._instance + if hasattr(MainScreen, "_instance") and MainScreen._instance + else MainScreen() + ) + self.load_screen(main_screen, destroy_self=True) + + _show_set_success_and_return(_return_to_main) return else: if hasattr(self, "blur_button") and target == self.blur_button: