add terminal navigation to command palette

This commit is contained in:
Kiril Videlov 2023-04-05 10:39:55 +02:00 committed by Kiril Videlov
parent 48c7779453
commit 96b70d0eaf
2 changed files with 15 additions and 0 deletions

View File

@ -116,6 +116,16 @@
},
icon: RewindIcon,
visible: 'replay history'.includes(userInput?.toLowerCase())
},
{
title: 'Terminal',
description: 'Cmd C',
selected: false,
action: {
href: `/projects/${$project?.id}/terminal`
},
icon: GitCommitIcon,
visible: 'commit'.includes(userInput?.toLowerCase())
}
]
},

View File

@ -46,6 +46,11 @@
dialog === CmdK
? (dialog = undefined)
: ((dialog = CmdK), (props = { projects, project }));
},
'Meta+t': () => {
if ($project) {
goto(`/projects/${$project.id}/terminal`);
}
}
},
false // works even when an input is focused