Add version to console, rageshake, and settings modal

This commit is contained in:
Robert Long 2022-02-16 11:29:43 -08:00
parent 0f3a7f9fd9
commit 9fc4af2bd7
5 changed files with 16 additions and 1 deletions

View file

@ -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

View file

@ -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);

View file

@ -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({
</>
}
>
<FieldRow>
<Body className={styles.fieldRowText}>
Version: {import.meta.env.VITE_APP_VERSION || "dev"}
</Body>
</FieldRow>
<FieldRow>
<InputField
id="showInspector"

View file

@ -6,3 +6,7 @@
.tabContainer {
margin: 27px 16px;
}
.fieldRowText {
margin-bottom: 0;
}

View file

@ -41,7 +41,7 @@ export function useSubmitRageshake() {
opts.description || "User did not supply any additional text."
);
body.append("app", "matrix-video-chat");
body.append("version", "dev");
body.append("version", import.meta.env.VITE_APP_VERSION || "dev");
body.append("user_agent", userAgent);
body.append("installed_pwa", false);
body.append("touch_input", touchInput);