Dashboard Studio 2.2.1: sports match centre, Import JSON back, no double entities

- Sports card: crests in team colours, position and record, countdown,
  win-probability bar, live clock and last play, venue
- Import JSON back in the builder's menu
- Fixed: picking an entity with the keyboard added it twice; existing
  duplicates are removed when dashboards load

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 11:22:34 +01:00
parent a5823b4726
commit 05df0561b0
9 changed files with 101 additions and 34 deletions
+32 -20
View File
@@ -1152,22 +1152,6 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
@media (prefers-reduced-motion: reduce) { .gt.moving .gt-ring { animation: none; } }
/* sports */
.sp { display: flex; flex-direction: column; gap: 8px; height: 100%; justify-content: center; min-height: 0; }
.sp-league { font-size: 12px; font-weight: 600; color: var(--d-text-2); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.sp-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.sp-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.sp-team img { width: clamp(36px, 16cqmin, 64px); aspect-ratio: 1; object-fit: contain; }
.sp-badge { width: clamp(36px, 16cqmin, 64px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--d-fill); font-weight: 700; font-size: 13px; }
.sp-team > span:last-child { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-team.win > span:last-child { color: var(--ok); }
.sp-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sp-score { font-size: clamp(26px, 11cqmin, 40px); font-weight: 700; letter-spacing: -0.02em; }
.sp-score i { font-style: normal; color: var(--d-text-2); margin: 0 6px; }
.sp-time { font-size: clamp(22px, 9cqmin, 32px); font-weight: 700; }
.sp-sub { font-size: 12px; color: var(--d-text-2); white-space: nowrap; }
.sp-live { color: var(--crit); }
.sp-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); margin-right: 4px; vertical-align: 1px; animation: tz-pulse 1.4s infinite; }
.sp-extra { font-size: 12px; color: var(--d-text-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Formula One */
@@ -1701,10 +1685,6 @@ body.in-haven #btn-new { display: none; }
@media (prefers-reduced-motion: reduce) { .gt.moving .gt-big { animation: none; } }
/* sports: sentence case, crests without a disc */
.sp-league { text-transform: none; letter-spacing: 0; font-size: var(--c-fs-meta); }
.sp-badge { background: transparent; box-shadow: inset 0 0 0 1.5px var(--d-separator); font-weight: 600; }
.sp-team > span:last-child { font-size: var(--c-fs-body); }
.sp-sub, .sp-extra { font-size: var(--c-fs-meta); }
/* Formula One: the next race on one flat step, no gradient */
@@ -1960,3 +1940,35 @@ body.guest .guest-hide { display: none; }
.inv-row.ended { opacity: .6; }
.adm-panel.notice { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
@media (max-width: 760px) { .inv-form { grid-template-columns: 1fr; } }
/* sports: the match as a match centre shows it: crests in the teams' colours, the time or score in the middle */
.sp { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; justify-content: space-between; }
.sp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--c-fs-meta); color: var(--d-text-2); }
.sp-league { font-weight: 600; color: var(--d-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tv { flex: none; }
.sp-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.sp-side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.sp-logo, .sp-crest { width: clamp(40px, 15cqmin, 64px); height: clamp(40px, 15cqmin, 64px); object-fit: contain; }
.sp-crest { height: auto; aspect-ratio: 40 / 46; }
.sp-name { font-size: var(--c-fs-body); font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-meta { font-size: var(--c-fs-meta); color: var(--d-text-2); }
.sp.done .sp-side:not(.win) { opacity: .6; }
.sp-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sp-time, .sp-score { font-size: clamp(28px, 12cqmin, 46px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.sp-score i { font-style: normal; color: var(--d-text-2); margin: 0 6px; }
.sp-sub { font-size: var(--c-fs-meta); color: var(--d-text-2); white-space: nowrap; }
.sp-until { font-size: var(--c-fs-meta); font-weight: 600; color: var(--d-accent); white-space: nowrap; }
.sp-live { color: var(--crit); }
.sp-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); margin-right: 5px; vertical-align: 1px; animation: tz-pulse 1.4s infinite; }
@media (prefers-reduced-motion: reduce) { .sp-live::before { animation: none; } }
.sp-odds { display: flex; flex-direction: column; gap: 4px; }
.sp-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--d-text) 60%, transparent); }
.sp-bar i.d { background: var(--d-fill); }
.sp-odds-l { display: flex; justify-content: space-between; font-size: var(--c-fs-meta); color: var(--d-text-2); }
.sp-place, .sp-play { display: flex; align-items: center; gap: 6px; font-size: var(--c-fs-meta); color: var(--d-text-2); min-width: 0; }
.sp-place .i { font-size: 14px; flex: none; }
.sp-place span, .sp-play { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-play { color: var(--d-text); }
@container (max-height: 230px) { .sp-odds, .sp-place, .sp-play { display: none; } }
@container (max-height: 170px) { .sp-meta, .sp-head { display: none; } }