mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 13:39:53 +00:00
feat(ui): move settings page entry from topbar to sider-menu
This commit is contained in:
parent
7936c34472
commit
82bdccf7e7
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
"common.menu.theme": "Change theme",
|
"common.menu.theme": "Change theme",
|
||||||
"common.menu.locale": "Change language",
|
"common.menu.locale": "Change language",
|
||||||
"common.menu.settings": "Settings",
|
|
||||||
"common.menu.logout": "Log-out",
|
"common.menu.logout": "Log-out",
|
||||||
"common.menu.document": "Document",
|
"common.menu.document": "Document",
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
"common.menu.theme": "切换主题",
|
"common.menu.theme": "切换主题",
|
||||||
"common.menu.locale": "切换语言",
|
"common.menu.locale": "切换语言",
|
||||||
"common.menu.settings": "系统设置",
|
|
||||||
"common.menu.logout": "退出登录",
|
"common.menu.logout": "退出登录",
|
||||||
"common.menu.document": "文档",
|
"common.menu.document": "文档",
|
||||||
|
|
||||||
|
@ -31,10 +31,6 @@ const ConsoleLayout = () => {
|
|||||||
navigate("/login");
|
navigate("/login");
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSettingsClick = () => {
|
|
||||||
navigate("/settings/account");
|
|
||||||
};
|
|
||||||
|
|
||||||
const auth = getAuthStore();
|
const auth = getAuthStore();
|
||||||
if (!auth.isValid || !auth.isSuperuser) {
|
if (!auth.isValid || !auth.isSuperuser) {
|
||||||
return <Navigate to="/login" />;
|
return <Navigate to="/login" />;
|
||||||
@ -66,9 +62,6 @@ const ConsoleLayout = () => {
|
|||||||
<Tooltip title={t("common.menu.locale")} mouseEnterDelay={2}>
|
<Tooltip title={t("common.menu.locale")} mouseEnterDelay={2}>
|
||||||
<LocaleToggleButton size="large" />
|
<LocaleToggleButton size="large" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip title={t("common.menu.settings")} mouseEnterDelay={2}>
|
|
||||||
<Button icon={<SettingOutlinedIcon />} size="large" onClick={handleSettingsClick} />
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip title={t("common.menu.logout")} mouseEnterDelay={2}>
|
<Tooltip title={t("common.menu.logout")} mouseEnterDelay={2}>
|
||||||
<Button danger icon={<LogoutOutlinedIcon />} size="large" onClick={handleLogoutClick} />
|
<Button danger icon={<LogoutOutlinedIcon />} size="large" onClick={handleLogoutClick} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -94,11 +87,13 @@ const SiderMenu = memo(({ onSelect }: { onSelect?: (key: string) => void }) => {
|
|||||||
const MENU_KEY_WORKFLOWS = "/workflows";
|
const MENU_KEY_WORKFLOWS = "/workflows";
|
||||||
const MENU_KEY_CERTIFICATES = "/certificates";
|
const MENU_KEY_CERTIFICATES = "/certificates";
|
||||||
const MENU_KEY_ACCESSES = "/accesses";
|
const MENU_KEY_ACCESSES = "/accesses";
|
||||||
|
const MENU_KEY_SETTINGS = "/settings";
|
||||||
const menuItems: Required<MenuProps>["items"] = [
|
const menuItems: Required<MenuProps>["items"] = [
|
||||||
[MENU_KEY_HOME, <HomeOutlinedIcon />, t("dashboard.page.title")],
|
[MENU_KEY_HOME, <HomeOutlinedIcon />, t("dashboard.page.title")],
|
||||||
[MENU_KEY_WORKFLOWS, <NodeIndexOutlinedIcon />, t("workflow.page.title")],
|
[MENU_KEY_WORKFLOWS, <NodeIndexOutlinedIcon />, t("workflow.page.title")],
|
||||||
[MENU_KEY_CERTIFICATES, <SafetyOutlinedIcon />, t("certificate.page.title")],
|
[MENU_KEY_CERTIFICATES, <SafetyOutlinedIcon />, t("certificate.page.title")],
|
||||||
[MENU_KEY_ACCESSES, <CloudServerOutlinedIcon />, t("access.page.title")],
|
[MENU_KEY_ACCESSES, <CloudServerOutlinedIcon />, t("access.page.title")],
|
||||||
|
[MENU_KEY_SETTINGS, <SettingOutlinedIcon />, t("settings.page.title")],
|
||||||
].map(([key, icon, label]) => {
|
].map(([key, icon, label]) => {
|
||||||
return {
|
return {
|
||||||
key: key as string,
|
key: key as string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user