mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +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]
|
||||
fn xmain() -> ! {
|
||||
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());
|
||||
|
||||
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.",
|
||||
"zh": "输入密码\n解锁\n安全含义:低",
|
||||
"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.",
|
||||
"zh": "输入密码\n软件更新\n安全含义:至关重要 ",
|
||||
"en-audio": "Enter update password. This password is critically important."
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ fn xmain() -> ! {
|
|||
use crate::implementation::RootKeys;
|
||||
|
||||
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());
|
||||
|
||||
let xns = xous_names::XousNames::new().unwrap();
|
||||
|
|
@ -143,7 +143,7 @@ fn xmain() -> ! {
|
|||
let mut rootkeys_modal = Modal::new(
|
||||
crate::api::ROOTKEY_MODAL_NAME,
|
||||
ActionType::TextEntry(password_action),
|
||||
Some(t!("rootpass.top", xous::LANG)),
|
||||
Some(t!("rootkeys.bootpass", xous::LANG)),
|
||||
None,
|
||||
GlyphStyle::Small,
|
||||
4
|
||||
|
|
@ -209,12 +209,27 @@ fn xmain() -> ! {
|
|||
}),
|
||||
Some(Opcode::UxInitRequestPassword) => {
|
||||
password_action.set_action_opcode(Opcode::UxInitPasswordReturn.to_u32().unwrap());
|
||||
rootkeys_modal.modify(
|
||||
Some(ActionType::TextEntry(password_action)),
|
||||
Some(t!("rootpass.top", xous::LANG)), false,
|
||||
None, true, None
|
||||
);
|
||||
rootkeys_modal.activate();
|
||||
if let Some(pwt) = keys.get_ux_password_type() {
|
||||
match pwt {
|
||||
PasswordType::Boot => {
|
||||
rootkeys_modal.modify(
|
||||
Some(ActionType::TextEntry(password_action)),
|
||||
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) => {
|
||||
// assume:
|
||||
|
|
|
|||
Loading…
Reference in a new issue