add title status

Changed files
+11
src
+11
src/App.svelte
··· 6 6 import instancesData from './instances.json'; 7 7 import numeral from 'numeral'; 8 8 9 + const APP_TITLE = 'plcbundle instances' 9 10 const PLC_DIRECTORY = 'plc.directory' 10 11 const ROOT = 'cbab6809a136d6a621906ee11199d3b0faf85b422fe0d0d2c346ce8e9dcd7485' 11 12 const AUTO_REFRESH_INTERVAL = 10 // in seconds ··· 107 108 recalculateHead() 108 109 })) 109 110 isUpdating = false 111 + document.title = genTitle() 110 112 setTimeout(() => { canRefresh = true }, 500) 113 + } 114 + 115 + function genTitle () { 116 + const arr = [] 117 + if (lastUpdated > 0) { 118 + const upCount = instances.filter(i => i._head) 119 + arr.push(`${isConflict ? '⚠️' : '✅'} [${upCount.length}/${instances.length}]`) 120 + } 121 + return [...arr, APP_TITLE].join(' ') 111 122 } 112 123 113 124 onMount(async () => {