Compare commits

..

No commits in common. "23a32612510b390b52f60240a6a811bd27e091cf" and "79ba408d9f9d76e4ca803255111d40be02524f09" have entirely different histories.

5 changed files with 14 additions and 23 deletions

View File

@ -1,8 +1,6 @@
"use client"
import pack from "@/package.json"
import { useTranslations } from "next-intl"
import { useEffect, useState } from "react"
const GITHUB_URL = "https://github.com/hamster1963/nezha-dash"
const PERSONAL_URL = "https://buycoffee.top"
@ -29,11 +27,6 @@ export default function Footer() {
const t = useTranslations("Footer")
const version = pack.version
const currentYear = new Date().getFullYear()
const [isMac, setIsMac] = useState(true)
useEffect(() => {
setIsMac(/macintosh|mac os x/i.test(navigator.userAgent))
}, [])
return (
<footer className="mx-auto w-full max-w-5xl flex items-center justify-between">
@ -50,7 +43,7 @@ export default function Footer() {
</section>
<p className={`mt-1 ${baseTextStyles}`}>
<kbd className="pointer-events-none mx-1 inline-flex h-4 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100">
{isMac ? <span className="text-xs"></span> : "Ctrl "}K
<span className="text-xs"></span>K
</kbd>
</p>
</footer>

BIN
bun.lockb

Binary file not shown.

View File

@ -2,7 +2,7 @@
import getEnv from "@/lib/env-entry"
import { cn } from "@/lib/utils"
import { useLocale, useTranslations } from "next-intl"
import { useTranslations } from "next-intl"
import { createRef, useEffect, useRef, useState } from "react"
export default function Switch({
@ -19,7 +19,6 @@ export default function Switch({
const scrollRef = useRef<HTMLDivElement>(null)
const tagRefs = useRef(allTag.map(() => createRef<HTMLDivElement>()))
const t = useTranslations("ServerListClient")
const locale = useLocale()
const [indicator, setIndicator] = useState<{ x: number; w: number }>({
x: 0,
w: 0,
@ -59,7 +58,7 @@ export default function Switch({
w: currentTagElement.offsetWidth,
})
}
}, [nowTag, locale])
}, [nowTag])
useEffect(() => {
const currentTagElement = tagRefs.current[allTag.indexOf(nowTag)]?.current
@ -76,7 +75,7 @@ export default function Switch({
behavior: "smooth",
})
}
}, [nowTag, locale])
}, [nowTag])
return (
<div

View File

@ -1,7 +1,7 @@
"use client"
import { cn } from "@/lib/utils"
import { useLocale, useTranslations } from "next-intl"
import { useTranslations } from "next-intl"
import { useEffect, useRef, useState } from "react"
export default function TabSwitch({
@ -19,7 +19,6 @@ export default function TabSwitch({
w: 0,
})
const tabRefs = useRef<(HTMLDivElement | null)[]>([])
const locale = useLocale()
useEffect(() => {
const currentTabElement = tabRefs.current[tabs.indexOf(currentTab)]
@ -33,7 +32,7 @@ export default function TabSwitch({
w: currentTabElement.offsetWidth,
})
}
}, [currentTab, tabs, locale])
}, [currentTab, tabs])
return (
<div className="z-50 flex flex-col items-start rounded-[50px]">

View File

@ -1,6 +1,6 @@
{
"name": "nezha-dash",
"version": "2.7.1",
"version": "2.7.0",
"private": true,
"scripts": {
"dev": "next dev -p 3040",
@ -31,7 +31,7 @@
"@types/d3-geo": "^3.1.0",
"@types/luxon": "^3.4.2",
"babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
"caniuse-lite": "^1.0.30001699",
"caniuse-lite": "^1.0.30001698",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
@ -44,7 +44,7 @@
"lucide-react": "^0.474.0",
"luxon": "^3.5.0",
"maxmind": "^4.3.24",
"next": "^15.1.7",
"next": "^15.1.6",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^3.26.3",
"next-runtime-env": "^3.2.2",
@ -62,13 +62,13 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@next/bundle-analyzer": "^15.1.7",
"@tailwindcss/postcss": "^4.0.6",
"@next/bundle-analyzer": "^15.1.6",
"@tailwindcss/postcss": "^4.0.4",
"@types/node": "^22.13.1",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"postcss": "^8.5.2",
"tailwindcss": "^4.0.6",
"postcss": "^8.5.1",
"tailwindcss": "^4.0.4",
"typescript": "^5.7.3",
"vercel": "^39.4.2"
},