mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-11 12:25:42 +03:00
Shortcut to commit page
This commit enhances the display of command descriptions in the Command Palette by splitting the descriptions into separate tokens. This provides a more readable and organized presentation of the information. Additionally, a new keyboard shortcut has been added for easy navigation to the commit page of a project. Changes: - Split command descriptions into separate tokens in CmdK.svelte - Add 'Shift+c' keyboard shortcut for accessing the commit page of a project in CommandPalette.svelte
This commit is contained in:
parent
8c4adf4d6b
commit
2c76b6185b
@ -257,7 +257,9 @@
|
||||
<svelte:component this={command.icon} />
|
||||
</span>
|
||||
<span class="quick-command flex-grow">{command.title}</span>
|
||||
<span class="quick-command-key">{command.description}</span>
|
||||
{#each command.description.split(' ') as token}
|
||||
<span class="quick-command-key">{token}</span>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -8,6 +8,7 @@
|
||||
import Replay from './Replay.svelte';
|
||||
import Branch from './Branch.svelte';
|
||||
import { currentProject } from '$lib/current_project';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
let dialog: ComponentType | undefined;
|
||||
|
||||
@ -54,6 +55,12 @@
|
||||
dialog === Commit ? (dialog = undefined) : (dialog = Commit);
|
||||
}
|
||||
},
|
||||
'Shift+c': () => {
|
||||
if ($currentProject) {
|
||||
goto(`/projects/${$currentProject?.id}/commit`);
|
||||
|
||||
}
|
||||
},
|
||||
r: () => {
|
||||
if ($currentProject) {
|
||||
dialog === Replay ? (dialog = undefined) : (dialog = Replay);
|
||||
|
Loading…
Reference in New Issue
Block a user