mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
4 Commits
28d1399b2f
...
ac15be6e71
Author | SHA1 | Date | |
---|---|---|---|
|
ac15be6e71 | ||
|
b1bcd7227d | ||
|
29b545706e | ||
|
8bb5ea0cf7 |
@ -56,14 +56,14 @@ export function InteractiveMap({
|
||||
fill="transparent"
|
||||
onMouseEnter={() => setTooltipData(null)}
|
||||
/>
|
||||
{filteredFeatures.map((feature) => {
|
||||
{filteredFeatures.map((feature, index) => {
|
||||
const isHighlighted = countries.includes(feature.properties.iso_a2_eh)
|
||||
|
||||
const serverCount = serverCounts[feature.properties.iso_a2_eh] || 0
|
||||
|
||||
return (
|
||||
<path
|
||||
key={feature.properties.iso_a2_eh}
|
||||
key={feature.properties.iso_a2_eh + String(index)}
|
||||
d={path(feature) || ""}
|
||||
className={
|
||||
isHighlighted
|
||||
|
@ -4,6 +4,7 @@ import AnimateCountClient from "@/components/AnimatedCount"
|
||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher"
|
||||
import { ModeToggle } from "@/components/ThemeSwitcher"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { Skeleton } from "@/components/ui/skeleton"
|
||||
|
||||
import getEnv from "@/lib/env-entry"
|
||||
import { DateTime } from "luxon"
|
||||
@ -71,19 +72,30 @@ const Links = memo(function Links() {
|
||||
const Overview = memo(function Overview() {
|
||||
const t = useTranslations("Overview")
|
||||
const time = useCurrentTime()
|
||||
const [mounted, setMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<section className={"mt-10 flex flex-col md:mt-16"}>
|
||||
<p className="font-semibold text-base">{t("p_2277-2331_Overview")}</p>
|
||||
<div className="flex items-center gap-1">
|
||||
<p className="font-medium text-sm opacity-50">{t("p_2390-2457_wherethetimeis")}</p>
|
||||
<div className="flex items-center font-medium text-sm">
|
||||
<AnimateCountClient count={time.hh} minDigits={2} />
|
||||
<span className="mb-[1px] font-medium text-sm opacity-50">:</span>
|
||||
<AnimateCountClient count={time.mm} minDigits={2} />
|
||||
<span className="mb-[1px] font-medium text-sm opacity-50">:</span>
|
||||
<span className="font-medium text-sm">{time.ss.toString().padStart(2, "0")}</span>
|
||||
</div>
|
||||
{mounted ? (
|
||||
<div className="flex items-center font-medium text-sm">
|
||||
<AnimateCountClient count={time.hh} minDigits={2} />
|
||||
<span className="mb-[1px] font-medium text-sm opacity-50">:</span>
|
||||
<AnimateCountClient count={time.mm} minDigits={2} />
|
||||
<span className="mb-[1px] font-medium text-sm opacity-50">:</span>
|
||||
<span className="font-medium text-sm">
|
||||
<AnimateCountClient count={time.ss} minDigits={2} />
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<Skeleton className="h-[21px] w-16 animate-none rounded-[5px] bg-muted-foreground/10" />
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "nezha-dash",
|
||||
"version": "2.8.0",
|
||||
"version": "2.8.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3040",
|
||||
"dev": "next dev --turbopack -p 3040",
|
||||
"start": "node .next/standalone/server.js",
|
||||
"lint": "biome lint",
|
||||
"lint:fix": "biome lint --fix",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user