From 2bf60a8a22143241a5d95769b7b3965987caba9e Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 8 Feb 2025 19:58:09 +0800 Subject: [PATCH] feat: Improve user avatar and dropdown menu in NavBar --- next.config.mjs | 4 +++ src/components/layout/nav-bar.tsx | 44 ++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 5897695..d2d7411 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -8,6 +8,10 @@ const nextConfig = { protocol: "https", hostname: "q58.pro", }, + { + protocol: "https", + hostname: "i-aws.czl.net", + }, ], }, }; diff --git a/src/components/layout/nav-bar.tsx b/src/components/layout/nav-bar.tsx index c5efdb8..e76c365 100644 --- a/src/components/layout/nav-bar.tsx +++ b/src/components/layout/nav-bar.tsx @@ -2,6 +2,7 @@ import Image from "next/image"; import Link from "next/link"; +import { User } from "lucide-react"; import { signOut, useSession } from "next-auth/react"; import DynamicLogo from "../dynamic-logo"; @@ -41,24 +42,43 @@ export function NavBar() { - My Account + + {user.name || user.username || "用户"} + - Settings - Support + + 控制台 + + + 应用管理 + - Logout + signOut()} + > + 退出登录 + ) : (