feat: update footer

This commit is contained in:
Maël Gangloff
2024-08-04 01:32:58 +02:00
parent 4765445921
commit 95fc5c7d33
3 changed files with 120 additions and 152 deletions

View File

@@ -1,4 +1,4 @@
import {Layout, theme} from "antd";
import {Button, Layout, Space, theme} from "antd";
import {Link, Navigate, Route, Routes, useLocation, useNavigate} from "react-router-dom";
import TextPage from "./pages/TextPage";
import DomainSearchPage from "./pages/search/DomainSearchPage";
@@ -15,6 +15,7 @@ import ConnectorsPage from "./pages/tracking/ConnectorsPage";
import NotFoundPage from "./pages/NotFoundPage";
import useBreakpoint from "./hooks/useBreakpoint";
import {Sider} from "./components/Sider";
import {t} from "ttag";
export default function App() {
const {
@@ -92,8 +93,14 @@ export default function App() {
</div>
</Layout.Content>
<Layout.Footer style={{textAlign: 'center'}}>
<Space size='middle'>
<Link to='/tos'><Button type='text'>{t`Terms of service`}</Button></Link>
<Link to='/privacy'><Button type='text'>{t`Privacy Policy`}</Button></Link>
<Link to='/faq'><Button type='text'>{t`FAQ`}</Button></Link>
</Space>
<br/><br/>
<Link to='https://github.com/maelgangloff/domain-watchdog'>Domain
Watchdog</Link> &copy; {new Date().getFullYear()} Maël Gangloff
Watchdog</Link> is an open source project distributed under AGPL-3.0-or-later license.
</Layout.Footer>
</Layout>
</Layout>

View File

@@ -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}
/>
}

View File

@@ -252,6 +252,77 @@ msgstr ""
msgid "Are you sure to delete this Connector?"
msgstr ""
#: assets/components/Sider.tsx:28
msgid "Home"
msgstr ""
#: assets/components/Sider.tsx:34
msgid "Search"
msgstr ""
#: assets/components/Sider.tsx:40
msgid "Domain"
msgstr ""
#: assets/components/Sider.tsx:41
msgid "Domain Finder"
msgstr ""
#: assets/components/Sider.tsx:48
#: assets/pages/info/TldPage.tsx:79
msgid "TLD"
msgstr ""
#: assets/components/Sider.tsx:49
msgid "TLD list"
msgstr ""
#: assets/components/Sider.tsx:56
msgid "Entity"
msgstr ""
#: assets/components/Sider.tsx:57
msgid "Entity Finder"
msgstr ""
#: assets/components/Sider.tsx:64
msgid "Nameserver"
msgstr ""
#: assets/components/Sider.tsx:65
msgid "Nameserver Finder"
msgstr ""
#: assets/components/Sider.tsx:73
msgid "Tracking"
msgstr ""
#: assets/components/Sider.tsx:79
msgid "My Watchlists"
msgstr ""
#: assets/components/Sider.tsx:86
msgid "My Connectors"
msgstr ""
#: assets/components/Sider.tsx:95
msgid "Statistics"
msgstr ""
#: assets/components/Sider.tsx:105
#: assets/pages/watchdog/UserPage.tsx:16
msgid "My Account"
msgstr ""
#: assets/components/Sider.tsx:111
msgid "Log out"
msgstr ""
#: assets/components/Sider.tsx:119
#: assets/pages/LoginPage.tsx:38
msgid "Log in"
msgstr ""
#: assets/pages/search/DomainSearchPage.tsx:20
msgid "Found !"
msgstr ""
@@ -287,11 +358,6 @@ msgid ""
"WHOIS by its registrar."
msgstr ""
#: assets/App.tsx:116
#: assets/pages/info/TldPage.tsx:79
msgid "TLD"
msgstr ""
#: assets/pages/info/TldPage.tsx:85
msgid "Flag"
msgstr ""
@@ -361,11 +427,6 @@ msgid ""
"their country of origin."
msgstr ""
#: assets/App.tsx:159
#: assets/pages/watchdog/UserPage.tsx:16
msgid "My Account"
msgstr ""
#: assets/pages/LoginPage.tsx:58
#: assets/pages/watchdog/UserPage.tsx:18
msgid "Username"
@@ -395,11 +456,6 @@ msgstr ""
msgid "Sorry, the page you visited does not exist."
msgstr ""
#: assets/App.tsx:205
#: assets/pages/LoginPage.tsx:38
msgid "Log in"
msgstr ""
#: assets/pages/LoginPage.tsx:43
msgid "Error"
msgstr ""
@@ -452,78 +508,14 @@ msgid ""
"another"
msgstr ""
#: assets/App.tsx:73
msgid "Home"
#: assets/App.tsx:97
msgid "Terms of service"
msgstr ""
#: assets/App.tsx:79
msgid "Search"
msgstr ""
#: assets/App.tsx:85
msgid "Domain"
msgstr ""
#: assets/App.tsx:86
msgid "Domain Finder"
msgstr ""
#: assets/App.tsx:93
msgid "Entity"
msgstr ""
#: assets/App.tsx:94
msgid "Entity Finder"
msgstr ""
#: assets/App.tsx:101
msgid "Nameserver"
msgstr ""
#: assets/App.tsx:102
msgid "Nameserver Finder"
msgstr ""
#: assets/App.tsx:110
msgid "Information"
msgstr ""
#: assets/App.tsx:117
msgid "TLD list"
msgstr ""
#: assets/App.tsx:124
msgid "Statistics"
msgstr ""
#: assets/App.tsx:132
msgid "Tracking"
msgstr ""
#: assets/App.tsx:138
msgid "My Watchlists"
msgstr ""
#: assets/App.tsx:145
msgid "My Connectors"
msgstr ""
#: assets/App.tsx:153
msgid "My Watchdog"
msgstr ""
#: assets/App.tsx:166
msgid "TOS"
msgstr ""
#: assets/App.tsx:172
#: assets/App.tsx:98
msgid "Privacy Policy"
msgstr ""
#: assets/App.tsx:180
#: assets/App.tsx:99
msgid "FAQ"
msgstr ""
#: assets/App.tsx:199
msgid "Log out"
msgstr ""