refactor: replace status strings with systemstatus enum

- also small style changes after tailwind update
This commit is contained in:
henrygd
2025-08-23 20:35:18 -04:00
parent 3c4ae46f50
commit 0f5b1b5157
8 changed files with 50 additions and 72 deletions

View File

@@ -15,6 +15,7 @@ import Navbar from "./components/navbar.tsx"
import { I18nProvider } from "@lingui/react"
import { i18n } from "@lingui/core"
import { getLocale, dynamicActivate } from "./lib/i18n.ts"
import { SystemStatus } from "./lib/enums.ts"
// const ServerDetail = lazy(() => import('./components/routes/system.tsx'))
const LoginPage = lazy(() => import("./components/login/login.tsx"))
@@ -50,10 +51,10 @@ const App = memo(() => {
} else {
let up = false
for (const system of systems) {
if (system.status === "down") {
if (system.status === SystemStatus.Down) {
updateFavicon("favicon-red.svg")
return
} else if (system.status === "up") {
} else if (system.status === SystemStatus.Up) {
up = true
}
}