mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
chore: minor changes
This commit is contained in:
parent
44cfe5a78e
commit
f926ee50f9
@ -1,4 +1,4 @@
|
|||||||
import {Button, ConfigProvider, Drawer, Flex, Layout, theme, Typography} from 'antd'
|
import {Button, ConfigProvider, Drawer, Flex, Layout, message, theme, Typography} from 'antd'
|
||||||
import {Link, Navigate, Route, Routes, useLocation, useNavigate} from 'react-router-dom'
|
import {Link, Navigate, Route, Routes, useLocation, useNavigate} from 'react-router-dom'
|
||||||
import TextPage from './pages/TextPage'
|
import TextPage from './pages/TextPage'
|
||||||
import DomainSearchPage from './pages/search/DomainSearchPage'
|
import DomainSearchPage from './pages/search/DomainSearchPage'
|
||||||
@ -74,6 +74,7 @@ export default function App(): React.ReactElement {
|
|||||||
|
|
||||||
const [darkMode, setDarkMode] = useState(false)
|
const [darkMode, setDarkMode] = useState(false)
|
||||||
const windowQuery = window.matchMedia('(prefers-color-scheme:dark)')
|
const windowQuery = window.matchMedia('(prefers-color-scheme:dark)')
|
||||||
|
const [messageApi, contextHolder] = message.useMessage()
|
||||||
|
|
||||||
|
|
||||||
const authContextValue: AuthContextType = useMemo(() => ({
|
const authContextValue: AuthContextType = useMemo(() => ({
|
||||||
@ -110,7 +111,7 @@ export default function App(): React.ReactElement {
|
|||||||
if(configuration.publicRdapLookupEnabled) return navigate('/search/domain')
|
if(configuration.publicRdapLookupEnabled) return navigate('/search/domain')
|
||||||
if (!['/login', '/tos', '/faq', '/privacy'].includes(pathname)) return navigate('/home')
|
if (!['/login', '/tos', '/faq', '/privacy'].includes(pathname)) return navigate('/home')
|
||||||
})
|
})
|
||||||
})
|
}).catch(() => messageApi.error(t`Unable to contact the server, please reload the page.`))
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -139,6 +140,7 @@ export default function App(): React.ReactElement {
|
|||||||
minHeight: 360
|
minHeight: 360
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{contextHolder}
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path='/' element={<Navigate to={configuration?.publicRdapLookupEnabled ? '/search/domain' : '/home'}/>}/>
|
<Route path='/' element={<Navigate to={configuration?.publicRdapLookupEnabled ? '/search/domain' : '/home'}/>}/>
|
||||||
<Route path='/home' element={<TextPage resource='home.md'/>}/>
|
<Route path='/home' element={<TextPage resource='home.md'/>}/>
|
||||||
|
|||||||
@ -20,7 +20,6 @@ export default function LoginPage() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(!configuration?.registerEnabled && configuration?.ssoLogin && configuration?.ssoAutoRedirect) {
|
if(!configuration?.registerEnabled && configuration?.ssoLogin && configuration?.ssoAutoRedirect) {
|
||||||
window.location.href = '/login/oauth'
|
window.location.href = '/login/oauth'
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}, [configuration])
|
}, [configuration])
|
||||||
|
|
||||||
|
|||||||
@ -3,31 +3,35 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||||
|
|
||||||
#: assets/App.tsx:172
|
#: assets/App.tsx:114
|
||||||
msgid "TOS"
|
msgid "Unable to contact the server, please reload the page."
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: assets/App.tsx:173
|
|
||||||
msgid "Privacy Policy"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:174
|
#: assets/App.tsx:174
|
||||||
|
msgid "TOS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: assets/App.tsx:175
|
||||||
|
msgid "Privacy Policy"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: assets/App.tsx:176
|
||||||
msgid "FAQ"
|
msgid "FAQ"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:180
|
#: assets/App.tsx:182
|
||||||
msgid "Documentation"
|
msgid "Documentation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:188
|
#: assets/App.tsx:190
|
||||||
msgid "Source code"
|
msgid "Source code"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:196
|
#: assets/App.tsx:198
|
||||||
msgid "Submit an issue"
|
msgid "Submit an issue"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/App.tsx:201
|
#: assets/App.tsx:203
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"${ ProjectLink } is an open source project distributed under the ${ "
|
"${ ProjectLink } is an open source project distributed under the ${ "
|
||||||
@ -87,7 +91,7 @@ msgid "Log in with SSO"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/RegisterForm.tsx:54
|
#: assets/components/RegisterForm.tsx:54
|
||||||
#: assets/pages/LoginPage.tsx:51
|
#: assets/pages/LoginPage.tsx:50
|
||||||
msgid "Register"
|
msgid "Register"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -250,8 +254,8 @@ msgid "Log out"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/Sider.tsx:158
|
#: assets/components/Sider.tsx:158
|
||||||
#: assets/pages/LoginPage.tsx:37
|
#: assets/pages/LoginPage.tsx:36
|
||||||
#: assets/pages/LoginPage.tsx:51
|
#: assets/pages/LoginPage.tsx:50
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -690,7 +694,7 @@ msgstr ""
|
|||||||
msgid "Sponsored Top-Level-Domains"
|
msgid "Sponsored Top-Level-Domains"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/pages/LoginPage.tsx:37
|
#: assets/pages/LoginPage.tsx:36
|
||||||
msgid "Create an account"
|
msgid "Create an account"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user