feat(health): Little Blue health band — avatar, grouped service tiles, local icons

This commit is contained in:
root
2026-06-02 23:01:08 +10:00
parent b0d54a24cc
commit 9c125cedba
5 changed files with 83 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
import { el, safeHref } from '../dom.js';
export function serviceTile(s) {
const img = el('img', { class: 'tile-icon', loading: 'lazy', src: `/api/icons/${s.icon}.png`, alt: s.name });
img.onerror = () => img.replaceWith(el('div', { class: 'tile-icon-fb' }, (s.name[0] || '?').toUpperCase()));
return el('a', { class: `tile status-${s.status}`, href: safeHref(s.url), target: '_blank', rel: 'noreferrer' },
img,
el('div', { class: 'tile-main' },
el('div', { class: 'tile-nm' }, el('span', { class: 'dot' }), s.name),
el('div', { class: 'tile-host' }, s.host || '')),
el('span', { class: 'tile-go' }, 'open ↗'));
}