From 4b18c91157249966f94ed7b80f5dfe375c4ef2a7 Mon Sep 17 00:00:00 2001
From: Eamon-meng <17516219072@163.com>
Date: Fri, 27 Feb 2026 15:03:17 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E5=BC=B9=E7=AA=97&=E5=8F=96=E6=B6=88=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0=E6=98=BE=E7=A4=BA=E5=AE=A2=E6=9C=8D=E5=BC=B9=E7=AA=97?=
=?UTF-8?q?=20&=20=E5=8F=96=E6=B6=88=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95pr?=
=?UTF-8?q?ofile=E4=B8=BA=E7=A9=BA=E6=8A=9B=E5=BC=82=E5=B8=B8=E7=9A=84?=
=?UTF-8?q?=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/settings.json | 3 ++
src/app/(home)/layout.tsx | 3 ++
src/app/admin/clients.tsx | 29 ++++++------
src/app/layout.tsx | 1 -
.../dialogs/change-password-dialog.tsx | 46 ++++++++++---------
5 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 31b7e63..45e48d6 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -7,4 +7,7 @@
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
+ "[typescriptreact]": {
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
+ },
}
\ No newline at end of file
diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx
index 8bb46b5..2299f5f 100644
--- a/src/app/(home)/layout.tsx
+++ b/src/app/(home)/layout.tsx
@@ -1,6 +1,7 @@
import {ReactNode} from 'react'
import Header from './header'
import Footer from './footer'
+import Script from 'next/script'
export type HomeLayoutProps = {
children: ReactNode
@@ -17,6 +18,8 @@ export default function HomeLayout(props: HomeLayoutProps) {
{/* 页脚 */}
+
+
)
}
diff --git a/src/app/admin/clients.tsx b/src/app/admin/clients.tsx
index bd2e6ad..cbe3858 100644
--- a/src/app/admin/clients.tsx
+++ b/src/app/admin/clients.tsx
@@ -75,19 +75,19 @@ export function Content(props: {children: ReactNode}) {
}
function ContentResolved() {
const profile = use(useProfileStore(store => store.profile))
- if (!profile) throw new Error('登录状态异常')
- return (
- <>
-
-
- >
- )
+ if (profile)
+ return (
+ <>
+
+
+ >
+ )
}
export function Header() {
@@ -127,8 +127,7 @@ export function Header() {
function HeaderUserCenter() {
const profile = use(useProfileStore(store => store.profile))
- if (!profile) throw new Error('登录状态异常')
- return
+ if (profile) return
}
export function Navbar() {
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index bc20703..b173c9d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -25,7 +25,6 @@ export default async function RootLayout(props: Readonly<{
{props.children}
-