mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 01:12:59 +00:00
add layout edit placeholders
[deploy]
This commit is contained in:
@@ -11,3 +11,5 @@ node_modules
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
|
||||||
|
static/languages/*/.json
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const config: IconsConfig = {
|
|||||||
"piano",
|
"piano",
|
||||||
"keyboard",
|
"keyboard",
|
||||||
"settings",
|
"settings",
|
||||||
|
"edit",
|
||||||
"music_note",
|
"music_note",
|
||||||
"avg_pace",
|
"avg_pace",
|
||||||
"lyrics",
|
"lyrics",
|
||||||
|
|||||||
@@ -10,7 +10,39 @@
|
|||||||
{@const action = KEYMAP_CODES[layer[id]]}
|
{@const action = KEYMAP_CODES[layer[id]]}
|
||||||
<tr>
|
<tr>
|
||||||
<th class="icon">counter_{i + 1}</th>
|
<th class="icon">counter_{i + 1}</th>
|
||||||
<td>{action?.id}</td>
|
<td><button>{action?.title || action?.id} <span class="icon">edit</span></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
span.icon {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 250ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
font-family: "Noto Sans Mono", monospace;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--md-sys-color-on-surface);
|
||||||
|
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
transition: all 250ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover > span.icon {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import {serialPort, syncStatus} from "$lib/serial/connection"
|
import {serialPort, syncStatus} from "$lib/serial/connection"
|
||||||
import {browser} from "$app/environment"
|
|
||||||
import {page} from "$app/stores"
|
import {page} from "$app/stores"
|
||||||
import {slide, fly} from "svelte/transition"
|
import {slide, fly} from "svelte/transition"
|
||||||
import {canShare, triggerShare} from "$lib/share"
|
import {canShare, triggerShare} from "$lib/share"
|
||||||
@@ -37,14 +36,6 @@
|
|||||||
{#await import("$lib/components/PwaStatus.svelte") then { default: PwaStatus }}
|
{#await import("$lib/components/PwaStatus.svelte") then { default: PwaStatus }}
|
||||||
<PwaStatus />
|
<PwaStatus />
|
||||||
{/await}
|
{/await}
|
||||||
{#if browser && !("serial" in navigator)}
|
|
||||||
<abbr
|
|
||||||
title="Your browser does not support serial connections. Try using Chrome instead."
|
|
||||||
class="icon error"
|
|
||||||
>
|
|
||||||
warning
|
|
||||||
</abbr>
|
|
||||||
{/if}
|
|
||||||
<a
|
<a
|
||||||
title="Backup & Restore"
|
title="Backup & Restore"
|
||||||
href="/backup/"
|
href="/backup/"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const editableLayout: Action<HTMLButtonElement, {id: number; quadrant: nu
|
|||||||
const edit = tippy(node, {
|
const edit = tippy(node, {
|
||||||
interactive: true,
|
interactive: true,
|
||||||
appendTo: document.body,
|
appendTo: document.body,
|
||||||
|
trigger: "click",
|
||||||
placement: (["top", "right", "bottom", "left"] as const)[quadrant],
|
placement: (["top", "right", "bottom", "left"] as const)[quadrant],
|
||||||
onShow(instance) {
|
onShow(instance) {
|
||||||
component ??= new InputEdit({
|
component ??= new InputEdit({
|
||||||
|
|||||||
Reference in New Issue
Block a user