1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 04:54:18 +00:00

🔧 Improve login page

This commit is contained in:
Steffo 2021-05-24 05:13:09 +02:00
parent 760eb3009d
commit 1a64137fa3
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 13 additions and 0 deletions

View file

@ -14,6 +14,7 @@ export default {
it: { it: {
appName: "N.E.S.T.", appName: "N.E.S.T.",
appFullName: "Noi Estraiamo Statistiche Tweet", appFullName: "Noi Estraiamo Statistiche Tweet",
welcomeToNest: "Benvenuto a N.E.S.T.!", // TODO: Tradurre
server: "Scegli un server", server: "Scegli un server",
baseURL: "Base URL", baseURL: "Base URL",

View file

@ -5,18 +5,30 @@ import BoxSetServer from "../components/interactive/BoxSetServer"
import BoxLogin from "../components/interactive/BoxLogin" import BoxLogin from "../components/interactive/BoxLogin"
import ContextUser from "../contexts/ContextUser" import ContextUser from "../contexts/ContextUser"
import { Redirect } from "react-router" import { Redirect } from "react-router"
import BoxHeader from "../components/base/BoxHeader"
import useStrings from "../hooks/useStrings"
import BoxFull from "../components/base/BoxFull"
import SelectLanguage from "../components/interactive/SelectLanguage"
export default function PageLogin({ className, ...props }) { export default function PageLogin({ className, ...props }) {
const {user} = useContext(ContextUser) const {user} = useContext(ContextUser)
const strings = useStrings()
if(user) { if(user) {
return <Redirect to={"/repositories"}/> return <Redirect to={"/repositories"}/>
} }
return ( return (
<div className={classNames(Style.PageLogin, className)} {...props}> <div className={classNames(Style.PageLogin, className)} {...props}>
<BoxHeader>
{strings.welcomeToNest}
</BoxHeader>
<BoxSetServer/> <BoxSetServer/>
<BoxLogin/> <BoxLogin/>
<BoxFull header={strings.changeLang}>
<SelectLanguage/>
</BoxFull>
</div> </div>
) )
} }