Skip to content

Commit

Permalink
frontend: put version information on drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Jul 28, 2024
1 parent ea7eb25 commit 6951a0f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions frontend/src/layout/MainListItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -456,6 +461,14 @@ const MainListItems = (props) => {
primary={i18n.t("mainDrawer.listItems.settings")}
icon={<SettingsOutlinedIcon />}
/>

<Divider />
<Typography style={{ fontSize: "12px", padding: "10px", textAlign: "right", fontWeight: "bold" }}>
{`${gitinfo.tagName.replace("N/A", "") || gitinfo.branchName + " " + gitinfo.commitHash }`}
&nbsp;/&nbsp;
{`${gitinfo.buildTimestamp }`}
</Typography>

{}

</>
Expand Down

0 comments on commit 6951a0f

Please sign in to comment.