mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-23 20:54:50 +03:00
Added hotkey and the accelerator to the top menu (#4097)
This commit is contained in:
parent
4693fa1c21
commit
e09810bfff
@ -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`);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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")]
|
||||
|
Loading…
Reference in New Issue
Block a user