mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: chart button
This commit is contained in:
parent
c6803a7e87
commit
7cfcd1aec0
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> 此为 V0 兼容版本,V1 版本 issue 也可提出
|
> 此为 V0 兼容版本,V1 版本 issue 也可提出
|
||||||
>
|
>
|
||||||
> 有关 V1 版本 pr 可移步 https://github.com/hamster1963/nezha-dash-react
|
> 有关 V1 版本 pr 可移步 https://github.com/hamster1963/nezha-dash-react
|
||||||
|
|
||||||
### 部署
|
### 部署
|
||||||
|
@ -128,7 +128,7 @@ export const NetworkChart = React.memo(function NetworkChart({
|
|||||||
<button
|
<button
|
||||||
key={key}
|
key={key}
|
||||||
data-active={activeChart === key}
|
data-active={activeChart === key}
|
||||||
className={`relative z-30 flex cursor-pointer flex-1 flex-col justify-center gap-1 border-b border-neutral-200 dark:border-neutral-800 px-6 py-4 text-left data-[active=true]:bg-muted/50 sm:border-l sm:border-t-0 sm:px-6`}
|
className={`relative z-30 flex cursor-pointer grow basis-0 min-w-[200px] flex-col justify-center gap-1 border-b border-neutral-200 dark:border-neutral-800 px-6 py-4 text-left data-[active=true]:bg-muted/50 sm:border-l sm:border-t-0 sm:px-6`}
|
||||||
onClick={() => handleButtonClick(key)}
|
onClick={() => handleButtonClick(key)}
|
||||||
>
|
>
|
||||||
<span className="whitespace-nowrap text-xs text-muted-foreground">
|
<span className="whitespace-nowrap text-xs text-muted-foreground">
|
||||||
@ -180,7 +180,7 @@ export const NetworkChart = React.memo(function NetworkChart({
|
|||||||
{chartDataKey.length} {t("ServerMonitorCount")}
|
{chartDataKey.length} {t("ServerMonitorCount")}
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-wrap">{chartButtons}</div>
|
<div className="flex flex-wrap w-full">{chartButtons}</div>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="pr-2 pl-0 py-4 sm:pt-6 sm:pb-6 sm:pr-6 sm:pl-2">
|
<CardContent className="pr-2 pl-0 py-4 sm:pt-6 sm:pb-6 sm:pr-6 sm:pl-2">
|
||||||
<ChartContainer
|
<ChartContainer
|
||||||
|
@ -99,7 +99,7 @@ function Links() {
|
|||||||
|
|
||||||
// https://github.com/streamich/react-use/blob/master/src/useInterval.ts
|
// https://github.com/streamich/react-use/blob/master/src/useInterval.ts
|
||||||
const useInterval = (callback: () => void, delay: number | null) => {
|
const useInterval = (callback: () => void, delay: number | null) => {
|
||||||
const savedCallback = useRef<() => void>(() => { });
|
const savedCallback = useRef<() => void>(() => {});
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
savedCallback.current = callback;
|
savedCallback.current = callback;
|
||||||
});
|
});
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import ServerList from "@/components/ServerList";
|
import ServerList from "@/components/ServerList";
|
||||||
import ServerOverview from "@/components/ServerOverview";
|
import ServerOverview from "@/components/ServerOverview";
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
|
|
||||||
import ServerGlobal from "./ClientComponents/Global";
|
import ServerGlobal from "./ClientComponents/Global";
|
||||||
import GlobalLoading from "./ClientComponents/GlobalLoading";
|
import GlobalLoading from "./ClientComponents/GlobalLoading";
|
||||||
|
|
||||||
|
export const runtime = "edge";
|
||||||
|
|
||||||
export default async function Home({
|
export default async function Home({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
import Footer from "./(main)/footer";
|
import Footer from "./(main)/footer";
|
||||||
import Header from "./(main)/header";
|
import Header from "./(main)/header";
|
||||||
|
|
||||||
|
export const runtime = "edge";
|
||||||
|
|
||||||
export default function NotFoundPage() {
|
export default function NotFoundPage() {
|
||||||
const t = useTranslations("NotFoundPage");
|
const t = useTranslations("NotFoundPage");
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user