chore: Refine the UI (#102)

* update deps

* update window options

* linux title bar

* fix build

* .

* fix build

* rounded corners on linux

* .

* .

* fix i18n key

* fix change subject modal

* .

* update new account

* .

* update relay modal

* .

* fix i18n keys

---------

Co-authored-by: reya <reya@macbook.local>
This commit is contained in:
reya
2025-08-02 11:37:15 +07:00
committed by GitHub
co-authored by reya
parent 3cf9dde882
commit c188f12993
43 changed files with 2552 additions and 1790 deletions
+2 -16
View File
@@ -40,7 +40,7 @@ impl UserProfile {
})
}
pub fn on_load(&mut self, window: &mut Window, cx: &mut Context<Self>) {
pub fn load(&mut self, window: &mut Window, cx: &mut Context<Self>) {
// Skip if user isn't logged in
let Some(identity) = Identity::read_global(cx).public_key() else {
return;
@@ -100,11 +100,6 @@ impl UserProfile {
self.profile(cx).metadata().nip05
}
fn open_njump(&mut self, _window: &mut Window, cx: &mut App) {
let Ok(bech32) = self.public_key.to_bech32();
cx.open_url(&format!("https://njump.me/{bech32}"));
}
fn copy_pubkey(&mut self, window: &mut Window, cx: &mut Context<Self>) {
let Ok(bech32) = self.public_key.to_bech32();
let item = ClipboardItem::new_string(bech32);
@@ -221,7 +216,7 @@ impl Render for UserProfile {
.child(shared_bech32),
)
.child(
Button::new("copy-pubkey")
Button::new("copy")
.icon({
if self.copied {
IconName::CheckCircleFill
@@ -259,14 +254,5 @@ impl Render for UserProfile {
),
),
)
.child(
Button::new("open-njump")
.label(t!("profile.njump"))
.primary()
.small()
.on_click(cx.listener(move |this, _e, window, cx| {
this.open_njump(window, cx);
})),
)
}
}