Show user's Matrix ID and device ID in developer settings tab (#2559)

This commit is contained in:
Hugh Nimmo-Smith
2024-08-16 15:37:57 +01:00
committed by GitHub
parent 69b762b9ed
commit f562cc1e7f
2 changed files with 18 additions and 8 deletions

View File

@@ -59,6 +59,7 @@
"username": "Username", "username": "Username",
"video": "Video" "video": "Video"
}, },
"device_id": "Device ID: {{id}}",
"disconnected_banner": "Connectivity to the server has been lost.", "disconnected_banner": "Connectivity to the server has been lost.",
"full_screen_view_description": "<0>Submitting debug logs will help us track down the problem.</0>", "full_screen_view_description": "<0>Submitting debug logs will help us track down the problem.</0>",
"full_screen_view_h1": "<0>Oops, something's gone wrong.</0>", "full_screen_view_h1": "<0>Oops, something's gone wrong.</0>",
@@ -99,6 +100,7 @@
"login_auth_links_prompt": "Not registered yet?", "login_auth_links_prompt": "Not registered yet?",
"login_subheading": "To continue to Element", "login_subheading": "To continue to Element",
"login_title": "Login", "login_title": "Login",
"matrix_id": "Matrix ID: {{id}}",
"microphone_off": "Microphone off", "microphone_off": "Microphone off",
"microphone_on": "Microphone on", "microphone_on": "Microphone on",
"mute_microphone_button_label": "Mute microphone", "mute_microphone_button_label": "Mute microphone",

View File

@@ -30,7 +30,7 @@ import UserIcon from "../icons/User.svg?react";
import FeedbackIcon from "../icons/Feedback.svg?react"; import FeedbackIcon from "../icons/Feedback.svg?react";
import { SelectInput } from "../input/SelectInput"; import { SelectInput } from "../input/SelectInput";
import { FieldRow, InputField } from "../input/Input"; import { FieldRow, InputField } from "../input/Input";
import { Body, Caption } from "../typography/Typography"; import { Caption } from "../typography/Typography";
import { AnalyticsNotice } from "../analytics/AnalyticsNotice"; import { AnalyticsNotice } from "../analytics/AnalyticsNotice";
import { ProfileSettingsTab } from "./ProfileSettingsTab"; import { ProfileSettingsTab } from "./ProfileSettingsTab";
import { FeedbackSettingsTab } from "./FeedbackSettingsTab"; import { FeedbackSettingsTab } from "./FeedbackSettingsTab";
@@ -239,13 +239,21 @@ export const SettingsModal: FC<Props> = ({
</> </>
} }
> >
<FieldRow> <p>
<Body className={styles.fieldRowText}> {t("version", {
{t("version", { version: import.meta.env.VITE_APP_VERSION || "dev",
version: import.meta.env.VITE_APP_VERSION || "dev", })}
})} </p>
</Body> <p>
</FieldRow> {t("matrix_id", {
id: client.getUserId() || "unknown",
})}
</p>
<p>
{t("device_id", {
id: client.getDeviceId() || "unknown",
})}
</p>
<FieldRow> <FieldRow>
<InputField <InputField
id="duplicateTiles" id="duplicateTiles"