mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-18 03:06:16 +01:00
site static directory + other site updates
This commit is contained in:
@@ -80,22 +80,22 @@ const App = () => {
|
||||
// update favicon
|
||||
useEffect(() => {
|
||||
if (!authenticated || !servers.length) {
|
||||
updateFavicon('/favicon.svg')
|
||||
updateFavicon('favicon.svg')
|
||||
} else {
|
||||
let up = false
|
||||
for (const server of servers) {
|
||||
if (server.status === 'down') {
|
||||
updateFavicon('/favicon-red.svg')
|
||||
return () => updateFavicon('/favicon.svg')
|
||||
updateFavicon('favicon-red.svg')
|
||||
return () => updateFavicon('favicon.svg')
|
||||
} else if (server.status === 'up') {
|
||||
up = true
|
||||
}
|
||||
}
|
||||
updateFavicon(up ? '/favicon-green.svg' : '/favicon.svg')
|
||||
return () => updateFavicon('/favicon.svg')
|
||||
updateFavicon(up ? 'favicon-green.svg' : 'favicon.svg')
|
||||
return () => updateFavicon('favicon.svg')
|
||||
}
|
||||
return () => {
|
||||
updateFavicon('/favicon.svg')
|
||||
updateFavicon('favicon.svg')
|
||||
}
|
||||
}, [authenticated, servers])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user