From 6951a0ff08266fc12fd1ffde8d75b8d3e6214c18 Mon Sep 17 00:00:00 2001 From: Claudemir Todo Bom Date: Sun, 28 Jul 2024 15:35:13 -0300 Subject: [PATCH] frontend: put version information on drawer --- frontend/src/layout/MainListItems.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend/src/layout/MainListItems.js b/frontend/src/layout/MainListItems.js index e5910350..6e99faf3 100644 --- a/frontend/src/layout/MainListItems.js +++ b/frontend/src/layout/MainListItems.js @@ -43,6 +43,10 @@ import { isArray } from "lodash"; import api from "../services/api"; import toastError from "../errors/toastError"; import { makeStyles } from "@material-ui/core/styles"; +import Typography from "@material-ui/core/Typography"; +import { loadJSON } from "../helpers/loadJSON"; + +const gitinfo = loadJSON('/gitinfo.json'); const useStyles = makeStyles((theme) => ({ ListSubheader: { @@ -145,6 +149,7 @@ const MainListItems = (props) => { const [pageNumber, setPageNumber] = useState(1); const [searchParam] = useState(""); const [chats, dispatch] = useReducer(reducer, []); + const [version, setVersion] = useState("v N/A"); const socketManager = useContext(SocketContext); @@ -456,6 +461,14 @@ const MainListItems = (props) => { primary={i18n.t("mainDrawer.listItems.settings")} icon={} /> + + + + {`${gitinfo.tagName.replace("N/A", "") || gitinfo.branchName + " " + gitinfo.commitHash }`} +  /  + {`${gitinfo.buildTimestamp }`} + + {}