perf(home): reduce continuous homepage animations (#100)

* perf(home): remove continuous status and clock animations

* chore: auto-fix linting and formatting issues
This commit is contained in:
仓鼠 authored and GitHub committed 2026-10-22 11:56:43 +08:00
1 parent 2750d9858a
commit 2a250378fe
2 files changed
+9 -6

No files matched your search

+9 -4
View File
@@ -12,7 +12,6 @@ import { useWebSocketContext } from "@/hooks/use-websocket-context";
import { fetchLoginUser, fetchSetting } from "@/lib/nezha-api";
import { cn } from "@/lib/utils";
import AnimateCountClient from "./AnimatedCount";
import { LanguageSwitcher } from "./LanguageSwitcher";
import { Loader, LoadingSpinner } from "./loading/Loader";
import NumericText from "./NumericText";
@@ -358,12 +357,18 @@ function Overview() {
<p className="text-sm font-medium opacity-50">{t("whereTheTimeIs")}</p>
{mounted ? (
<div className="flex items-center font-medium text-sm">
<AnimateCountClient count={time.hh} minDigits={2} />
<span className="tabular-nums">
{String(time.hh).padStart(2, "0")}
</span>
<span className="mb-px font-medium text-sm opacity-50">:</span>
<AnimateCountClient count={time.mm} minDigits={2} />
<span className="tabular-nums">
{String(time.mm).padStart(2, "0")}
</span>
<span className="mb-px font-medium text-sm opacity-50">:</span>
<span className="font-medium text-sm">
<AnimateCountClient count={time.ss} minDigits={2} />
<span className="tabular-nums">
{String(time.ss).padStart(2, "0")}
</span>
</span>
</div>
) : (
-2
View File
@@ -91,7 +91,6 @@ export default function ServerOverview({
</p>
<div className="flex items-center gap-2">
<span className="relative flex h-2 w-2">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"></span>
<span className="relative inline-flex h-2 w-2 rounded-full bg-green-500"></span>
</span>
<NumericText value={online} className="text-lg font-semibold" />
@@ -121,7 +120,6 @@ export default function ServerOverview({
</p>
<div className="flex items-center gap-2">
<span className="relative flex h-2 w-2">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-red-500 opacity-75"></span>
<span className="relative inline-flex h-2 w-2 rounded-full bg-red-500"></span>
</span>
<NumericText value={offline} className="text-lg font-semibold" />