update dock
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
||||
use dock::{BasePanel, DockArea, DockPlacement, Panel, PanelEvent, panel_handle};
|
||||
use gpui::prelude::*;
|
||||
use gpui::{
|
||||
AnyElement, App, Context, Entity, EventEmitter, FocusHandle, Focusable, Pixels, Render,
|
||||
SharedString, Size, Subscription, WeakEntity, Window, div, px, size,
|
||||
};
|
||||
use gpui_component::avatar::Avatar;
|
||||
use dock::{DockArea, DockPlacement, Panel, PanelEvent};
|
||||
use gpui_component::scroll::Scrollbar;
|
||||
use gpui_component::{
|
||||
ActiveTheme, Sizable, StyledExt, VirtualListScrollHandle, h_flex, v_flex, v_virtual_list,
|
||||
@@ -68,7 +67,13 @@ impl RepoListView {
|
||||
|
||||
if let Some(dock_area) = dock_area.upgrade() {
|
||||
dock_area.update(cx, |dock_area, cx| {
|
||||
dock_area.add_panel(Arc::new(detail), DockPlacement::Center, window, cx);
|
||||
dock_area.add_panel_view(
|
||||
panel_handle(detail),
|
||||
DockPlacement::Center,
|
||||
None,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -166,11 +171,13 @@ impl RepoListView {
|
||||
}
|
||||
}
|
||||
|
||||
impl Panel for RepoListView {
|
||||
impl BasePanel for RepoListView {
|
||||
fn panel_name(&self) -> &'static str {
|
||||
"repo_list"
|
||||
}
|
||||
}
|
||||
|
||||
impl Panel for RepoListView {
|
||||
fn title(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
|
||||
div().text_sm().child(SharedString::from("Explore"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user