reintroduce account management

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-06-23 19:46:58 -04:00
parent ac0821db79
commit 6afb618089
9 changed files with 181 additions and 21 deletions

View File

@@ -1,5 +1,8 @@
use egui::{Response, RichText};
use enostr::NoteId;
use std::fmt;
use std::fmt::{self};
use crate::{ui::AccountManagementView, Damus};
/// App routing. These describe different places you can go inside Notedeck.
#[derive(Clone, Debug)]
@@ -22,3 +25,22 @@ impl fmt::Display for Route {
}
}
}
impl Route {
pub fn show_global_popup(&self, app: &mut Damus, ui: &mut egui::Ui) -> Option<Response> {
match self {
Route::ManageAccount => AccountManagementView::ui(app, ui),
_ => None,
}
}
pub fn title(&self) -> RichText {
match self {
Route::ManageAccount => RichText::new("Manage Account").size(24.0),
Route::Thread(_) => RichText::new("Thread"),
Route::Reply(_) => RichText::new("Reply"),
Route::Relays => RichText::new("Relays"),
Route::Timeline(_) => RichText::new("Timeline"),
}
}
}