Replace dock shell with titlebar repository tabs
- Move repository navigation from the dock sidebar to titlebar tabs. - Route main and detail panels through Workspace. - Move sign-in into the main panel and remove unlinked navigation.
This commit is contained in:
@@ -7,7 +7,6 @@ use gpui::{
|
||||
use gpui_native_kit::avatar::Avatar;
|
||||
use gpui_native_kit::common::{Sizable as _, h_flex, v_flex};
|
||||
use gpui_native_kit::icons::Icon;
|
||||
use gpui_native_kit::layout::dock::DockState;
|
||||
use gpui_native_kit::theme::{ActiveTheme as _, TextRole, Typeset as _};
|
||||
use metadata::ProfileDirectory;
|
||||
use signed_core::Announcement;
|
||||
@@ -15,6 +14,7 @@ use signed_state::{RepoListStore, Timestamp};
|
||||
use utils::relative_time;
|
||||
|
||||
use crate::repo::actions::open_repo_panel;
|
||||
use crate::workspace::Workspace;
|
||||
|
||||
const RECENT_COUNT: usize = 10;
|
||||
|
||||
@@ -64,12 +64,12 @@ pub(super) fn render_card(
|
||||
last_activity: Option<Timestamp>,
|
||||
announcements: &[Announcement],
|
||||
directory: &Entity<ProfileDirectory>,
|
||||
dock: &WeakEntity<DockState>,
|
||||
workspace: &WeakEntity<Workspace>,
|
||||
cx: &mut gpui::App,
|
||||
) -> AnyElement {
|
||||
let owner = directory.read(cx).profile(&announcement.owner, cx);
|
||||
let owner_name = owner.name();
|
||||
let dock = dock.clone();
|
||||
let workspace = workspace.clone();
|
||||
let announcement = announcement.clone();
|
||||
|
||||
let name = announcement
|
||||
@@ -184,7 +184,13 @@ pub(super) fn render_card(
|
||||
),
|
||||
)
|
||||
.on_click(move |_, window, cx| {
|
||||
open_repo_panel(&dock, &announcement.addr(), Some(&announcement), window, cx);
|
||||
open_repo_panel(
|
||||
&workspace,
|
||||
&announcement.addr(),
|
||||
Some(&announcement),
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
})
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user