diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index 1f422d25..b0d77b89 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { useUserStore } from "@/store/module"; +import { useGlobalStore, useUserStore } from "@/store/module"; import Dropdown from "./kit/Dropdown"; import Icon from "./Icon"; import UserAvatar from "./UserAvatar"; @@ -9,7 +9,9 @@ import showSettingDialog from "./SettingDialog"; const UserBanner = () => { const { t } = useTranslation(); + const globalStore = useGlobalStore(); const userStore = useUserStore(); + const { systemStatus } = globalStore.state; const { user } = userStore.state; const [username, setUsername] = useState("Memos"); @@ -39,7 +41,9 @@ const UserBanner = () => { trigger={
- {username} + + {userStore.isVisitorMode() ? systemStatus.customizedProfile.name : username} + {user?.role === "HOST" ? ( MOD ) : null}