fix: chord conflict shows "undefined"

This commit is contained in:
2024-04-26 17:12:59 +02:00
parent 0500a723de
commit 587375e654
6 changed files with 11 additions and 9 deletions

View File

@@ -22,7 +22,7 @@
</script>
<nav>
{#each paths as { href, title, icon }, i}
{#each paths as { href, title, icon }}
<a {href} class:active={$page.url.pathname.startsWith(href)}>
<span class="icon">{icon}</span>
{title}

View File

@@ -20,7 +20,6 @@
syncStatus,
} from "$lib/serial/connection";
import { askForConfirmation } from "$lib/dialogs/confirm-dialog";
import { KEYMAP_CODES } from "$lib/serial/keymap-codes";
function undo(event: MouseEvent) {
if (event.shiftKey) {
@@ -56,13 +55,10 @@
existingChord !== undefined &&
!(await askForConfirmation(
$LL.configure.chords.conflict.TITLE(),
$LL.configure.chords.conflict.DESCRIPTION(
actions
.map((it) => `<kbd>${KEYMAP_CODES.get(it)?.id}</kbd>`)
.join(" "),
),
$LL.configure.chords.conflict.DESCRIPTION(),
$LL.configure.chords.conflict.CONFIRM(),
$LL.configure.chords.conflict.ABORT(),
actions.slice(0, actions.lastIndexOf(0)),
))
) {
changes.update((changes) =>