mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
hidden devices: blue ghosts, no live-state paint
A hidden device and an unavailable one both rendered as translucent dark — indistinguishable at a glance, and a lit hidden lamp still glowed yellow through the ghost (owner's report). A ghost is CONFIGURATION, not status: - blue dashed ghost (accent-tinted, color-mix with an rgba fallback for old WebViews), clearly apart from the grey 'unavailable' icon; - no state classes, no RGB tint, no alarm pulse, no active ripple on hidden devices — the only thing a ghost says is 'I am hidden, click to unhide'. smoke_hidden_flag grew two assertions: the ghost carries no state classes and is blue/dashed.
This commit is contained in:
@@ -39,6 +39,13 @@ Object.assign(out, await page.evaluate(async () => {
|
||||
o.noGhostsInView = !sr().querySelector('.dev.ghost');
|
||||
c._setMode('devices'); c.requestUpdate(); await c.updateComplete;
|
||||
o.ghostInEditor = !!sr().querySelector('.dev.ghost');
|
||||
// призрак — конфигурация, не статус: ни жёлтого, ни unavail, ни тревоги
|
||||
const g = sr().querySelector('.dev.ghost');
|
||||
o.ghostHasNoState = !!g && !g.classList.contains('on') && !g.classList.contains('open')
|
||||
&& !g.classList.contains('unavail') && !g.classList.contains('alarm');
|
||||
// и он синий, а не тёмный — отличим от недоступного устройства
|
||||
o.ghostIsBlue = !!g && getComputedStyle(g).borderStyle.includes('dashed')
|
||||
&& getComputedStyle(g).borderColor !== 'rgb(255, 255, 255)';
|
||||
// тумблер локальный: конфиг не трогается
|
||||
o.toggleIsLocal = c._serverCfg.settings.show_all === undefined;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user