mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: update footer
This commit is contained in:
@@ -5,14 +5,11 @@ import {
|
||||
BankOutlined,
|
||||
CloudServerOutlined,
|
||||
CompassOutlined,
|
||||
FileProtectOutlined,
|
||||
FileSearchOutlined,
|
||||
HomeOutlined,
|
||||
InfoCircleOutlined,
|
||||
LineChartOutlined,
|
||||
LoginOutlined,
|
||||
LogoutOutlined,
|
||||
QuestionCircleOutlined,
|
||||
SearchOutlined,
|
||||
TeamOutlined,
|
||||
UserOutlined
|
||||
@@ -45,6 +42,14 @@ export function Sider({isAuthenticated}: { isAuthenticated: boolean }) {
|
||||
disabled: !isAuthenticated,
|
||||
onClick: () => navigate('/search/domain')
|
||||
},
|
||||
{
|
||||
key: 'tld-list',
|
||||
icon: <BankOutlined/>,
|
||||
label: t`TLD`,
|
||||
title: t`TLD list`,
|
||||
disabled: !isAuthenticated,
|
||||
onClick: () => navigate('/info/tld')
|
||||
},
|
||||
{
|
||||
key: 'entity-finder',
|
||||
icon: <TeamOutlined/>,
|
||||
@@ -63,28 +68,6 @@ export function Sider({isAuthenticated}: { isAuthenticated: boolean }) {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'info',
|
||||
label: t`Information`,
|
||||
icon: <InfoCircleOutlined/>,
|
||||
children: [
|
||||
{
|
||||
key: 'tld-list',
|
||||
icon: <BankOutlined/>,
|
||||
label: t`TLD`,
|
||||
title: t`TLD list`,
|
||||
disabled: !isAuthenticated,
|
||||
onClick: () => navigate('/info/tld')
|
||||
},
|
||||
{
|
||||
key: 'stats',
|
||||
icon: <LineChartOutlined/>,
|
||||
label: t`Statistics`,
|
||||
disabled: true,
|
||||
onClick: () => navigate('/info/stats')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'tracking',
|
||||
label: t`Tracking`,
|
||||
@@ -107,57 +90,43 @@ export function Sider({isAuthenticated}: { isAuthenticated: boolean }) {
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'watchdog',
|
||||
label: t`My Watchdog`,
|
||||
icon: <UserOutlined/>,
|
||||
children: [
|
||||
{
|
||||
key: 'account',
|
||||
icon: <UserOutlined/>,
|
||||
label: t`My Account`,
|
||||
disabled: !isAuthenticated,
|
||||
onClick: () => navigate('/user')
|
||||
},
|
||||
{
|
||||
key: 'tos',
|
||||
icon: <InfoCircleOutlined/>,
|
||||
label: t`TOS`,
|
||||
onClick: () => navigate('/tos')
|
||||
},
|
||||
{
|
||||
key: 'privacy',
|
||||
icon: <FileProtectOutlined/>,
|
||||
label: t`Privacy Policy`,
|
||||
onClick: () => navigate('/privacy')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: '5',
|
||||
icon: <QuestionCircleOutlined/>,
|
||||
label: t`FAQ`,
|
||||
onClick: () => navigate('/faq')
|
||||
},
|
||||
|
||||
key: 'stats',
|
||||
icon: <LineChartOutlined/>,
|
||||
label: t`Statistics`,
|
||||
disabled: true,
|
||||
onClick: () => navigate('/info/stats')
|
||||
}
|
||||
]
|
||||
|
||||
return <Menu
|
||||
defaultSelectedKeys={['home']}
|
||||
defaultOpenKeys={['search', 'info', 'tracking', 'watchdog']}
|
||||
mode="inline"
|
||||
theme="dark"
|
||||
items={[...menuItems, isAuthenticated ? {
|
||||
key: '8',
|
||||
if (isAuthenticated) {
|
||||
menuItems.push(...[{
|
||||
key: 'account',
|
||||
icon: <UserOutlined/>,
|
||||
label: t`My Account`,
|
||||
disabled: !isAuthenticated,
|
||||
onClick: () => navigate('/user')
|
||||
}, {
|
||||
key: 'logout',
|
||||
icon: <LogoutOutlined/>,
|
||||
label: t`Log out`,
|
||||
danger: true,
|
||||
onClick: () => window.location.replace("/logout")
|
||||
} : {
|
||||
key: '8',
|
||||
}])
|
||||
} else {
|
||||
menuItems.push({
|
||||
key: 'login',
|
||||
icon: <LoginOutlined/>,
|
||||
label: t`Log in`,
|
||||
onClick: () => navigate('/login')
|
||||
}]}
|
||||
})
|
||||
}
|
||||
|
||||
return <Menu
|
||||
defaultSelectedKeys={['home']}
|
||||
defaultOpenKeys={['search', 'info', 'tracking', 'doc']}
|
||||
mode="inline"
|
||||
theme="dark"
|
||||
items={menuItems}
|
||||
/>
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user