This commit is contained in:
2026-10-21 16:20:51 +07:00
parent d0ad1a6f57
commit d7160e196e
46 changed files with 2307 additions and 1534 deletions
+11 -13
View File
@@ -5,16 +5,15 @@ use gpui::{
Stateful, Styled, div, px,
};
use gpui_kit::assets::IconName;
use gpui_kit::component::avatar::Avatar;
use gpui_kit::component::button::{Button, ButtonVariants};
use gpui_kit::component::menu::DropdownMenu;
use gpui_kit::component::{Disableable, Selectable, Sizable, h_flex};
use nostr_sdk::prelude::*;
use ui::TABBAR_HEIGHT;
use ui::TRAFFIC_LIGHT_PADDING;
use ui::Avatar;
use super::Sidebar;
use crate::Command;
use crate::dock::TAB_BAR_HEIGHT;
impl Sidebar {
pub(super) fn render_user(
@@ -29,20 +28,19 @@ impl Sidebar {
h_flex()
.id("sidebar-user")
.w_full()
.h(TABBAR_HEIGHT)
.h(TAB_BAR_HEIGHT)
.flex_shrink_0()
.items_center()
.gap(px(ui::SPACE))
.gap_2()
.px_2()
.when(cfg!(target_os = "macos"), |this| {
this.pl(px(TRAFFIC_LIGHT_PADDING))
})
.when(cfg!(target_os = "macos"), |this| this.pl(px(80.)))
.child(
Button::new("current-user")
.child(match avatar.clone() {
Some(picture) => Avatar::new().src(picture).small().into_any_element(),
None => Avatar::new().small().into_any_element(),
})
.child(
Avatar::new(avatar.clone())
.seed(profile.avatar_seed())
.small(),
)
.small()
.dropdown_caret(true)
.compact()
@@ -127,7 +125,7 @@ impl Sidebar {
let staged = updater.read(cx).staged();
h_flex()
.gap(px(ui::SPACE))
.gap_2()
.when(!up_to_date, |this| {
this.child(
Button::new("update")