feat: introduce Vue Bootstrap interface and scoped router network status

This commit is contained in:
Codex
2026-10-05 20:23:05 +08:00
parent cf895110ee
commit 04d56d5aa2
48 changed files with 4096 additions and 145 deletions
+20
View File
@@ -0,0 +1,20 @@
import scripts from './scripts.json'
// Existing domain controllers keep their event contracts while pages migrate to Vue.
// This observer styles only controls; it never owns their state or recreates players.
export function enhance(root){
if(!(root instanceof Element))return
const elements=[root,...root.querySelectorAll('button,input,select,textarea,table')]
for(const el of elements){
if(el.matches('button')&&!el.closest('.family-map-viewport')&&!el.classList.contains('btn'))el.classList.add('btn',el.matches('.quiet,.secondary')?'btn-outline-secondary':'btn-primary')
if(el.matches('select'))el.classList.add('form-select')
if(el.matches('textarea,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden])'))el.classList.add('form-control')
if(el.matches('input[type=checkbox],input[type=radio]'))el.classList.add('form-check-input')
if(el.matches('table'))el.classList.add('table','align-middle')
}
}
export async function loadControllers(){
enhance(document.getElementById('app'))
new MutationObserver(records=>{for(const record of records)for(const node of record.addedNodes)enhance(node)}).observe(document.getElementById('app'),{childList:true,subtree:true})
for(const path of [...scripts,'/vue-bridge.js'])await new Promise((resolve,reject)=>{const script=document.createElement('script');script.src=path+'?ui=0.1.35';script.onload=resolve;script.onerror=()=>reject(new Error('Could not load '+path));document.head.append(script)})
await window.ZhaoVue.boot()
}
+28
View File
@@ -0,0 +1,28 @@
[
"/vendor/hls.min.js",
"/live-player.js",
"/kinship.js",
"/family-graph.js",
"/calendar.js",
"/device-model.js",
"/data/geography-data.js",
"/geography.js",
"/app.js",
"/monitor.js",
"/date-fields.js",
"/family-map.js",
"/family.js",
"/family-events.js",
"/family-history.js",
"/camera-settings.js",
"/recording-ranges.js",
"/recording-ui.js",
"/snapshot.js",
"/households.js",
"/devices.js",
"/steward.js",
"/heritage.js",
"/personalization.js",
"/file-hash.js",
"/journal.js"
]