Add settings for removing the assistant and collaboration panel buttons

Add a not-logged-in state to the collaboration panel

co-authored-by: max <max@zed.dev>
This commit is contained in:
Mikayla 2023-08-07 16:27:47 -07:00
parent e37e76fc0b
commit 8980a9f1c1
No known key found for this signature in database
10 changed files with 195 additions and 115 deletions

View file

@ -192,6 +192,7 @@ impl AssistantPanel {
old_dock_position = new_dock_position;
cx.emit(AssistantPanelEvent::DockPositionChanged);
}
cx.notify();
})];
this
@ -790,8 +791,10 @@ impl Panel for AssistantPanel {
}
}
fn icon_path(&self) -> &'static str {
"icons/robot_14.svg"
fn icon_path(&self, cx: &WindowContext) -> Option<&'static str> {
settings::get::<AssistantSettings>(cx)
.button
.then(|| "icons/robot_14.svg")
}
fn icon_tooltip(&self) -> (String, Option<Box<dyn Action>>) {