custom error shortcuts

This commit is contained in:
Jan Prochazka
2021-04-10 20:51:33 +02:00
parent 817286d326
commit 12fd5f6943
13 changed files with 138 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" context="module">
import { commands, visibleCommandPalette } from '../stores';
import { commandsCustomized, visibleCommandPalette } from '../stores';
import { get } from 'svelte/store';
import { runGroupCommand } from './runCommand';
@@ -12,7 +12,7 @@
// console.log('keyText', keyText);
const commandsValue = get(commands);
const commandsValue = get(commandsCustomized);
const commandsFiltered: any = Object.values(commandsValue).filter(
(x: any) =>
x.keyText &&

View File

@@ -19,7 +19,7 @@
import _ from 'lodash';
import { onMount } from 'svelte';
import { commands, getVisibleCommandPalette, visibleCommandPalette } from '../stores';
import { commands, commandsCustomized, getVisibleCommandPalette, visibleCommandPalette } from '../stores';
import clickOutside from '../utility/clickOutside';
import keycodes from '../utility/keycodes';
import registerCommand from './registerCommand';
@@ -40,7 +40,7 @@
});
$: sortedComands = _.sortBy(
Object.values($commands).filter(x => x.enabled),
Object.values($commandsCustomized).filter(x => x.enabled),
'text'
);

View File

@@ -203,6 +203,20 @@ registerCommand({
}),
});
registerCommand({
id: 'settings.commands',
category: 'Settings',
name: 'Keyboard shortcuts',
onClick: () => {
openNewTab({
title: 'Keyboard Shortcuts',
icon: 'icon keyboard',
tabComponent: 'CommandListTab',
props: {},
});
},
});
export function registerFileCommands({
idPrefix,
category,