BlueGit

ict rusty-teams

feat(settings): Settings entry in the avatar menu and Ctrl+, shortcut

- Avatar menu "Settings" opens the dialog at General
- Ctrl+, (Cmd+, on macOS) opens it from anywhere, listed in the shortcuts dialog
- Notification settings entry uses the bell icon so the two entries differ

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-17 · 6 weeks ago

Hash
5576c50ae34e477bda05fc65404ea8a52e8c26a5
Parent
0d4fda20
3 files changed +17 −3
crates/app/src/views/shell.rs +4 −1
@@ -20,7 +20,7 @@ use super::rail::RailView;
20 20 use super::saved_panel::{SavedPanel, SavedPanelEvent};
21 21 use super::shortcuts::{
22 22 AcceptCall, DeclineCall, HangUpCall, JoinMeetingFromToast, NextConversation, OpenActivity,
23 OpenAgents, OpenCallsTab, OpenChannelsTab, OpenChatsTab, OpenLobbyList, OpenSaved, PreviousConversation, PushToTalk,
23 OpenAgents, OpenCallsTab, OpenSettings, OpenChannelsTab, OpenChatsTab, OpenLobbyList, OpenSaved, PreviousConversation, PushToTalk,
24 24 Scope, ShowShortcuts, StartAudioCall, StartVideoCall, ToggleCallCamera, ToggleCallFullscreen,
25 25 ToggleCallHand, ToggleCallShare, ZoomShareIn, ZoomShareOut, ZoomShareReset,
26 26 };
@@ -901,6 +901,9 @@ impl Render for AppShell {
901 901 .update(cx, |state, cx| state.release_push_to_talk(cx));
902 902 }
903 903 }))
904 .on_action(cx.listener(|this, _: &OpenSettings, window, cx| {
905 this.open_settings(SettingsSection::General, window, cx);
906 }))
904 907 .on_action(cx.listener(|this, _: &ShowShortcuts, window, cx| {
905 908 this.toggle_shortcuts_dialog(window, cx);
906 909 }))
@@ -20,7 +20,7 @@ use super::rail::RailView;
20use super::saved_panel::{SavedPanel, SavedPanelEvent};
20use super::saved_panel::{SavedPanel, SavedPanelEvent};
21use super::shortcuts::{
21use super::shortcuts::{
22 AcceptCall, DeclineCall, HangUpCall, JoinMeetingFromToast, NextConversation, OpenActivity,
22 AcceptCall, DeclineCall, HangUpCall, JoinMeetingFromToast, NextConversation, OpenActivity,
23 OpenAgents, OpenCallsTab, OpenChannelsTab, OpenChatsTab, OpenLobbyList, OpenSaved, PreviousConversation, PushToTalk,
23 OpenAgents, OpenCallsTab, OpenSettings, OpenChannelsTab, OpenChatsTab, OpenLobbyList, OpenSaved, PreviousConversation, PushToTalk,
24 Scope, ShowShortcuts, StartAudioCall, StartVideoCall, ToggleCallCamera, ToggleCallFullscreen,
24 Scope, ShowShortcuts, StartAudioCall, StartVideoCall, ToggleCallCamera, ToggleCallFullscreen,
25 ToggleCallHand, ToggleCallShare, ZoomShareIn, ZoomShareOut, ZoomShareReset,
25 ToggleCallHand, ToggleCallShare, ZoomShareIn, ZoomShareOut, ZoomShareReset,
26};
26};
@@ -901,6 +901,9 @@ impl Render for AppShell {
901 .update(cx, |state, cx| state.release_push_to_talk(cx));
901 .update(cx, |state, cx| state.release_push_to_talk(cx));
902 }
902 }
903 }))
903 }))
904 .on_action(cx.listener(|this, _: &OpenSettings, window, cx| {
905 this.open_settings(SettingsSection::General, window, cx);
906 }))
904 .on_action(cx.listener(|this, _: &ShowShortcuts, window, cx| {
907 .on_action(cx.listener(|this, _: &ShowShortcuts, window, cx| {
905 this.toggle_shortcuts_dialog(window, cx);
908 this.toggle_shortcuts_dialog(window, cx);
906 }))
909 }))
crates/app/src/views/shortcuts.rs +3 −1
@@ -37,7 +37,8 @@ actions!(
37 37 ZoomShareIn,
38 38 ZoomShareOut,
39 39 ZoomShareReset,
40 ShowShortcuts
40 ShowShortcuts,
41 OpenSettings
41 42 ]
42 43 );
43 44
@@ -103,6 +104,7 @@ pub const SHORTCUTS: &[Shortcut] = &[
103 104 shortcut!(General, OutsideComposer, "Search and switch chats", "ctrl-k", Some("cmd-k"), OpenSwitcher),
104 105 shortcut!(General, Global, "New chat", "ctrl-n", Some("cmd-n"), NewChat),
105 106 shortcut!(General, GlobalOverTextFields, "Keyboard shortcuts", "ctrl-.", Some("cmd-."), ShowShortcuts),
107 shortcut!(General, GlobalOverTextFields, "Settings", "ctrl-,", Some("cmd-,"), OpenSettings),
106 108 shortcut!(Navigation, GlobalOverTextFields, "Open Activity", "ctrl-1", Some("cmd-1"), OpenActivity),
107 109 shortcut!(Navigation, GlobalOverTextFields, "Show Chats", "ctrl-2", Some("cmd-2"), OpenChatsTab),
108 110 shortcut!(Navigation, GlobalOverTextFields, "Show Channels", "ctrl-3", Some("cmd-3"), OpenChannelsTab),
@@ -37,7 +37,8 @@ actions!(
37 ZoomShareIn,
37 ZoomShareIn,
38 ZoomShareOut,
38 ZoomShareOut,
39 ZoomShareReset,
39 ZoomShareReset,
40 ShowShortcuts
40 ShowShortcuts,
41 OpenSettings
41 ]
42 ]
42);
43);
43
44
@@ -103,6 +104,7 @@ pub const SHORTCUTS: &[Shortcut] = &[
103 shortcut!(General, OutsideComposer, "Search and switch chats", "ctrl-k", Some("cmd-k"), OpenSwitcher),
104 shortcut!(General, OutsideComposer, "Search and switch chats", "ctrl-k", Some("cmd-k"), OpenSwitcher),
104 shortcut!(General, Global, "New chat", "ctrl-n", Some("cmd-n"), NewChat),
105 shortcut!(General, Global, "New chat", "ctrl-n", Some("cmd-n"), NewChat),
105 shortcut!(General, GlobalOverTextFields, "Keyboard shortcuts", "ctrl-.", Some("cmd-."), ShowShortcuts),
106 shortcut!(General, GlobalOverTextFields, "Keyboard shortcuts", "ctrl-.", Some("cmd-."), ShowShortcuts),
107 shortcut!(General, GlobalOverTextFields, "Settings", "ctrl-,", Some("cmd-,"), OpenSettings),
106 shortcut!(Navigation, GlobalOverTextFields, "Open Activity", "ctrl-1", Some("cmd-1"), OpenActivity),
108 shortcut!(Navigation, GlobalOverTextFields, "Open Activity", "ctrl-1", Some("cmd-1"), OpenActivity),
107 shortcut!(Navigation, GlobalOverTextFields, "Show Chats", "ctrl-2", Some("cmd-2"), OpenChatsTab),
109 shortcut!(Navigation, GlobalOverTextFields, "Show Chats", "ctrl-2", Some("cmd-2"), OpenChatsTab),
108 shortcut!(Navigation, GlobalOverTextFields, "Show Channels", "ctrl-3", Some("cmd-3"), OpenChannelsTab),
110 shortcut!(Navigation, GlobalOverTextFields, "Show Channels", "ctrl-3", Some("cmd-3"), OpenChannelsTab),
crates/app/src/views/status_menu.rs +10 −1
@@ -185,6 +185,7 @@ fn status_menu(
185 185 let settings_app = context.app.clone();
186 186 let chat_list_app = context.app.clone();
187 187 let translation_app = context.app.clone();
188 let general_app = context.app.clone();
188 189 let call_app = context.app.clone();
189 190 let row_label = match &context.summary.until {
190 191 Some(until) => format!("{} {until}", context.summary.label),
@@ -240,12 +241,20 @@ fn status_menu(
240 241 )
241 242 .item(
242 243 PopupMenuItem::new("Notification settings")
243 .icon(menu_icon(IconName::Settings))
244 .icon(menu_icon(IconName::Bell))
244 245 .on_click(move |_, _, cx| {
245 246 settings_app.update(cx, |state, cx| {
246 247 state.open_settings(SettingsSection::Notifications, cx)
247 248 });
248 249 }),
250 )
251 .item(
252 PopupMenuItem::new("Settings")
253 .icon(menu_icon(IconName::Settings))
254 .on_click(move |_, _, cx| {
255 general_app
256 .update(cx, |state, cx| state.open_settings(SettingsSection::General, cx));
257 }),
249 258 );
250 259 if !demo {
251 260 return popup;
@@ -185,6 +185,7 @@ fn status_menu(
185 let settings_app = context.app.clone();
185 let settings_app = context.app.clone();
186 let chat_list_app = context.app.clone();
186 let chat_list_app = context.app.clone();
187 let translation_app = context.app.clone();
187 let translation_app = context.app.clone();
188 let general_app = context.app.clone();
188 let call_app = context.app.clone();
189 let call_app = context.app.clone();
189 let row_label = match &context.summary.until {
190 let row_label = match &context.summary.until {
190 Some(until) => format!("{} {until}", context.summary.label),
191 Some(until) => format!("{} {until}", context.summary.label),
@@ -240,12 +241,20 @@ fn status_menu(
240 )
241 )
241 .item(
242 .item(
242 PopupMenuItem::new("Notification settings")
243 PopupMenuItem::new("Notification settings")
243 .icon(menu_icon(IconName::Settings))
244 .icon(menu_icon(IconName::Bell))
244 .on_click(move |_, _, cx| {
245 .on_click(move |_, _, cx| {
245 settings_app.update(cx, |state, cx| {
246 settings_app.update(cx, |state, cx| {
246 state.open_settings(SettingsSection::Notifications, cx)
247 state.open_settings(SettingsSection::Notifications, cx)
247 });
248 });
248 }),
249 }),
250 )
251 .item(
252 PopupMenuItem::new("Settings")
253 .icon(menu_icon(IconName::Settings))
254 .on_click(move |_, _, cx| {
255 general_app
256 .update(cx, |state, cx| state.open_settings(SettingsSection::General, cx));
257 }),
249 );
258 );
250 if !demo {
259 if !demo {
251 return popup;
260 return popup;