mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix a stale dialog box message
This commit is contained in:
parent
d56e58cb06
commit
1d3eaa4f9a
3 changed files with 26 additions and 11 deletions
|
|
@ -585,7 +585,7 @@ fn imef_cb(s: String::<4000>) {
|
||||||
#[xous::xous_main]
|
#[xous::xous_main]
|
||||||
fn xmain() -> ! {
|
fn xmain() -> ! {
|
||||||
log_server::init_wait().unwrap();
|
log_server::init_wait().unwrap();
|
||||||
log::set_max_level(log::LevelFilter::Debug);
|
log::set_max_level(log::LevelFilter::Info);
|
||||||
info!("my PID is {}", xous::process::id());
|
info!("my PID is {}", xous::process::id());
|
||||||
|
|
||||||
let xns = xous_names::XousNames::new().unwrap();
|
let xns = xous_names::XousNames::new().unwrap();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"rootpass.top": {
|
"rootkeys.bootpass": {
|
||||||
"en": "Password request\nDevice unlock\nSecurity: Low\nTip: a convenience PIN is OK.",
|
"en": "Password request\nDevice unlock\nSecurity: Low\nTip: a convenience PIN is OK.",
|
||||||
"zh": "输入密码\n解锁\n安全含义:低",
|
"zh": "输入密码\n解锁\n安全含义:低",
|
||||||
"en-audio": "Enter unlock password"
|
"en-audio": "Enter unlock password"
|
||||||
},
|
},
|
||||||
"update.top": {
|
"rootkeys.updatepass": {
|
||||||
"en": "Password request\nSoftware update key\nSecurity: Critical\nTip: use a phrase instead of a word.",
|
"en": "Password request\nSoftware update key\nSecurity: Critical\nTip: use a phrase instead of a word.",
|
||||||
"zh": "输入密码\n软件更新\n安全含义:至关重要 ",
|
"zh": "输入密码\n软件更新\n安全含义:至关重要 ",
|
||||||
"en-audio": "Enter update password. This password is critically important."
|
"en-audio": "Enter update password. This password is critically important."
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ fn xmain() -> ! {
|
||||||
use crate::implementation::RootKeys;
|
use crate::implementation::RootKeys;
|
||||||
|
|
||||||
log_server::init_wait().unwrap();
|
log_server::init_wait().unwrap();
|
||||||
log::set_max_level(log::LevelFilter::Debug);
|
log::set_max_level(log::LevelFilter::Info);
|
||||||
log::info!("my PID is {}", xous::process::id());
|
log::info!("my PID is {}", xous::process::id());
|
||||||
|
|
||||||
let xns = xous_names::XousNames::new().unwrap();
|
let xns = xous_names::XousNames::new().unwrap();
|
||||||
|
|
@ -143,7 +143,7 @@ fn xmain() -> ! {
|
||||||
let mut rootkeys_modal = Modal::new(
|
let mut rootkeys_modal = Modal::new(
|
||||||
crate::api::ROOTKEY_MODAL_NAME,
|
crate::api::ROOTKEY_MODAL_NAME,
|
||||||
ActionType::TextEntry(password_action),
|
ActionType::TextEntry(password_action),
|
||||||
Some(t!("rootpass.top", xous::LANG)),
|
Some(t!("rootkeys.bootpass", xous::LANG)),
|
||||||
None,
|
None,
|
||||||
GlyphStyle::Small,
|
GlyphStyle::Small,
|
||||||
4
|
4
|
||||||
|
|
@ -209,12 +209,27 @@ fn xmain() -> ! {
|
||||||
}),
|
}),
|
||||||
Some(Opcode::UxInitRequestPassword) => {
|
Some(Opcode::UxInitRequestPassword) => {
|
||||||
password_action.set_action_opcode(Opcode::UxInitPasswordReturn.to_u32().unwrap());
|
password_action.set_action_opcode(Opcode::UxInitPasswordReturn.to_u32().unwrap());
|
||||||
rootkeys_modal.modify(
|
if let Some(pwt) = keys.get_ux_password_type() {
|
||||||
Some(ActionType::TextEntry(password_action)),
|
match pwt {
|
||||||
Some(t!("rootpass.top", xous::LANG)), false,
|
PasswordType::Boot => {
|
||||||
None, true, None
|
rootkeys_modal.modify(
|
||||||
);
|
Some(ActionType::TextEntry(password_action)),
|
||||||
rootkeys_modal.activate();
|
Some(t!("rootkeys.bootpass", xous::LANG)), false,
|
||||||
|
None, true, None
|
||||||
|
);
|
||||||
|
}
|
||||||
|
PasswordType::Update => {
|
||||||
|
rootkeys_modal.modify(
|
||||||
|
Some(ActionType::TextEntry(password_action)),
|
||||||
|
Some(t!("rootkeys.updatepass", xous::LANG)), false,
|
||||||
|
None, true, None
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rootkeys_modal.activate();
|
||||||
|
} else {
|
||||||
|
log::error!("init password ux request without a password type requested!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Some(Opcode::UxInitPasswordReturn) => {
|
Some(Opcode::UxInitPasswordReturn) => {
|
||||||
// assume:
|
// assume:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue