From d964d668dc435c07288096cb951a62e6d9562b38 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Tue, 22 Oct 2024 10:52:49 +0800
Subject: [PATCH 1/3] fix: use turbo
---
app/[locale]/layout.tsx | 7 +-
package.json | 2 +-
styles/flag-icons.min.css | 1638 +++++++++++++++++++++++++++++++++++++
3 files changed, 1643 insertions(+), 4 deletions(-)
create mode 100644 styles/flag-icons.min.css
diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx
index 9e6ce07..089d03a 100644
--- a/app/[locale]/layout.tsx
+++ b/app/[locale]/layout.tsx
@@ -1,5 +1,4 @@
// @auto-i18n-check. Please do not delete the line.
-import { auth } from "@/auth";
import { locales } from "@/i18n-metadata";
import getEnv from "@/lib/env-entry";
import { cn } from "@/lib/utils";
@@ -13,8 +12,6 @@ import { ThemeProvider } from "next-themes";
import { Inter as FontSans } from "next/font/google";
import React from "react";
-import "/node_modules/flag-icons/css/flag-icons.min.css";
-
const fontSans = FontSans({
subsets: ["latin"],
variable: "--font-sans",
@@ -60,6 +57,10 @@ export default function LocaleLayout({
+
Date: Tue, 22 Oct 2024 10:53:06 +0800
Subject: [PATCH 2/3] fix: api redirect
---
app/api/detail/route.ts | 2 +-
app/api/monitor/route.ts | 2 +-
app/api/server/route.ts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/api/detail/route.ts b/app/api/detail/route.ts
index a123e22..e8aae3b 100644
--- a/app/api/detail/route.ts
+++ b/app/api/detail/route.ts
@@ -14,7 +14,7 @@ interface NezhaDataResponse {
export const GET = auth(async function GET(req) {
if (!req.auth && getEnv("SitePassword")) {
- redirect("/api/auth/signin");
+ redirect("/");
}
const { searchParams } = new URL(req.url);
diff --git a/app/api/monitor/route.ts b/app/api/monitor/route.ts
index 7757825..10c4420 100644
--- a/app/api/monitor/route.ts
+++ b/app/api/monitor/route.ts
@@ -14,7 +14,7 @@ interface NezhaDataResponse {
export const GET = auth(async function GET(req) {
if (!req.auth && getEnv("SitePassword")) {
- redirect("/api/auth/signin");
+ redirect("/");
}
const { searchParams } = new URL(req.url);
diff --git a/app/api/server/route.ts b/app/api/server/route.ts
index a203212..5dc7851 100644
--- a/app/api/server/route.ts
+++ b/app/api/server/route.ts
@@ -14,7 +14,7 @@ interface NezhaDataResponse {
export const GET = auth(async function GET(req) {
if (!req.auth && getEnv("SitePassword")) {
- redirect("/api/auth/signin");
+ redirect("/");
}
const response = (await GetNezhaData()) as NezhaDataResponse;
From 7d23a20043c7c4c635942619a633e66e4c59329b Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Tue, 22 Oct 2024 10:56:55 +0800
Subject: [PATCH 3/3] fix: tab overflow
---
components/TabSwitch.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/TabSwitch.tsx b/components/TabSwitch.tsx
index d2913ad..7701815 100644
--- a/components/TabSwitch.tsx
+++ b/components/TabSwitch.tsx
@@ -14,7 +14,7 @@ export default function TabSwitch({
setCurrentTab: (tab: string) => void;
}) {
return (
-
+
{tabs.map((tab: string) => (