Add wallet alias in window title

This commit is contained in:
edouardparis 2025-05-19 18:46:41 +02:00
parent 381421038b
commit 36fb3d8775
2 changed files with 11 additions and 1 deletions

View File

@ -182,6 +182,15 @@ impl App {
)
}
pub fn title(&self) -> String {
if let Some(alias) = &self.wallet.alias {
if !alias.is_empty() {
return format!("- {}", alias);
}
}
String::new()
}
fn set_current_panel(&mut self, menu: Menu) -> Task<Message> {
self.panels.current_mut().interrupt();

View File

@ -135,8 +135,9 @@ async fn ctrl_c() -> Result<(), ()> {
impl GUI {
fn title(&self) -> String {
match self.state {
match &self.state {
State::Installer(_) => format!("Liana v{} Installer", VERSION),
State::App(a) => format!("Liana v{} {}", VERSION, a.title()),
_ => format!("Liana v{}", VERSION),
}
}