Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

feat(app): list account shortcuts in keybind settings

Hampus942be7b9f24f
diff --git a/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/DefaultKeybindsList.tsx b/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/DefaultKeybindsList.tsx
index 01f71faf1..22311ce84 100644
--- a/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/DefaultKeybindsList.tsx
+++ b/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/DefaultKeybindsList.tsx
@@ -39,6 +39,11 @@ const VOICE_AND_VIDEO_DESCRIPTOR = msg({
message: 'Voice and video',
comment: 'Short label in the keybinds tab. Keep it concise.',
});
+const ACCOUNTS_DESCRIPTOR = msg({
+ message: 'Accounts',
+ comment:
+ 'Short label in the keybinds tab for the section of shortcuts that switch between signed-in accounts. Keep it concise.',
+});
const MISCELLANEOUS_DESCRIPTOR = msg({
message: 'Miscellaneous',
comment: 'Short label in the keybinds tab. Keep it concise.',
@@ -63,6 +68,7 @@ export const DefaultKeybindsList: React.FC<{searchQuery: string}> = observer(({s
drag_and_drop: i18n._(DRAG_AND_DROP_DESCRIPTOR),
chat: i18n._(CHAT_DESCRIPTOR),
voice_and_video: i18n._(VOICE_AND_VIDEO_DESCRIPTOR),
+ accounts: i18n._(ACCOUNTS_DESCRIPTOR),
misc: i18n._(MISCELLANEOUS_DESCRIPTOR),
};
const sections = useMemo(() => {
@@ -73,6 +79,7 @@ export const DefaultKeybindsList: React.FC<{searchQuery: string}> = observer(({s
drag_and_drop: [],
chat: [],
voice_and_video: [],
+ accounts: [],
misc: [],
};
for (const entry of defaults) {
diff --git a/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/shared.ts b/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/shared.ts
index 9c701389d..f54f1d8c2 100644
--- a/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/shared.ts
+++ b/fluxer_app/src/features/user/components/modals/tabs/keybinds_tab/shared.ts
@@ -35,6 +35,7 @@ export const DEFAULT_KEYBIND_SECTIONS: ReadonlyArray<KeybindSection> = [
'drag_and_drop',
'chat',
'voice_and_video',
+ 'accounts',
'misc',
];
const SECTION_DISPLAY_ORDER: Partial<Record<KeybindSection, ReadonlyArray<KeybindCommand>>> = {
@@ -100,6 +101,14 @@ const SECTION_DISPLAY_ORDER: Partial<Record<KeybindSection, ReadonlyArray<Keybin
'voice_answer_call',
'voice_decline_call',
],
+ accounts: [
+ 'system_open_account_switcher',
+ 'system_switch_account_recent',
+ 'system_switch_account_prev',
+ 'system_switch_account_next',
+ 'system_jump_account_mention',
+ 'nav_quick_switcher_accounts',
+ ],
misc: ['misc_search', 'misc_open_context_menu', 'misc_help'],
};
const SHORTCUT_MERGE_PAIRS: ReadonlyArray<readonly [KeybindCommand, KeybindCommand]> = [
@@ -112,6 +121,7 @@ const SHORTCUT_MERGE_PAIRS: ReadonlyArray<readonly [KeybindCommand, KeybindComma
['nav_mention_prev', 'nav_mention_next'],
['chat_scroll_up', 'chat_scroll_down'],
['dnd_move_up', 'dnd_move_down'],
+ ['system_switch_account_prev', 'system_switch_account_next'],
];
export type ShortcutRowModel = KeybindConfig | [KeybindConfig, KeybindConfig];