Added hotkey and the accelerator to the top menu (#4097)

This commit is contained in:
Pavel Laptev 2024-06-17 12:46:04 +02:00 committed by GitHub
parent 4693fa1c21
commit e09810bfff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -19,6 +19,7 @@
import { VirtualBranchService } from '$lib/vbranches/virtualBranch';
import { onDestroy, onMount, setContext } from 'svelte';
import type { LayoutData } from './$types';
import { goto } from '$app/navigation';
export let data: LayoutData;
@ -77,6 +78,9 @@
const handleKeyDown = createKeybind({
'$mod+Shift+H': () => {
$showHistoryView = !$showHistoryView;
},
'$mod+,': () => {
goto(`/${projectId}/settings`);
}
});

View File

@ -154,8 +154,9 @@ pub fn build(_package_info: &PackageInfo) -> Menu {
));
project_menu = project_menu.add_native_item(MenuItem::Separator);
project_menu =
project_menu.add_item(CustomMenuItem::new("project/settings", "Project Settings"));
project_menu = project_menu.add_item(
CustomMenuItem::new("project/settings", "Project Settings").accelerator("CmdOrCtrl+,"),
);
menu = menu.add_submenu(Submenu::new("Project", project_menu));
#[cfg(target_os = "macos")]