chore: Update translation for email to login and change application label
parent
11e2dc1a50
commit
dfa4be6253
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useContext, useEffect } from "react";
|
||||
import clsx from "clsx";
|
||||
import React, { useState, useContext, useEffect } from "react"
|
||||
import clsx from "clsx"
|
||||
|
||||
import {
|
||||
makeStyles,
|
||||
|
@ -12,22 +12,22 @@ import {
|
|||
MenuItem,
|
||||
IconButton,
|
||||
Menu,
|
||||
} from "@material-ui/core";
|
||||
} from "@material-ui/core"
|
||||
|
||||
import MenuIcon from "@material-ui/icons/Menu";
|
||||
import ChevronLeftIcon from "@material-ui/icons/ChevronLeft";
|
||||
import AccountCircle from "@material-ui/icons/AccountCircle";
|
||||
import MenuIcon from "@material-ui/icons/Menu"
|
||||
import ChevronLeftIcon from "@material-ui/icons/ChevronLeft"
|
||||
import AccountCircle from "@material-ui/icons/AccountCircle"
|
||||
|
||||
import MainListItems from "./MainListItems";
|
||||
import NotificationsPopOver from "../components/NotificationsPopOver";
|
||||
import UserModal from "../components/UserModal";
|
||||
import { AuthContext } from "../context/Auth/AuthContext";
|
||||
import BackdropLoading from "../components/BackdropLoading";
|
||||
import { i18n } from "../translate/i18n";
|
||||
import MainListItems from "./MainListItems"
|
||||
import NotificationsPopOver from "../components/NotificationsPopOver"
|
||||
import UserModal from "../components/UserModal"
|
||||
import { AuthContext } from "../context/Auth/AuthContext"
|
||||
import BackdropLoading from "../components/BackdropLoading"
|
||||
import { i18n } from "../translate/i18n"
|
||||
|
||||
//import MailLogo from '../assets/logo.jpg';
|
||||
|
||||
const drawerWidth = 240;
|
||||
const drawerWidth = 240
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
|
@ -109,60 +109,60 @@ const useStyles = makeStyles((theme) => ({
|
|||
overflow: "auto",
|
||||
flexDirection: "column",
|
||||
},
|
||||
}));
|
||||
}))
|
||||
|
||||
const LoggedInLayout = ({ children }) => {
|
||||
const classes = useStyles();
|
||||
const [userModalOpen, setUserModalOpen] = useState(false);
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const { handleLogout, loading } = useContext(AuthContext);
|
||||
const [drawerOpen, setDrawerOpen] = useState(false);
|
||||
const [drawerVariant, setDrawerVariant] = useState("permanent");
|
||||
const { user } = useContext(AuthContext);
|
||||
const classes = useStyles()
|
||||
const [userModalOpen, setUserModalOpen] = useState(false)
|
||||
const [anchorEl, setAnchorEl] = useState(null)
|
||||
const [menuOpen, setMenuOpen] = useState(false)
|
||||
const { handleLogout, loading } = useContext(AuthContext)
|
||||
const [drawerOpen, setDrawerOpen] = useState(false)
|
||||
const [drawerVariant, setDrawerVariant] = useState("permanent")
|
||||
const { user } = useContext(AuthContext)
|
||||
|
||||
useEffect(() => {
|
||||
if (document.body.offsetWidth > 600) {
|
||||
setDrawerOpen(true);
|
||||
setDrawerOpen(true)
|
||||
}
|
||||
}, []);
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (document.body.offsetWidth < 600) {
|
||||
setDrawerVariant("temporary");
|
||||
setDrawerVariant("temporary")
|
||||
} else {
|
||||
setDrawerVariant("permanent");
|
||||
setDrawerVariant("permanent")
|
||||
}
|
||||
}, [drawerOpen]);
|
||||
}, [drawerOpen])
|
||||
|
||||
const handleMenu = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
setMenuOpen(true);
|
||||
};
|
||||
setAnchorEl(event.currentTarget)
|
||||
setMenuOpen(true)
|
||||
}
|
||||
|
||||
const handleCloseMenu = () => {
|
||||
setAnchorEl(null);
|
||||
setMenuOpen(false);
|
||||
};
|
||||
setAnchorEl(null)
|
||||
setMenuOpen(false)
|
||||
}
|
||||
|
||||
const handleOpenUserModal = () => {
|
||||
setUserModalOpen(true);
|
||||
handleCloseMenu();
|
||||
};
|
||||
setUserModalOpen(true)
|
||||
handleCloseMenu()
|
||||
}
|
||||
|
||||
const handleClickLogout = () => {
|
||||
handleCloseMenu();
|
||||
handleLogout();
|
||||
};
|
||||
handleCloseMenu()
|
||||
handleLogout()
|
||||
}
|
||||
|
||||
const drawerClose = () => {
|
||||
if (document.body.offsetWidth < 600) {
|
||||
setDrawerOpen(false);
|
||||
setDrawerOpen(false)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return <BackdropLoading />;
|
||||
return <BackdropLoading />
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -218,10 +218,10 @@ const LoggedInLayout = ({ children }) => {
|
|||
color="inherit"
|
||||
noWrap
|
||||
className={classes.title}
|
||||
>
|
||||
|
||||
OMNIHIT22
|
||||
|
||||
>
|
||||
|
||||
OMNIHIT Espaçolaser - Lojas
|
||||
|
||||
</Typography>
|
||||
{user.id && <NotificationsPopOver />}
|
||||
|
||||
|
@ -266,7 +266,7 @@ const LoggedInLayout = ({ children }) => {
|
|||
{children ? children : null}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default LoggedInLayout;
|
||||
export default LoggedInLayout
|
||||
|
|
|
@ -9,7 +9,7 @@ const messages = {
|
|||
},
|
||||
form: {
|
||||
name: "Nome",
|
||||
email: "Email",
|
||||
email: "Login",
|
||||
password: "Senha",
|
||||
},
|
||||
buttons: {
|
||||
|
@ -20,7 +20,7 @@ const messages = {
|
|||
login: {
|
||||
title: "Login",
|
||||
form: {
|
||||
email: "Email",
|
||||
email: "Login",
|
||||
password: "Senha",
|
||||
},
|
||||
buttons: {
|
||||
|
@ -216,7 +216,7 @@ const messages = {
|
|||
},
|
||||
form: {
|
||||
name: "Nome",
|
||||
email: "Email",
|
||||
email: "Login",
|
||||
password: "Senha",
|
||||
profile: "Perfil",
|
||||
},
|
||||
|
@ -389,7 +389,7 @@ const messages = {
|
|||
title: "Usuários",
|
||||
table: {
|
||||
name: "Nome",
|
||||
email: "Email",
|
||||
email: "Login",
|
||||
profile: "Perfil",
|
||||
actions: "Ações",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue