mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-02-10 11:12:43 +00:00
feat: change icons
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
class:right={info.variant === "right"}
|
||||
use:title={{title: tooltip}}
|
||||
>
|
||||
{info.icon ?? info.id ?? `0x${info.code.toString(16)}`}
|
||||
{info.icon ?? info.display ?? info.id ?? `0x${info.code.toString(16)}`}
|
||||
</kbd>
|
||||
{:else if display === "inline-keys"}
|
||||
{#if !info.icon && info.id?.length === 1}
|
||||
@@ -44,7 +44,7 @@
|
||||
class:icon={!!info.icon}
|
||||
use:title={{title: tooltip}}
|
||||
>
|
||||
{info.icon ?? info.id ?? `0x${info.code.toString(16)}`}</kbd
|
||||
{info.icon ?? info.display ?? info.id ?? `0x${info.code.toString(16)}`}</kbd
|
||||
>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
{#each positions as position, layer}
|
||||
{@const {action: actionId, isApplied} = $layout[layer][key.id] ?? {action: 0, isApplied: true}}
|
||||
{@const {code, icon, id, title, keyCode, variant} = KEYMAP_CODES[actionId] ?? {code: actionId}}
|
||||
{@const {code, icon, id, display, title, keyCode, variant} = KEYMAP_CODES[actionId] ?? {code: actionId}}
|
||||
{@const dynamicMapping = keyCode && $osLayout[JSON.stringify([keyCode])]}
|
||||
{@const tooltip =
|
||||
(title ?? id ?? `0x${code.toString(16)}`) +
|
||||
@@ -53,7 +53,7 @@
|
||||
use:action={{title: tooltip}}
|
||||
>
|
||||
{#if code !== 0}
|
||||
{dynamicMapping || icon || id || `0x${code.toString(16)}`}
|
||||
{dynamicMapping || icon || display || id || `0x${code.toString(16)}`}
|
||||
{/if}
|
||||
{#if !isApplied}
|
||||
<tspan>•</tspan>
|
||||
|
||||
Reference in New Issue
Block a user