mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-22 01:42:47 +00:00
new navigation flow
This commit is contained in:
@@ -12,7 +12,10 @@
|
||||
function buildIndex(chords: Chord[]): Index {
|
||||
const index = new FlexSearch({tokenize: "full"})
|
||||
chords.forEach((chord, i) => {
|
||||
index.add(i, chord.phrase)
|
||||
index.add(
|
||||
i,
|
||||
chord.phrase.map(it => KEYMAP_CODES[it].id),
|
||||
)
|
||||
})
|
||||
return index
|
||||
}
|
||||
@@ -56,7 +59,11 @@
|
||||
<table>
|
||||
{#each items.slice(0, 50) as [{ phrase, actions }, i]}
|
||||
<tr style="view-transition-name: chord-{i}">
|
||||
<th>{phrase}</th>
|
||||
<th>
|
||||
{#each phrase as char}
|
||||
{KEYMAP_CODES[char].id}
|
||||
{/each}
|
||||
</th>
|
||||
<td>
|
||||
{#each actions as action}
|
||||
{@const keyInfo = KEYMAP_CODES[action]}
|
||||
|
||||
Reference in New Issue
Block a user