mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-11-05 01:10:20 +00:00
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:
2 files changed
+9
-6
No files matched your search
@@ -12,7 +12,6 @@ import { useWebSocketContext } from "@/hooks/use-websocket-context";
|
|||||||
import { fetchLoginUser, fetchSetting } from "@/lib/nezha-api";
|
import { fetchLoginUser, fetchSetting } from "@/lib/nezha-api";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
import AnimateCountClient from "./AnimatedCount";
|
|
||||||
import { LanguageSwitcher } from "./LanguageSwitcher";
|
import { LanguageSwitcher } from "./LanguageSwitcher";
|
||||||
import { Loader, LoadingSpinner } from "./loading/Loader";
|
import { Loader, LoadingSpinner } from "./loading/Loader";
|
||||||
import NumericText from "./NumericText";
|
import NumericText from "./NumericText";
|
||||||
@@ -358,12 +357,18 @@ function Overview() {
|
|||||||
<p className="text-sm font-medium opacity-50">{t("whereTheTimeIs")}</p>
|
<p className="text-sm font-medium opacity-50">{t("whereTheTimeIs")}</p>
|
||||||
{mounted ? (
|
{mounted ? (
|
||||||
<div className="flex items-center font-medium text-sm">
|
<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>
|
<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="mb-px font-medium text-sm opacity-50">:</span>
|
||||||
<span className="font-medium text-sm">
|
<span className="font-medium text-sm">
|
||||||
<AnimateCountClient count={time.ss} minDigits={2} />
|
<span className="tabular-nums">
|
||||||
|
{String(time.ss).padStart(2, "0")}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ export default function ServerOverview({
|
|||||||
</p>
|
</p>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="relative flex h-2 w-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 className="relative inline-flex h-2 w-2 rounded-full bg-green-500"></span>
|
||||||
</span>
|
</span>
|
||||||
<NumericText value={online} className="text-lg font-semibold" />
|
<NumericText value={online} className="text-lg font-semibold" />
|
||||||
@@ -121,7 +120,6 @@ export default function ServerOverview({
|
|||||||
</p>
|
</p>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="relative flex h-2 w-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 className="relative inline-flex h-2 w-2 rounded-full bg-red-500"></span>
|
||||||
</span>
|
</span>
|
||||||
<NumericText value={offline} className="text-lg font-semibold" />
|
<NumericText value={offline} className="text-lg font-semibold" />
|
||||||
|
|||||||
Reference in new issue
Block a user