From 9fc4af2bd7b4093d4bc2e1a2551d0bb8fc78914f Mon Sep 17 00:00:00 2001 From: Robert Long Date: Wed, 16 Feb 2022 11:29:43 -0800 Subject: [PATCH] Add version to console, rageshake, and settings modal --- scripts/dockerbuild.sh | 3 +++ src/main.jsx | 2 ++ src/settings/SettingsModal.jsx | 6 ++++++ src/settings/SettingsModal.module.css | 4 ++++ src/settings/rageshake.js | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/dockerbuild.sh b/scripts/dockerbuild.sh index bbab6b5..69c9def 100755 --- a/scripts/dockerbuild.sh +++ b/scripts/dockerbuild.sh @@ -24,6 +24,9 @@ yarn link cd .. cd matrix-video-chat + +export VITE_APP_VERSION=$(git describe --tags --abbrev=0) + yarn link matrix-js-sdk yarn link matrix-react-sdk yarn install diff --git a/src/main.jsx b/src/main.jsx index c43db9a..21138b3 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -27,6 +27,8 @@ import { InspectorContextProvider } from "./room/GroupCallInspector"; rageshake.init(); +console.info(`matrix-video-chat ${import.meta.env.VITE_APP_VERSION || "dev"}`); + if (import.meta.env.VITE_CUSTOM_THEME) { const style = document.documentElement.style; style.setProperty("--primaryColor", import.meta.env.VITE_PRIMARY_COLOR); diff --git a/src/settings/SettingsModal.jsx b/src/settings/SettingsModal.jsx index e456cff..36c33c0 100644 --- a/src/settings/SettingsModal.jsx +++ b/src/settings/SettingsModal.jsx @@ -11,6 +11,7 @@ import { useMediaHandler } from "./useMediaHandler"; import { FieldRow, InputField } from "../input/Input"; import { Button } from "../button"; import { useDownloadDebugLog } from "./rageshake"; +import { Body } from "../typography/Typography"; export function SettingsModal({ client, @@ -82,6 +83,11 @@ export function SettingsModal({ } > + + + Version: {import.meta.env.VITE_APP_VERSION || "dev"} + +