diff --git a/web/src/components/Header.tsx b/web/src/components/Header.tsx index 8171a8ce..5bfac2c5 100644 --- a/web/src/components/Header.tsx +++ b/web/src/components/Header.tsx @@ -1,17 +1,19 @@ import { useEffect } from "react"; import { NavLink, useLocation } from "react-router-dom"; import { useTranslation } from "react-i18next"; -import { useLayoutStore, useUserStore } from "@/store/module"; +import { useGlobalStore, useLayoutStore, useUserStore } from "@/store/module"; import { resolution } from "@/utils/layout"; import Icon from "./Icon"; +import UserBanner from "./UserBanner"; import showSettingDialog from "./SettingDialog"; import showAskAIDialog from "./AskAIDialog"; import showArchivedMemoDialog from "./ArchivedMemoDialog"; import showAboutSiteDialog from "./AboutSiteDialog"; -import UserBanner from "./UserBanner"; +import showMemoEditorDialog from "./MemoEditor/MemoEditorDialog"; const Header = () => { const { t } = useTranslation(); + const globalStore = useGlobalStore(); const location = useLocation(); const userStore = useUserStore(); const layoutStore = useLayoutStore(); @@ -57,7 +59,7 @@ const Header = () => { className={({ isActive }) => `${ isActive && "bg-white dark:bg-zinc-700 shadow" - } px-4 pr-5 py-2 rounded-lg flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` + } px-4 pr-5 py-2 rounded-full flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` } > <> @@ -70,7 +72,7 @@ const Header = () => { className={({ isActive }) => `${ isActive && "bg-white dark:bg-zinc-700 shadow" - } px-4 pr-5 py-2 rounded-lg flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` + } px-4 pr-5 py-2 rounded-full flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` } > <> @@ -83,7 +85,7 @@ const Header = () => { className={({ isActive }) => `${ isActive && "bg-white dark:bg-zinc-700 shadow" - } px-4 pr-5 py-2 rounded-lg flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` + } px-4 pr-5 py-2 rounded-full flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` } > <> @@ -98,7 +100,7 @@ const Header = () => { className={({ isActive }) => `${ isActive && "bg-white dark:bg-zinc-700 shadow" - } px-4 pr-5 py-2 rounded-lg flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` + } px-4 pr-5 py-2 rounded-full flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:shadow dark:hover:bg-zinc-700` } > <> @@ -109,25 +111,35 @@ const Header = () => { <> + {globalStore.isDev() && ( +