Dashboard Studio 1.7.0: scroll and swipe cards, more themes, per-device dashboards
- Container cards: horizontal scroll (snap, arrows, keeps position) and swipe (dots, optional autoplay that survives redraws and respects reduced motion), with add/edit/reorder of the cards inside - Nine new themes, contrast-checked, including High contrast; bright accents get dark text - Choose which dashboard opens per device (optionally in kiosk mode) and per Home Assistant user, via /api/whoami and the ingress user headers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -210,6 +210,14 @@ textarea.input { resize: vertical; min-height: 76px; font-family: ui-monospace,
|
||||
.modal-card p { margin: 6px 0 0; color: var(--text-2); }
|
||||
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
|
||||
.modal-actions .btn { min-width: 96px; }
|
||||
.modal-card.wide { width: 560px; }
|
||||
.assign-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
|
||||
.assign-row .input { flex: 1; min-width: 0; }
|
||||
.assign-row select.input { flex: 1.2; }
|
||||
.assign-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.assign-kiosk { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
|
||||
.assign-kiosk input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
|
||||
@media (max-width: 560px) { .assign-row[data-dev] { flex-wrap: wrap; } .assign-row[data-dev] .input { flex-basis: 100%; } }
|
||||
.attr-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
|
||||
.attr-table td { border-top: 1px solid var(--separator); padding: 7px 4px; vertical-align: top; word-break: break-word; }
|
||||
.attr-table td:first-child { color: var(--text-2); width: 40%; }
|
||||
@@ -264,7 +272,7 @@ textarea.input { resize: vertical; min-height: 76px; font-family: ui-monospace,
|
||||
.w.lit-lamp .badge { background: rgba(255, 255, 255, 0.55); color: var(--lit-text); }
|
||||
.surface-plain .w.lit-lamp, .surface-outline .w.lit-lamp { background: transparent; color: var(--w-color, var(--d-text)); --d-text-2: var(--text-2); --d-fill: var(--fill); }
|
||||
.surface-plain .w.lit-lamp .badge, .surface-outline .w.lit-lamp .badge { background: color-mix(in srgb, var(--lamp, var(--d-lit)) 45%, var(--d-lit)); color: var(--lit-text); }
|
||||
.w.lit-on .badge { background: var(--accent-w); color: #fff; }
|
||||
.w.lit-on .badge { background: var(--accent-w); color: var(--d-on-accent, #fff); }
|
||||
|
||||
/* edit mode */
|
||||
body.editing #grid { background-image: var(--cell-bg); background-repeat: repeat; min-height: calc(100% - 16px); }
|
||||
@@ -383,7 +391,7 @@ body.editing .w:hover .w-resize, body.editing .w.selected .w-resize { opacity: 1
|
||||
[aria-checked="true"] > .switch { background: var(--ok); }
|
||||
[aria-checked="true"] > .switch::after { transform: translateX(18px); }
|
||||
.btn-widget { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 100%; width: 100%; gap: 8px; }
|
||||
.btn-widget:active .badge { background: var(--accent-w); color: #fff; }
|
||||
.btn-widget:active .badge { background: var(--accent-w); color: var(--d-on-accent, #fff); }
|
||||
.text-w { white-space: pre-wrap; overflow: auto; height: 100%; line-height: 1.45; }
|
||||
.frame { width: 100%; height: 100%; border: 0; display: block; }
|
||||
.img-w { width: 100%; height: 100%; display: block; }
|
||||
@@ -495,12 +503,52 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
|
||||
/* appliance */
|
||||
.appl { display: flex; flex-direction: column; height: 100%; gap: 8px; justify-content: space-between; }
|
||||
.appl-status { margin-left: auto; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--d-fill); white-space: nowrap; }
|
||||
.appl.phase-running .appl-status { background: var(--d-accent); color: #fff; }
|
||||
.appl.phase-running .appl-status { background: var(--d-accent); color: var(--d-on-accent, #fff); }
|
||||
.theme-outline .w:not(.transparent) { border-color: var(--d-separator); }
|
||||
.appl.phase-done .appl-status { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
|
||||
.appl-big { font-size: 22px; font-weight: 700; }
|
||||
.appl-big .wt { font-size: 14px; font-weight: 400; }
|
||||
.appl .car-fill { background: var(--d-accent); }
|
||||
|
||||
/* containers: horizontal scroll and swipe */
|
||||
.w.child { position: relative; flex: none; height: 100%; }
|
||||
.hs { position: relative; height: 100%; display: flex; flex-direction: column; gap: 6px; }
|
||||
.hs-title { flex: none; padding: 0 4px; }
|
||||
.hs-track {
|
||||
flex: 1; min-height: 0; display: flex; gap: var(--d-gap, 14px); overflow-x: auto; overflow-y: hidden;
|
||||
scroll-snap-type: x mandatory; scroll-padding: 0 2px; scrollbar-width: none; overscroll-behavior-x: contain;
|
||||
}
|
||||
.hs-track::-webkit-scrollbar { display: none; }
|
||||
.hs-track > .w.child { width: var(--item-w, 260px); scroll-snap-align: start; }
|
||||
.hs-track:focus-visible { box-shadow: var(--focus); border-radius: var(--d-radius, 20px); }
|
||||
.hs-nav {
|
||||
position: absolute; top: 50%; z-index: 4; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
|
||||
background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--text);
|
||||
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); font-size: 18px; opacity: 0; transition: opacity .15s;
|
||||
}
|
||||
.hs-nav.prev { left: 6px; } .hs-nav.next { right: 6px; }
|
||||
.hs:hover .hs-nav, .hs-nav:focus-visible { opacity: 1; }
|
||||
.hs.at-start .hs-nav.prev, .hs.at-end .hs-nav.next { opacity: 0; pointer-events: none; }
|
||||
@media (hover: none) { .hs-nav { display: none; } }
|
||||
.i.back { transform: rotate(90deg); } .i.fwd { transform: rotate(-90deg); }
|
||||
.sw { height: 100%; display: flex; flex-direction: column; gap: 8px; }
|
||||
.sw-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--d-radius, 20px); }
|
||||
.sw-track::-webkit-scrollbar { display: none; }
|
||||
.sw-track > .w.child { width: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
|
||||
.sw-dots { flex: none; display: flex; justify-content: center; gap: 2px; }
|
||||
.sw-dot { width: 22px; height: 22px; display: grid; place-items: center; }
|
||||
.sw-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--d-text-2); opacity: .45; transition: width .2s, opacity .2s; }
|
||||
.sw-dot[aria-selected="true"]::after { width: 18px; border-radius: 4px; opacity: 1; background: var(--d-text); }
|
||||
.btn.back { margin: 0 0 10px; padding-left: 8px; }
|
||||
.child-list { display: flex; flex-direction: column; gap: 6px; }
|
||||
.child-item { display: flex; gap: 4px; align-items: center; }
|
||||
.child-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--fill); cursor: pointer; text-align: left; }
|
||||
.child-open:hover { background: var(--fill-strong); }
|
||||
.child-open .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
|
||||
.child-open .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.child-open .i { font-size: 18px; flex: none; }
|
||||
.child-item .btn.icon { width: 30px; min-width: 30px; flex: none; }
|
||||
|
||||
/* photos */
|
||||
.photos { position: absolute; inset: 0; background: #000; overflow: hidden; }
|
||||
.ph-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--fit, cover); opacity: 0; transition: opacity 1.2s ease; }
|
||||
|
||||
Reference in New Issue
Block a user