tangled
alpha
login
or
join now
danielmorrisey.com
/
plcbundle-watch
forked from
tree.fail/plcbundle-watch
0
fork
atom
this repo has no description
plcbundle-watch.pages.dev
0
fork
atom
overview
issues
pulls
pipelines
add title status
tree.fail
4 months ago
8c1e13bf
a2046406
+11
1 changed file
expand all
collapse all
unified
split
src
App.svelte
+11
src/App.svelte
···
6
6
import instancesData from './instances.json';
7
7
import numeral from 'numeral';
8
8
9
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
111
+
document.title = genTitle()
110
112
setTimeout(() => { canRefresh = true }, 500)
113
113
+
}
114
114
+
115
115
+
function genTitle () {
116
116
+
const arr = []
117
117
+
if (lastUpdated > 0) {
118
118
+
const upCount = instances.filter(i => i._head)
119
119
+
arr.push(`${isConflict ? '⚠️' : '✅'} [${upCount.length}/${instances.length}]`)
120
120
+
}
121
121
+
return [...arr, APP_TITLE].join(' ')
111
122
}
112
123
113
124
onMount(async () => {