mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
implement #269
This commit is contained in:
parent
5370c333da
commit
2f30e1b50a
2 changed files with 37 additions and 0 deletions
|
|
@ -6,6 +6,13 @@
|
|||
"ja": "Shellchat",
|
||||
"zh": "外壳聊天"
|
||||
},
|
||||
"secnote.basis": {
|
||||
"en": "Basis: ",
|
||||
"en-tts": "Basis: ",
|
||||
"fr": "La base: ",
|
||||
"ja": "基底: ",
|
||||
"zh": "基: "
|
||||
},
|
||||
"backup.confirm": {
|
||||
"en": "Prepare for PDDB and root key backup?\n\nThe process cannot be aborted once started.",
|
||||
"en-tts": "Prepare for PDDB and root key backup?\n\nThe process cannot be aborted once started.",
|
||||
|
|
|
|||
|
|
@ -766,6 +766,36 @@ fn wrapped_main() -> ! {
|
|||
}
|
||||
});
|
||||
|
||||
// this thread handles updating the PDDB basis list
|
||||
thread::spawn({
|
||||
let sec_notes = sec_notes.clone();
|
||||
move || {
|
||||
let pddb = pddb::Pddb::new();
|
||||
loop {
|
||||
// this blocks until there is a change in the basis list
|
||||
let mut basis_list_vec = pddb.monitor_basis();
|
||||
|
||||
// the key may or may not be there, but remove it in case it is
|
||||
sec_notes.lock().unwrap().remove(&"secnote.basis".to_string());
|
||||
|
||||
// only if there are more bases open than just the .System basis, insert a new key
|
||||
if basis_list_vec.len() > 1 {
|
||||
let mut new_list_str = t!("secnote.basis", xous::LANG).to_string();
|
||||
// initially, just concatenate all the basis names...
|
||||
basis_list_vec.reverse(); // reverse the order so the highest priority basis is on the left.
|
||||
for basis in basis_list_vec {
|
||||
new_list_str.push_str(&basis);
|
||||
if basis != pddb::PDDB_DEFAULT_SYSTEM_BASIS {
|
||||
new_list_str.push_str(" > ");
|
||||
}
|
||||
}
|
||||
|
||||
sec_notes.lock().unwrap().insert("secnote.basis".to_string(), new_list_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// storage for wifi bars
|
||||
let mut wifi_bars: [PixelColor; 5] = [PixelColor::Light, PixelColor::Light, PixelColor::Light, PixelColor::Light, PixelColor::Light];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue