add version tag to header

This commit is contained in:
Gabe Yuan
2023-07-20 14:09:13 +08:00
parent 8080a11259
commit 787bfcd42a
13 changed files with 18 additions and 19 deletions

View File

@@ -4,6 +4,7 @@ export { I18N, UI_LANGS } from "./i18n";
const APP_NAME = process.env.REACT_APP_NAME.trim().split(/\s+/).join("-");
export const APP_LCNAME = APP_NAME.toLowerCase();
export const APP_VERSION = "1.1.1";
export const STOKEY_MSAUTH = `${APP_NAME}_msauth`;
export const STOKEY_SETTING = `${APP_NAME}_setting`;

View File

@@ -9,6 +9,7 @@ import { useDarkMode } from "../../hooks/ColorMode";
import LightModeIcon from "@mui/icons-material/LightMode";
import DarkModeIcon from "@mui/icons-material/DarkMode";
import { useI18n } from "../../hooks/I18n";
import { APP_VERSION } from "../../config";
function Header(props) {
const i18n = useI18n();
@@ -35,7 +36,7 @@ function Header(props) {
<MenuIcon />
</IconButton>
</Box>
<Box sx={{ flexGrow: 1 }}>{i18n("app_name")}</Box>
<Box sx={{ flexGrow: 1 }}>{`${i18n("app_name")} v${APP_VERSION}`}</Box>
<IconButton onClick={switchColorMode} color="inherit">
{darkMode ? <LightModeIcon /> : <DarkModeIcon />}
</IconButton>