mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-11-02 03:07:46 +00:00
Language switcher is prettier, and login
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
CSelect
|
||||
} from '@coreui/react';
|
||||
|
||||
const LanguageSwitcher = () => {
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="select">
|
||||
<select value={i18n.language.split("-")[0]} onChange={(e) => i18n.changeLanguage(e.target.value)}>
|
||||
<option value="de">Deutsche</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="en">English</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="pt">Portugues</option>
|
||||
</select>
|
||||
</div>
|
||||
<CSelect custom defaultValue={i18n.language.split("-")[0]} onChange={(e) => i18n.changeLanguage(e.target.value)}>
|
||||
<option value="de">Deutsche</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="en">English</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="pt">Portugues</option>
|
||||
</CSelect>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const TheFooter = () => (
|
||||
<Translation>
|
||||
{(t) => (
|
||||
<CFooter fixed={false}>
|
||||
<div>{t('footer.version')} 0.1.4</div>
|
||||
<div>{t('footer.version')} 0.1.5</div>
|
||||
<div className="mfs-auto">
|
||||
<span className="mr-1">{t('footer.powered_by')}</span>
|
||||
<a href="https://coreui.io/react" target="_blank" rel="noopener noreferrer">
|
||||
|
||||
@@ -22,6 +22,7 @@ import { cilUser, cilLockLocked, cilLink } from '@coreui/icons';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import axiosInstance from 'utils/axiosInstance';
|
||||
import logo from 'assets/OpenWiFi_LogoLockup_DarkGreyColour.svg';
|
||||
import LanguageSwitcher from 'components/LanguageSwitcher';
|
||||
import styles from './index.module.scss';
|
||||
|
||||
const Login = () => {
|
||||
@@ -184,7 +185,11 @@ const Login = () => {
|
||||
{t('login.login')}
|
||||
</CButton>
|
||||
</CCol>
|
||||
<CCol xs="6" className="text-right" />
|
||||
<CCol xs="6">
|
||||
<div className={styles.languageSwitcher}>
|
||||
<LanguageSwitcher/>
|
||||
</div>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
|
||||
@@ -2,3 +2,8 @@
|
||||
padding-left: 17%;
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.languageSwitcher {
|
||||
float: right;
|
||||
width: 150px;
|
||||
}
|
||||
Reference in New Issue
Block a user