mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add flag to menubar - #22
This commit is contained in:
@@ -103,14 +103,8 @@ const SignIn: FC = () => {
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
'& button, & a, & .MuiCard-root': {
|
'& button, & a, & .MuiCard-root': {
|
||||||
mt: 0,
|
mt: 0.5,
|
||||||
mx: 0.6,
|
mx: 0.5
|
||||||
'&:last-child': {
|
|
||||||
mr: 0
|
|
||||||
},
|
|
||||||
'&:first-of-type': {
|
|
||||||
ml: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -21,9 +21,12 @@ import { AuthenticatedContext } from '../../contexts/authentication';
|
|||||||
|
|
||||||
import { I18nContext } from '../../i18n/i18n-react';
|
import { I18nContext } from '../../i18n/i18n-react';
|
||||||
import type { Locales } from '../../i18n/i18n-types';
|
import type { Locales } from '../../i18n/i18n-types';
|
||||||
import { locales } from '../..//i18n/i18n-util';
|
|
||||||
import { loadLocaleAsync } from '../../i18n/i18n-util.async';
|
import { loadLocaleAsync } from '../../i18n/i18n-util.async';
|
||||||
|
|
||||||
|
import { ReactComponent as NLflag } from '../../i18n/NL.svg';
|
||||||
|
import { ReactComponent as DEflag } from '../../i18n/DE.svg';
|
||||||
|
import { ReactComponent as USflag } from '../../i18n/US.svg';
|
||||||
|
|
||||||
const ItemTypography = styled(Typography)<TypographyProps>({
|
const ItemTypography = styled(Typography)<TypographyProps>({
|
||||||
maxWidth: '250px',
|
maxWidth: '250px',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
@@ -58,13 +61,29 @@ const LayoutAuthMenu: FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TextField name="locale" variant="outlined" value={locale} onChange={onLocaleSelected} size="small" select>
|
<TextField
|
||||||
{locales.map((loc) => (
|
name="locale"
|
||||||
<MenuItem key={loc} value={loc}>
|
InputProps={{ style: { fontSize: 10 } }}
|
||||||
{loc}
|
variant="outlined"
|
||||||
|
value={locale}
|
||||||
|
onChange={onLocaleSelected}
|
||||||
|
size="small"
|
||||||
|
select
|
||||||
|
>
|
||||||
|
<MenuItem key="en" value="en">
|
||||||
|
<USflag style={{ width: 16, verticalAlign: 'middle' }} />
|
||||||
|
EN
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem key="de" value="de">
|
||||||
|
<DEflag style={{ width: 16, verticalAlign: 'middle' }} />
|
||||||
|
DE
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem key="nl" value="nl">
|
||||||
|
<NLflag style={{ width: 16, verticalAlign: 'middle' }} />
|
||||||
|
NL
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
id="open-auth-menu"
|
id="open-auth-menu"
|
||||||
sx={{ ml: 1, padding: 0 }}
|
sx={{ ml: 1, padding: 0 }}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.5.0b0"
|
#define EMSESP_APP_VERSION "3.5.0b1"
|
||||||
|
|||||||
Reference in New Issue
Block a user