mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-08 11:02:50 +00:00
@@ -40,7 +40,7 @@
|
|||||||
function keyup() {
|
function keyup() {
|
||||||
if (!editing) return;
|
if (!editing) return;
|
||||||
editing = false;
|
editing = false;
|
||||||
if (pressedKeys.size < 2) return;
|
if (pressedKeys.size < 1) return;
|
||||||
if (!chord) return dispatch("submit", [...pressedKeys].sort(compare));
|
if (!chord) return dispatch("submit", [...pressedKeys].sort(compare));
|
||||||
changes.update((changes) => {
|
changes.update((changes) => {
|
||||||
changes.push({
|
changes.push({
|
||||||
@@ -78,7 +78,9 @@
|
|||||||
class:deleted={chord && chord.deleted}
|
class:deleted={chord && chord.deleted}
|
||||||
class:edited={chord && chord.actionsChanged}
|
class:edited={chord && chord.actionsChanged}
|
||||||
class:invalid={chord &&
|
class:invalid={chord &&
|
||||||
chordActions?.some((it, i) => chordActions?.[i] !== it)}
|
chordActions &&
|
||||||
|
(chordActions.length < 2 ||
|
||||||
|
chordActions.some((it, i) => chordActions[i] !== it))}
|
||||||
class="chord"
|
class="chord"
|
||||||
on:click={edit}
|
on:click={edit}
|
||||||
on:keydown={keydown}
|
on:keydown={keydown}
|
||||||
|
|||||||
Reference in New Issue
Block a user