feat(health): Little Blue health band — avatar, grouped service tiles, local icons
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { el, mount } from '../dom.js';
|
||||
import { api } from '../api.js';
|
||||
import { renderHealthBand, stopHealthBand } from './health_band.js';
|
||||
import { svCard } from '../components/sv_card.js';
|
||||
import { attachReorder } from '../components/sv_reorder.js';
|
||||
import { orderCards } from './cards/registry.js';
|
||||
@@ -15,7 +16,7 @@ const CARD_MODULES = [clock, weather, hostPerf, jobs, inbox, search, speedtest];
|
||||
let active = []; // mounted cards needing stop()
|
||||
|
||||
export async function render(main) {
|
||||
active.forEach(c => c.stop && c.stop()); active = [];
|
||||
active.forEach(c => c.stop && c.stop()); active = []; stopHealthBand();
|
||||
mount(main,
|
||||
el('h1', { class: 'view-h1' }, 'Sacred Valley'),
|
||||
el('p', { class: 'view-sub' }, 'The homelab, at a glance.'),
|
||||
@@ -43,5 +44,5 @@ export async function render(main) {
|
||||
try { await api.put('/api/dashboard/layout', { ...layout, card_order: newOrder }); layout.card_order = newOrder; }
|
||||
catch (e) { console.error('save layout', e); }
|
||||
});
|
||||
// health band wiring arrives in Task 22.
|
||||
renderHealthBand(document.getElementById('sv-health'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user