Add version info to web app
This commit is contained in:
parent
5627097a6c
commit
7ac448f78c
4 changed files with 10 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "NODE_OPTIONS=\"--enable-source-maps\" vite",
|
||||
"start": "VITE_NTFY_COMMIT=$(git rev-parse --short HEAD) NODE_OPTIONS=\"--enable-source-maps\" vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"format": "prettier . --write",
|
||||
|
|
|
@ -71,6 +71,7 @@ const Preferences = () => (
|
|||
<Reservations />
|
||||
<Users />
|
||||
<Appearance />
|
||||
<VersionInfo />
|
||||
</Stack>
|
||||
</Container>
|
||||
);
|
||||
|
@ -491,6 +492,12 @@ const Appearance = () => {
|
|||
);
|
||||
};
|
||||
|
||||
const VersionInfo = () => (
|
||||
<Typography textAlign="center">
|
||||
ntfy {import.meta.env.DEV ? "dev" : import.meta.env.VITE_NTFY_VERSION} ({import.meta.env.VITE_NTFY_COMMIT})
|
||||
</Typography>
|
||||
);
|
||||
|
||||
const Language = () => {
|
||||
const { t, i18n } = useTranslation();
|
||||
const labelId = "prefLanguage";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue