mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: not-found page height
This commit is contained in:
parent
4de49cb3ab
commit
6e6a3315b8
@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import NetworkChartLoading from "@/app/(main)/ClientComponents/NetworkChartLoading"
|
|
||||||
import { NezhaAPIMonitor, ServerMonitorChart } from "@/app/types/nezha-api"
|
import { NezhaAPIMonitor, ServerMonitorChart } from "@/app/types/nezha-api"
|
||||||
|
import NetworkChartLoading from "@/components/loading/NetworkChartLoading"
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||||
import {
|
import {
|
||||||
ChartConfig,
|
ChartConfig,
|
@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { ServerDetailChartLoading } from "@/app/(main)/ClientComponents/ServerDetailLoading"
|
|
||||||
import { NezhaAPISafe, ServerApi } from "@/app/types/nezha-api"
|
import { NezhaAPISafe, ServerApi } from "@/app/types/nezha-api"
|
||||||
|
import { ServerDetailChartLoading } from "@/components/loading/ServerDetailLoading"
|
||||||
import AnimatedCircularProgressBar from "@/components/ui/animated-circular-progress-bar"
|
import AnimatedCircularProgressBar from "@/components/ui/animated-circular-progress-bar"
|
||||||
import { Card, CardContent } from "@/components/ui/card"
|
import { Card, CardContent } from "@/components/ui/card"
|
||||||
import { ChartConfig, ChartContainer } from "@/components/ui/chart"
|
import { ChartConfig, ChartContainer } from "@/components/ui/chart"
|
@ -1,9 +1,9 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { ServerDetailLoading } from "@/app/(main)/ClientComponents/ServerDetailLoading"
|
|
||||||
import { NezhaAPISafe, ServerApi } from "@/app/types/nezha-api"
|
import { NezhaAPISafe, ServerApi } from "@/app/types/nezha-api"
|
||||||
import { BackIcon } from "@/components/Icon"
|
import { BackIcon } from "@/components/Icon"
|
||||||
import ServerFlag from "@/components/ServerFlag"
|
import ServerFlag from "@/components/ServerFlag"
|
||||||
|
import { ServerDetailLoading } from "@/components/loading/ServerDetailLoading"
|
||||||
import { Badge } from "@/components/ui/badge"
|
import { Badge } from "@/components/ui/badge"
|
||||||
import { Card, CardContent } from "@/components/ui/card"
|
import { Card, CardContent } from "@/components/ui/card"
|
||||||
import getEnv from "@/lib/env-entry"
|
import getEnv from "@/lib/env-entry"
|
@ -4,11 +4,11 @@ import { ServerApi } from "@/app/types/nezha-api"
|
|||||||
import { nezhaFetcher } from "@/lib/utils"
|
import { nezhaFetcher } from "@/lib/utils"
|
||||||
import useSWRImmutable from "swr/immutable"
|
import useSWRImmutable from "swr/immutable"
|
||||||
|
|
||||||
import { geoJsonString } from "../../../lib/geo-json-string"
|
import GlobalLoading from "../../../../components/loading/GlobalLoading"
|
||||||
|
import { geoJsonString } from "../../../../lib/geo-json-string"
|
||||||
|
import { TooltipProvider } from "../detail/TooltipContext"
|
||||||
import GlobalInfo from "./GlobalInfo"
|
import GlobalInfo from "./GlobalInfo"
|
||||||
import GlobalLoading from "./GlobalLoading"
|
|
||||||
import { InteractiveMap } from "./InteractiveMap"
|
import { InteractiveMap } from "./InteractiveMap"
|
||||||
import { TooltipProvider } from "./TooltipContext"
|
|
||||||
|
|
||||||
export default function ServerGlobal() {
|
export default function ServerGlobal() {
|
||||||
const { data: nezhaServerList, error } = useSWRImmutable<ServerApi>("/api/server", nezhaFetcher)
|
const { data: nezhaServerList, error } = useSWRImmutable<ServerApi>("/api/server", nezhaFetcher)
|
@ -3,8 +3,8 @@
|
|||||||
import { countryCoordinates } from "@/lib/geo-limit"
|
import { countryCoordinates } from "@/lib/geo-limit"
|
||||||
import { geoEquirectangular, geoPath } from "d3-geo"
|
import { geoEquirectangular, geoPath } from "d3-geo"
|
||||||
|
|
||||||
|
import { useTooltip } from "../detail/TooltipContext"
|
||||||
import MapTooltip from "./MapTooltip"
|
import MapTooltip from "./MapTooltip"
|
||||||
import { useTooltip } from "./TooltipContext"
|
|
||||||
|
|
||||||
interface InteractiveMapProps {
|
interface InteractiveMapProps {
|
||||||
countries: string[]
|
countries: string[]
|
@ -4,7 +4,7 @@ import { AnimatePresence, m } from "framer-motion"
|
|||||||
import { useTranslations } from "next-intl"
|
import { useTranslations } from "next-intl"
|
||||||
import { memo } from "react"
|
import { memo } from "react"
|
||||||
|
|
||||||
import { useTooltip } from "./TooltipContext"
|
import { useTooltip } from "../detail/TooltipContext"
|
||||||
|
|
||||||
const MapTooltip = memo(function MapTooltip() {
|
const MapTooltip = memo(function MapTooltip() {
|
||||||
const { tooltipData } = useTooltip()
|
const { tooltipData } = useTooltip()
|
@ -14,7 +14,7 @@ import dynamic from "next/dynamic"
|
|||||||
import { useEffect, useRef, useState } from "react"
|
import { useEffect, useRef, useState } from "react"
|
||||||
import useSWR from "swr"
|
import useSWR from "swr"
|
||||||
|
|
||||||
import GlobalLoading from "./GlobalLoading"
|
import GlobalLoading from "../../../../components/loading/GlobalLoading"
|
||||||
|
|
||||||
const ServerGlobal = dynamic(() => import("./Global"), {
|
const ServerGlobal = dynamic(() => import("./Global"), {
|
||||||
ssr: false,
|
ssr: false,
|
@ -1,5 +1,5 @@
|
|||||||
import ServerListClient from "./ClientComponents/ServerListClient"
|
import ServerListClient from "./ClientComponents/main/ServerListClient"
|
||||||
import ServerOverviewClient from "./ClientComponents/ServerOverviewClient"
|
import ServerOverviewClient from "./ClientComponents/main/ServerOverviewClient"
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
return (
|
return (
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { NetworkChartClient } from "@/app/(main)/ClientComponents/NetworkChart"
|
import { NetworkChartClient } from "@/app/(main)/ClientComponents/detail/NetworkChart"
|
||||||
import ServerDetailChartClient from "@/app/(main)/ClientComponents/ServerDetailChartClient"
|
import ServerDetailChartClient from "@/app/(main)/ClientComponents/detail/ServerDetailChartClient"
|
||||||
import ServerDetailClient from "@/app/(main)/ClientComponents/ServerDetailClient"
|
import ServerDetailClient from "@/app/(main)/ClientComponents/detail/ServerDetailClient"
|
||||||
import TabSwitch from "@/components/TabSwitch"
|
import TabSwitch from "@/components/TabSwitch"
|
||||||
import { Separator } from "@/components/ui/separator"
|
import { Separator } from "@/components/ui/separator"
|
||||||
import getEnv from "@/lib/env-entry"
|
import getEnv from "@/lib/env-entry"
|
||||||
import { use, useState } from "react"
|
import { use, useState } from "react"
|
||||||
|
|
||||||
import ServerIPInfo from "../../ClientComponents/ServerIPInfo"
|
import ServerIPInfo from "../../ClientComponents/detail/ServerIPInfo"
|
||||||
|
|
||||||
export default function Page(props: { params: Promise<{ id: string }> }) {
|
export default function Page(props: { params: Promise<{ id: string }> }) {
|
||||||
const params = use(props.params)
|
const params = use(props.params)
|
||||||
|
@ -10,7 +10,7 @@ export default function NotFoundPage() {
|
|||||||
<div className="flex min-h-screen w-full flex-col">
|
<div className="flex min-h-screen w-full flex-col">
|
||||||
<main className="flex min-h-[calc(100vh-calc(var(--spacing)*16))] flex-1 flex-col gap-4 bg-background p-4 md:p-10 md:pt-8">
|
<main className="flex min-h-[calc(100vh-calc(var(--spacing)*16))] flex-1 flex-col gap-4 bg-background p-4 md:p-10 md:pt-8">
|
||||||
<Header />
|
<Header />
|
||||||
<section className="flex flex-col items-center min-h-44 justify-center gap-2">
|
<section className="flex flex-col items-center flex-1 justify-center gap-2">
|
||||||
<p className="text-sm font-semibold">{t("h1_490-590_404NotFound")}</p>
|
<p className="text-sm font-semibold">{t("h1_490-590_404NotFound")}</p>
|
||||||
<Link href="/" className="flex items-center gap-1">
|
<Link href="/" className="flex items-center gap-1">
|
||||||
<p className="text-sm font-medium opacity-40">{t("h1_490-590_404NotFoundBack")}</p>
|
<p className="text-sm font-medium opacity-40">{t("h1_490-590_404NotFoundBack")}</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user