diff --git a/assets/App.tsx b/assets/App.tsx index 0a60082..ebc0d8c 100644 --- a/assets/App.tsx +++ b/assets/App.tsx @@ -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() { + + + + + +

Domain - Watchdog © {new Date().getFullYear()} MaĆ«l Gangloff + Watchdog is an open source project distributed under AGPL-3.0-or-later license.
diff --git a/assets/components/Sider.tsx b/assets/components/Sider.tsx index 3290db1..4778600 100644 --- a/assets/components/Sider.tsx +++ b/assets/components/Sider.tsx @@ -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: , + label: t`TLD`, + title: t`TLD list`, + disabled: !isAuthenticated, + onClick: () => navigate('/info/tld') + }, { key: 'entity-finder', icon: , @@ -63,28 +68,6 @@ export function Sider({isAuthenticated}: { isAuthenticated: boolean }) { } ] }, - { - key: 'info', - label: t`Information`, - icon: , - children: [ - { - key: 'tld-list', - icon: , - label: t`TLD`, - title: t`TLD list`, - disabled: !isAuthenticated, - onClick: () => navigate('/info/tld') - }, - { - key: 'stats', - icon: , - 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: , - children: [ - { - key: 'account', - icon: , - label: t`My Account`, - disabled: !isAuthenticated, - onClick: () => navigate('/user') - }, - { - key: 'tos', - icon: , - label: t`TOS`, - onClick: () => navigate('/tos') - }, - { - key: 'privacy', - icon: , - label: t`Privacy Policy`, - onClick: () => navigate('/privacy') - } - ] - }, - { - key: '5', - icon: , - label: t`FAQ`, - onClick: () => navigate('/faq') - }, - + key: 'stats', + icon: , + label: t`Statistics`, + disabled: true, + onClick: () => navigate('/info/stats') + } ] - return , + label: t`My Account`, + disabled: !isAuthenticated, + onClick: () => navigate('/user') + }, { + key: 'logout', icon: , label: t`Log out`, danger: true, onClick: () => window.location.replace("/logout") - } : { - key: '8', + }]) + } else { + menuItems.push({ + key: 'login', icon: , label: t`Log in`, onClick: () => navigate('/login') - }]} + }) + } + + return } \ No newline at end of file diff --git a/translations/translations.pot b/translations/translations.pot index 77116d8..e45bf27 100644 --- a/translations/translations.pot +++ b/translations/translations.pot @@ -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 ""