mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
feat: complete device serial api implementation
This commit is contained in:
@@ -56,8 +56,18 @@
|
||||
<div class="backdrop" transition:fade={{duration: 250}} on:click={() => (powerDialog = !powerDialog)} />
|
||||
<dialog open transition:slide={{duration: 250}}>
|
||||
<h3>Boot Menu</h3>
|
||||
<button><span class="icon">restart_alt</span>Reboot WIP</button>
|
||||
<button><span class="icon">rule_settings</span>Bootloader WIP</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
$serialPort.reboot()
|
||||
$serialPort = undefined
|
||||
}}><span class="icon">restart_alt</span>Reboot</button
|
||||
>
|
||||
<button
|
||||
on:click={() => {
|
||||
$serialPort.bootloader()
|
||||
$serialPort = undefined
|
||||
}}><span class="icon">rule_settings</span>Bootloader</button
|
||||
>
|
||||
</dialog>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import {chords} from "$lib/serial/connection"
|
||||
import {chords, serialPort} from "$lib/serial/connection"
|
||||
import {KEYMAP_CODES} from "$lib/serial/keymap-codes"
|
||||
import FlexSearch from "flexsearch"
|
||||
import type {Index} from "flexsearch"
|
||||
@@ -7,6 +7,7 @@
|
||||
import type {Chord} from "$lib/serial/chord"
|
||||
import tippy from "tippy.js"
|
||||
import {calculateChordCoverage} from "$lib/chords/coverage"
|
||||
import {SETTING_IDS} from "$lib/serial/settings"
|
||||
|
||||
$: searchIndex = $chords?.length > 0 ? buildIndex($chords) : undefined
|
||||
|
||||
@@ -44,6 +45,11 @@
|
||||
{/if}
|
||||
<button class="icon" on:click={sort}>sort</button>
|
||||
<button class="icon">filter_list</button>
|
||||
{#if $serialPort}
|
||||
{#await $serialPort.getSetting(SETTING_IDS.enableChording) then enableChording}
|
||||
<label><input type="checkbox" checked={enableChording !== 0} /> Enable Chording</label>
|
||||
{/await}
|
||||
{/if}
|
||||
|
||||
<section>
|
||||
<table>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<label><input type="checkbox" />Serial Log</label>
|
||||
|
||||
Reference in New Issue
Block a user