Merge branch 'bulk-deletion' into filtering

This commit is contained in:
tglide
2023-08-09 15:38:39 +01:00
101 changed files with 1881 additions and 571 deletions
@@ -90,8 +90,6 @@
}
$commandCenterKeyDownHandler(e);
};
$: console.log($subPanels);
</script>
<svelte:window on:mousedown={handleBlur} on:keydown={handleKeydown} />
+6 -5
View File
@@ -1,5 +1,6 @@
import { debounce } from '$lib/helpers/debounce';
import { isMac } from '$lib/helpers/platform';
import { wizard } from '$lib/stores/wizard';
import { onMount } from 'svelte';
import { derived, writable } from 'svelte/store';
import { nanoid } from 'nanoid/non-secure';
@@ -106,8 +107,8 @@ function hasDisputing(command: KeyedCommand, allCommands: Command[]) {
}
export const commandCenterKeyDownHandler = derived(
[commandMap, commandsEnabled],
([$commandMap, enabled]) => {
[commandMap, commandsEnabled, wizard],
([$commandMap, enabled, $wizard]) => {
const commandsArr = Array.from($commandMap.values()).flat();
let recentKeyCodes: number[] = [];
let validCommands: KeyedCommand[] = [];
@@ -178,9 +179,9 @@ export const commandCenterKeyDownHandler = derived(
for (const command of commandsArr) {
if (!isKeyedCommand(command)) continue;
if (!command.forceEnable) {
if (command.disabled) continue;
if (!enabled) continue;
if (isInputEvent(event)) continue;
if (command.disabled || !enabled || isInputEvent(event) || $wizard.show) {
continue;
}
}
const { keys, ctrl: meta, shift, alt } = command;