fix: restart periodic keys on device page switch, render display output in UI grid

- daemon.go: call stopPeriodicKeys/startPeriodicKeys after page switch
  from device gesture and auto-switch (was missing, causing goroutines
  to never restart for the correct page)
- app.js: forward display output background to /api/render preview URL
- index.html: show preview image and text from display output when key
  has no configured background/icon/label
This commit is contained in:
Maksim Totmin
2026-06-17 11:12:00 +07:00
parent 1d6748bc0c
commit 8c2184b93d
3 changed files with 22 additions and 12 deletions
+5 -5
View File
@@ -59,15 +59,15 @@
:style="key.displayBg ? { backgroundColor: key.displayBg } : {}"
:class="{ empty: !key.configured }"
@click="editKey(key.index)">
<img x-show="key.configured && key.background"
<img x-show="key.configured && (key.background || key.displayBg)"
:src="key.previewUrl" alt="">
<i x-show="key.configured && !key.background && isFAIcon(key.icon)"
<i x-show="key.configured && !key.background && !key.displayBg && isFAIcon(key.icon)"
:class="faClass(key.icon)" class="fa-preview"></i>
<img x-show="key.configured && !key.background && !isFAIcon(key.icon) && key.icon"
<img x-show="key.configured && !key.background && !key.displayBg && !isFAIcon(key.icon) && key.icon"
:src="key.previewUrl" alt="">
<span x-show="key.configured && !key.background && !key.icon && key.label"
<span x-show="key.configured && !key.background && !key.displayBg && !key.icon && (key.label || key.displayText)"
style="font-size:12px;color:#fff;opacity:0.75;text-align:center;line-height:1.2;padding:4px;"
x-text="key.label"></span>
x-text="key.displayText || key.label"></span>
<span x-show="!key.configured" style="color:var(--text-muted);font-size:24px;opacity:0.5;line-height:1;">+</span>
<div class="action-icons" x-show="key.hasAction">
<template x-for="(t, ti) in key.actionTypes.slice(0,3)" :key="ti">