wip: refactor

This commit is contained in:
reya
2024-12-31 09:34:33 +07:00
parent 5b78e6ad12
commit b2f2491889
14 changed files with 205 additions and 120 deletions
+10
View File
@@ -1,5 +1,6 @@
use coop_ui::{
button::{Button, ButtonVariants},
popup_menu::PopupMenuExt,
Icon, IconName, Sizable,
};
use gpui::*;
@@ -12,6 +13,8 @@ use crate::{
states::{metadata::MetadataRegistry, signal::SignalRegistry},
};
actions!(account, [ToDo]);
pub struct Account {
public_key: PublicKey,
metadata: Model<Option<Metadata>>,
@@ -83,5 +86,12 @@ impl Render for Account {
}
})
})
.popup_menu(move |this, _cx| {
this.menu("Profile", Box::new(ToDo))
.menu("Contacts", Box::new(ToDo))
.menu("Settings", Box::new(ToDo))
.separator()
.menu("Change account", Box::new(ToDo))
})
}
}