From 184bb8405f0733781e7b357fb2acc664459836fc Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 10 Aug 2021 03:04:03 +0800 Subject: [PATCH] getting closer to a finalized flow. --- services/root-keys/locales/i18n.json | 4 ++-- services/root-keys/src/implementation.rs | 2 +- services/root-keys/src/main.rs | 13 +++---------- services/status/locales/i18n.json | 4 ++-- services/status/src/main.rs | 2 +- 5 files changed, 9 insertions(+), 16 deletions(-) diff --git a/services/root-keys/locales/i18n.json b/services/root-keys/locales/i18n.json index c810b2f78..5b3f53262 100644 --- a/services/root-keys/locales/i18n.json +++ b/services/root-keys/locales/i18n.json @@ -70,8 +70,8 @@ "en-audio": "Committing signatures. This may take a while, don't reset or sleep the device." }, "rootkeys.init.finished": { - "en": "Preparing to reboot...", - "zh": "准备重启...", + "en": "Preparing to reboot...\n\n", + "zh": "准备重启...\n\n", "en-audio": "Preparing to reboot." }, "rootkeys.init.fail_verify": { diff --git a/services/root-keys/src/implementation.rs b/services/root-keys/src/implementation.rs index be855aa24..3090c0134 100644 --- a/services/root-keys/src/implementation.rs +++ b/services/root-keys/src/implementation.rs @@ -938,7 +938,7 @@ impl<'a> RootKeys { pb.update_text(t!("rootkeys.init.finished", xous::LANG)); pb.set_percentage(100); - self.ticktimer.sleep_ms(1000).expect("couldn't show final message"); + self.ticktimer.sleep_ms(2000).expect("couldn't show final message"); Ok(()) } diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 1de536458..d094bde03 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -198,7 +198,7 @@ fn xmain() -> ! { } else { // overall flow: // - setup the init - // -------> TODO: add an abort option here, in case someone clicked on this item out of curiosity + // - check that the user is ready to proceed // - prompt for root password // - prompt for boot password // - create the keys @@ -316,15 +316,8 @@ fn xmain() -> ! { // we also need to include a command that does the reboot. match result { Ok(_) => { - dismiss_modal_action.set_action_opcode(Opcode::UxGutter.to_u32().unwrap()); - rootkeys_modal.modify( - Some(ActionType::Notification(dismiss_modal_action)), - Some(t!("rootkeys.init.finished", xous::LANG)), false, - None, false, None); - rootkeys_modal.activate(); - xous::yield_slice(); - - // TODO: insert the reboot code here + + keys.finish_key_init(); } Err(RootkeyResult::AlignmentError) => { dismiss_modal_action.set_action_opcode(Opcode::UxGutter.to_u32().unwrap()); diff --git a/services/status/locales/i18n.json b/services/status/locales/i18n.json index dcffba525..0304a1fd4 100644 --- a/services/status/locales/i18n.json +++ b/services/status/locales/i18n.json @@ -15,9 +15,9 @@ "en-audio": "Invalid key state" }, "secnote.no_keys": { - "en": " Keystore uninitialized", + "en": " Root keys uninitialized", "zh": "密钥未初始化", - "en-audio": "Keystore unitialized" + "en-audio": "Root keys unitialized" }, "secnote.allclear": { "en": " No security warnings", diff --git a/services/status/src/main.rs b/services/status/src/main.rs index 6682db5dc..68c365aaa 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -225,7 +225,7 @@ fn xmain() -> ! { } else { stats_interval = 4; batt_interval = 4; - secnotes_interval = 2; + secnotes_interval = 4; } let mut battstats_phase = true; let mut needs_redraw = false;