mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
3 Commits
724d578119
...
2f04cceb1d
Author | SHA1 | Date | |
---|---|---|---|
|
2f04cceb1d | ||
|
724e76c815 | ||
|
10b3569e3a |
7
.github/workflows/Deploy.yml
vendored
7
.github/workflows/Deploy.yml
vendored
@ -31,6 +31,13 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to AliYun Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.cn-guangzhou.aliyuncs.com
|
||||||
|
username: ${{ secrets.ALI_USERNAME }}
|
||||||
|
password: ${{ secrets.ALI_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
|
4
.github/workflows/sync.yml
vendored
4
.github/workflows/sync.yml
vendored
@ -25,8 +25,8 @@ jobs:
|
|||||||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
|
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
|
||||||
with:
|
with:
|
||||||
upstream_sync_repo: hamster1963/nezha-dash
|
upstream_sync_repo: hamster1963/nezha-dash
|
||||||
upstream_sync_branch: cloudflare
|
upstream_sync_branch: main
|
||||||
target_sync_branch: cloudflare
|
target_sync_branch: main
|
||||||
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
|
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
|
||||||
|
|
||||||
# Set test_mode true to run tests instead of the true action!!
|
# Set test_mode true to run tests instead of the true action!!
|
||||||
|
@ -17,7 +17,6 @@ import useSWR from "swr";
|
|||||||
import GlobalLoading from "./GlobalLoading";
|
import GlobalLoading from "./GlobalLoading";
|
||||||
|
|
||||||
const ServerGlobal = dynamic(() => import("./Global"), {
|
const ServerGlobal = dynamic(() => import("./Global"), {
|
||||||
ssr: false,
|
|
||||||
loading: () => <GlobalLoading />,
|
loading: () => <GlobalLoading />,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -48,9 +48,7 @@ export default function ServerOverviewClient() {
|
|||||||
setFilter(false);
|
setFilter(false);
|
||||||
setStatus("all");
|
setStatus("all");
|
||||||
}}
|
}}
|
||||||
className={cn(
|
className={cn("cursor-pointer hover:border-blue-500 transition-all")}
|
||||||
"cursor-pointer hover:border-blue-500 transition-all group",
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<CardContent className="flex h-full items-center px-6 py-3">
|
<CardContent className="flex h-full items-center px-6 py-3">
|
||||||
<section className="flex flex-col gap-1">
|
<section className="flex flex-col gap-1">
|
||||||
@ -150,7 +148,7 @@ export default function ServerOverviewClient() {
|
|||||||
setFilter(true);
|
setFilter(true);
|
||||||
}}
|
}}
|
||||||
className={cn(
|
className={cn(
|
||||||
"cursor-pointer hover:ring-purple-500 ring-1 ring-transparent transition-all group",
|
"cursor-pointer hover:ring-purple-500 ring-1 ring-transparent transition-all",
|
||||||
{
|
{
|
||||||
"ring-purple-500 ring-2 border-transparent": filter === true,
|
"ring-purple-500 ring-2 border-transparent": filter === true,
|
||||||
},
|
},
|
||||||
@ -192,7 +190,7 @@ export default function ServerOverviewClient() {
|
|||||||
</section>
|
</section>
|
||||||
{!disableCartoon && (
|
{!disableCartoon && (
|
||||||
<Image
|
<Image
|
||||||
className="absolute right-3 top-[-85px] z-10 w-20 scale-90 group-hover:opacity-50 md:scale-100 transition-all"
|
className="pointer-events-none absolute right-3 top-[-85px] z-10 w-20 scale-90 md:scale-100"
|
||||||
alt={"Hamster1963"}
|
alt={"Hamster1963"}
|
||||||
src={blogMan}
|
src={blogMan}
|
||||||
priority
|
priority
|
||||||
|
@ -16,13 +16,11 @@ export default function Footer() {
|
|||||||
>
|
>
|
||||||
{t("a_303-585_GitHub")}
|
{t("a_303-585_GitHub")}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<p
|
||||||
href={`https://github.com/hamster1963/nezha-dash/releases/tag/v${version}`}
|
className="font-normal"
|
||||||
target="_blank"
|
|
||||||
className="cursor-pointer font-normal underline decoration-yellow-500 hover:decoration-yellow-600 transition-colors decoration-2 underline-offset-2 dark:decoration-yellow-500/60 dark:hover:decoration-yellow-500/80"
|
|
||||||
>
|
>
|
||||||
v{version}
|
{version}
|
||||||
</a>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50">
|
<section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50">
|
||||||
{t("section_607-869_2020")}
|
{t("section_607-869_2020")}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ServerList from "@/components/ServerList";
|
import ServerList from "@/components/ServerList";
|
||||||
import ServerOverview from "@/components/ServerOverview";
|
import ServerOverview from "@/components/ServerOverview";
|
||||||
|
|
||||||
export const runtime = "edge";
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
return (
|
return (
|
||||||
|
@ -7,7 +7,7 @@ import TabSwitch from "@/components/TabSwitch";
|
|||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { use, useState } from "react";
|
import { use, useState } from "react";
|
||||||
|
|
||||||
export const runtime = "edge";
|
export const runtime = 'edge';
|
||||||
|
|
||||||
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);
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { handlers } from "@/auth";
|
import { handlers } from "@/auth";
|
||||||
|
|
||||||
// Referring to the auth.ts we just created
|
export const runtime = 'edge';
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
export const { GET, POST } = handlers;
|
export const { GET, POST } = handlers;
|
||||||
|
@ -4,10 +4,10 @@ import { GetServerDetail } from "@/lib/serverFetch";
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
interface ResError extends Error {
|
interface ResError extends Error {
|
||||||
statusCode: number;
|
statusCode: number;
|
||||||
message: string;
|
message: string;
|
||||||
|
@ -4,10 +4,10 @@ import { GetServerMonitor } from "@/lib/serverFetch";
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
interface ResError extends Error {
|
interface ResError extends Error {
|
||||||
statusCode: number;
|
statusCode: number;
|
||||||
message: string;
|
message: string;
|
||||||
|
@ -6,7 +6,7 @@ import { NextResponse } from "next/server";
|
|||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export const runtime = "edge";
|
export const runtime = 'edge';
|
||||||
|
|
||||||
interface ResError extends Error {
|
interface ResError extends Error {
|
||||||
statusCode: number;
|
statusCode: number;
|
||||||
|
@ -15,6 +15,8 @@ import { ThemeProvider } from "next-themes";
|
|||||||
import { Inter as FontSans } from "next/font/google";
|
import { Inter as FontSans } from "next/font/google";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
|
||||||
const fontSans = FontSans({
|
const fontSans = FontSans({
|
||||||
subsets: ["latin"],
|
subsets: ["latin"],
|
||||||
variable: "--font-sans",
|
variable: "--font-sans",
|
||||||
|
@ -4,7 +4,7 @@ import Link from "next/link";
|
|||||||
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 const runtime = 'edge';
|
||||||
|
|
||||||
export default function NotFoundPage() {
|
export default function NotFoundPage() {
|
||||||
const t = useTranslations("NotFoundPage");
|
const t = useTranslations("NotFoundPage");
|
||||||
|
10
docker/docker-compose.yml.cn
Normal file
10
docker/docker-compose.yml.cn
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
nezha-dash:
|
||||||
|
container_name: nezha-dash
|
||||||
|
image: registry.cn-guangzhou.aliyuncs.com/hamster-home/nezha-dash:latest
|
||||||
|
volumes:
|
||||||
|
- ./.env:/app/.env
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "4123:3000"
|
26
package.json
26
package.json
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "nezha-dash",
|
"name": "nezha-dash",
|
||||||
"version": "1.7.6",
|
"version": "v0-Cloudflare-Final",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3040",
|
"dev": "next dev --turbopack -p 3040",
|
||||||
"start": "node .next/standalone/server.js",
|
"start": "node .next/standalone/server.js",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/",
|
"build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"@turf/turf": "^7.1.0",
|
"@turf/turf": "^7.1.0",
|
||||||
"@types/d3-geo": "^3.1.0",
|
"@types/d3-geo": "^3.1.0",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
||||||
"caniuse-lite": "^1.0.30001687",
|
"caniuse-lite": "^1.0.30001687",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@ -39,14 +39,14 @@
|
|||||||
"framer-motion": "^12.0.0-alpha.2",
|
"framer-motion": "^12.0.0-alpha.2",
|
||||||
"lucide-react": "^0.454.0",
|
"lucide-react": "^0.454.0",
|
||||||
"luxon": "^3.5.0",
|
"luxon": "^3.5.0",
|
||||||
"next": "^15.1.0",
|
"next": "15.0.4-canary.48",
|
||||||
"next-auth": "^5.0.0-beta.25",
|
"next-auth": "^5.0.0-beta.25",
|
||||||
"next-intl": "^3.26.0",
|
"next-intl": "^3.26.0",
|
||||||
"next-runtime-env": "^3.2.2",
|
"next-runtime-env": "^3.2.2",
|
||||||
"next-themes": "^0.4.4",
|
"next-themes": "^0.4.4",
|
||||||
"react": "^19.0.0",
|
"react": "19.0.0-rc-02c0e824-20241028",
|
||||||
"react-device-detect": "^2.2.3",
|
"react-device-detect": "^2.2.3",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
||||||
"react-intersection-observer": "^9.13.1",
|
"react-intersection-observer": "^9.13.1",
|
||||||
"react-wrap-balancer": "^1.1.1",
|
"react-wrap-balancer": "^1.1.1",
|
||||||
"recharts": "^2.14.1",
|
"recharts": "^2.14.1",
|
||||||
@ -54,16 +54,16 @@
|
|||||||
"swr": "^2.2.6-beta.5",
|
"swr": "^2.2.6-beta.5",
|
||||||
"tailwind-merge": "^2.5.5",
|
"tailwind-merge": "^2.5.5",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"typescript-eslint": "^8.18.0"
|
"typescript-eslint": "^8.17.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "^15.1.0",
|
"@next/bundle-analyzer": "^15.0.4",
|
||||||
"@tailwindcss/postcss": "^4.0.0-beta.6",
|
"@tailwindcss/postcss": "^4.0.0-beta.6",
|
||||||
"@types/node": "^22.10.1",
|
"@types/node": "^22.10.1",
|
||||||
"@types/react": "^19.0.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "^19.0.2",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"eslint": "^9.16.0",
|
"eslint": "^9.16.0",
|
||||||
"eslint-config-next": "^15.1.0",
|
"eslint-config-next": "^15.0.4",
|
||||||
"eslint-plugin-turbo": "^2.3.3",
|
"eslint-plugin-turbo": "^2.3.3",
|
||||||
"eslint-plugin-unused-imports": "^4.1.4",
|
"eslint-plugin-unused-imports": "^4.1.4",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
@ -74,8 +74,8 @@
|
|||||||
"vercel": "39.1.1"
|
"vercel": "39.1.1"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@types/react": "^npm:types-react@19.0.0-rc.1",
|
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||||
"@types/react-dom": "^npm:types-react-dom@19.0.0-rc.1",
|
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||||
"react-is": "^19.0.0-rc-69d4b800-20241021",
|
"react-is": "^19.0.0-rc-69d4b800-20241021",
|
||||||
"vercel": "$vercel"
|
"vercel": "$vercel"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user