Redesign web inspector UI: 3-panel layout, templates, external CSS
- index.html: minimal shell with <template> elements for all repeated DOM structures (node-item, device-group, device-item, ctrl-group, ctrl-row, capture-badge); links external style.css - style.css: all styles extracted from index.html - lib/dom.mjs: by_id, qs, clone, show, hide helpers - app.mjs: persistent SSE node list replaces Discover button; clicking a node connects to it; uses clone()/replaceChildren() throughout; no innerHTML for structure; event wiring at bottom Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
5
dev/web/public/lib/dom.mjs
Normal file
5
dev/web/public/lib/dom.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
export const by_id = id => document.getElementById(id);
|
||||
export const qs = (sel, root = document) => root.querySelector(sel);
|
||||
export const clone = id => document.getElementById(id).content.cloneNode(true).firstElementChild;
|
||||
export const show = el => el.removeAttribute('hidden');
|
||||
export const hide = el => el.setAttribute('hidden', '');
|
||||
Reference in New Issue
Block a user