Start work on notification panel
This commit is contained in:
parent
50cf25ae97
commit
d1756b621f
24 changed files with 1021 additions and 241 deletions
|
@ -221,6 +221,13 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::AppContext) {
|
|||
workspace.toggle_panel_focus::<collab_ui::chat_panel::ChatPanel>(cx);
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace,
|
||||
_: &collab_ui::notification_panel::ToggleFocus,
|
||||
cx: &mut ViewContext<Workspace>| {
|
||||
workspace.toggle_panel_focus::<collab_ui::notification_panel::NotificationPanel>(cx);
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace,
|
||||
_: &terminal_panel::ToggleFocus,
|
||||
|
@ -275,9 +282,8 @@ pub fn initialize_workspace(
|
|||
QuickActionBar::new(buffer_search_bar, workspace)
|
||||
});
|
||||
toolbar.add_item(quick_action_bar, cx);
|
||||
let diagnostic_editor_controls = cx.add_view(|_| {
|
||||
diagnostics::ToolbarControls::new()
|
||||
});
|
||||
let diagnostic_editor_controls =
|
||||
cx.add_view(|_| diagnostics::ToolbarControls::new());
|
||||
toolbar.add_item(diagnostic_editor_controls, cx);
|
||||
let project_search_bar = cx.add_view(|_| ProjectSearchBar::new());
|
||||
toolbar.add_item(project_search_bar, cx);
|
||||
|
@ -351,12 +357,24 @@ pub fn initialize_workspace(
|
|||
collab_ui::collab_panel::CollabPanel::load(workspace_handle.clone(), cx.clone());
|
||||
let chat_panel =
|
||||
collab_ui::chat_panel::ChatPanel::load(workspace_handle.clone(), cx.clone());
|
||||
let (project_panel, terminal_panel, assistant_panel, channels_panel, chat_panel) = futures::try_join!(
|
||||
let notification_panel = collab_ui::notification_panel::NotificationPanel::load(
|
||||
workspace_handle.clone(),
|
||||
cx.clone(),
|
||||
);
|
||||
let (
|
||||
project_panel,
|
||||
terminal_panel,
|
||||
assistant_panel,
|
||||
channels_panel,
|
||||
chat_panel,
|
||||
notification_panel,
|
||||
) = futures::try_join!(
|
||||
project_panel,
|
||||
terminal_panel,
|
||||
assistant_panel,
|
||||
channels_panel,
|
||||
chat_panel,
|
||||
notification_panel,
|
||||
)?;
|
||||
workspace_handle.update(&mut cx, |workspace, cx| {
|
||||
let project_panel_position = project_panel.position(cx);
|
||||
|
@ -377,6 +395,7 @@ pub fn initialize_workspace(
|
|||
workspace.add_panel(assistant_panel, cx);
|
||||
workspace.add_panel(channels_panel, cx);
|
||||
workspace.add_panel(chat_panel, cx);
|
||||
workspace.add_panel(notification_panel, cx);
|
||||
|
||||
if !was_deserialized
|
||||
&& workspace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue