mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add flag to menubar - #22
This commit is contained in:
@@ -103,14 +103,8 @@ const SignIn: FC = () => {
|
||||
<Box
|
||||
sx={{
|
||||
'& button, & a, & .MuiCard-root': {
|
||||
mt: 0,
|
||||
mx: 0.6,
|
||||
'&:last-child': {
|
||||
mr: 0
|
||||
},
|
||||
'&:first-of-type': {
|
||||
ml: 0
|
||||
}
|
||||
mt: 0.5,
|
||||
mx: 0.5
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -21,9 +21,12 @@ import { AuthenticatedContext } from '../../contexts/authentication';
|
||||
|
||||
import { I18nContext } from '../../i18n/i18n-react';
|
||||
import type { Locales } from '../../i18n/i18n-types';
|
||||
import { locales } from '../..//i18n/i18n-util';
|
||||
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>({
|
||||
maxWidth: '250px',
|
||||
whiteSpace: 'nowrap',
|
||||
@@ -58,13 +61,29 @@ const LayoutAuthMenu: FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<TextField name="locale" variant="outlined" value={locale} onChange={onLocaleSelected} size="small" select>
|
||||
{locales.map((loc) => (
|
||||
<MenuItem key={loc} value={loc}>
|
||||
{loc}
|
||||
</MenuItem>
|
||||
))}
|
||||
<TextField
|
||||
name="locale"
|
||||
InputProps={{ style: { fontSize: 10 } }}
|
||||
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>
|
||||
</TextField>
|
||||
|
||||
<IconButton
|
||||
id="open-auth-menu"
|
||||
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