tab context menu and shortcuts

This commit is contained in:
vcoppe committed 2024-04-29 17:03:23 +02:00
1 parent a6bcebf306
commit 49053bcaaa
20 files changed
+409 -24

No files matched your search

@@ -0,0 +1,21 @@
<script lang="ts">
import { onMount } from 'svelte';
import { _ } from 'svelte-i18n';
export let key: string;
export let shift: boolean = false;
export let ctrl: boolean = false;
export let click: boolean = false;
let isMac = false;
onMount(() => {
isMac = navigator.userAgent.toUpperCase().indexOf('MAC') >= 0;
});
</script>
<span class="ml-auto pl-2 text-xs tracking-widest text-muted-foreground"
>{shift ? '⇧' : ''}{ctrl ? (isMac ? '⌘' : $_('menu.ctrl') + '+') : ''}{key}{click
? $_('menu.click')
: ''}</span
>