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