feat: redesign the dock and tabbar (#22)
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

Reviewed-on: #22
This commit was merged in pull request #22.
This commit is contained in:
2026-09-25 08:37:18 +00:00
parent a85b5ee87b
commit e2bce4e074
26 changed files with 1046 additions and 1197 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ use gpui_component::{ActiveTheme, StyledExt, WindowExt, h_flex, v_flex};
use nostr::prelude::PublicKey;
use signed_core::Announcement;
use signed_state::ProfileStore;
use signed_ui::{UserAvatar, middle_truncate};
use signed_ui::{Avatar, middle_truncate};
pub(super) fn open_about_dialog(announcement: Announcement, window: &mut Window, cx: &mut App) {
window.open_dialog(cx, move |dialog, _window, cx| {
@@ -173,7 +173,7 @@ fn maintainers(maintainers: &[PublicKey], cx: &App) -> AnyElement {
.gap_2()
.items_center()
.min_w_0()
.child(UserAvatar::new(name.clone()).picture(picture))
.child(Avatar::new(name.clone()).picture(picture))
.child(
div()
.flex_1()
+4 -2
View File
@@ -106,8 +106,10 @@ impl RepoHistoryView {
// Same display name as the repo detail panel's title.
let repo_name = repo_display_name(self.store.read(cx));
let panel =
cx.new(|cx| CommitDiffView::new(worktree, repo_name, commit_id.into(), window, cx));
let store = self.store.clone();
let panel = cx.new(|cx| {
CommitDiffView::new(store, worktree, repo_name, commit_id.into(), window, cx)
});
dock_area.update(cx, |dock_area, cx| {
add_center_panel(dock_area, panel_handle(panel), window, cx);
+9 -4
View File
@@ -31,7 +31,7 @@ use signed_state::{
pr_proposes_checkout,
};
use signed_ui::{
CountBadge, DropdownButton, PixelAvatar, UserAvatar, copy_row, menu_copy_row, middle_truncate,
Avatar, CountBadge, DropdownButton, PixelAvatar, copy_row, menu_copy_row, middle_truncate,
ref_selector_trigger,
};
@@ -55,6 +55,7 @@ use crate::views::pull_requests::new::open_new_pull_panel;
use crate::views::repo::about::open_about_dialog;
use crate::views::send_patch::open_send_patch_panel;
use crate::views::tree::{TreeItemSeed, build_tree_items, sorted_worktree_paths};
use crate::views::{repo_tab_avatar, tab_title};
#[derive(Clone, Copy, PartialEq, Eq)]
enum RefKind {
@@ -1490,7 +1491,7 @@ impl RepoDetailView {
.child(
h_flex()
.gap_1()
.child(UserAvatar::new(owner_name.clone()).picture(owner_picture))
.child(Avatar::new(owner_name.clone()).picture(owner_picture))
.child(div().text_xs().whitespace_nowrap().child(owner_name)),
)
.when(!rest.is_empty(), |this| {
@@ -2031,7 +2032,7 @@ fn bound_repo_label(binding: &Nip34Binding, cx: &App) -> AnyElement {
h_flex()
.gap_1()
.text_color(cx.theme().foreground)
.child(UserAvatar::new(profile.name()).picture(profile.picture()))
.child(Avatar::new(profile.name()).picture(profile.picture()))
.child(profile.name()),
)
})
@@ -2054,7 +2055,11 @@ impl BasePanel for RepoDetailView {
impl Panel for RepoDetailView {
fn title(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
repo_display_name(self.store.read(cx))
let store = self.store.read(cx);
let name = repo_display_name(store);
let avatar = repo_tab_avatar(store, cx);
tab_title(avatar, name)
}
}