Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion web/src/components/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ import type { Lang } from "@/i18n/dict";
import { TelemetryTicker } from "@/components/TelemetryTicker";
import { useVersion } from "@/api/hooks";

const PANEL_VERSION = __PANEL_VERSION__;

export function AppHeader() {
const { session, sudo } = useAuth();
const { resolved, toggle: toggleTheme } = useTheme();
const { t, lang, setLang } = useI18n();
const navigate = useNavigate();
const panelVersion = useVersion().data;
const panelVersion = useVersion().data ?? PANEL_VERSION;
const [searchFocused, setSearchFocused] = useState(false);
const [langOpen, setLangOpen] = useState(false);

Expand Down
4 changes: 3 additions & 1 deletion web/src/pages/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { AnimatedCounter } from "@/components/AnimatedCounter";
import { cn, formatBytes, formatSpeed } from "@/lib/utils";
import { SystemGauges } from "@/components/SystemGauges";

const PANEL_VERSION = __PANEL_VERSION__;

function fmtUptime(sec: number): string {
const d = Math.floor(sec / 86400);
const h = Math.floor((sec % 86400) / 3600);
Expand Down Expand Up @@ -105,7 +107,7 @@ export function Overview() {
const { data, isLoading: overviewLoading } = useOverview();
const sys = useSystem();
const nodesQ = useNodes();
const panelVersion = useVersion().data;
const panelVersion = useVersion().data ?? PANEL_VERSION;
const { t } = useI18n();
const [trafficRange, setTrafficRange] = useState<TrafficRange>("24h");
const trafficSeries = useTrafficSeries(trafficRange);
Expand Down