Add encryption tab
This commit is contained in:
parent
4958dad672
commit
8747e62103
4 changed files with 27 additions and 0 deletions
|
@ -15,6 +15,7 @@ import VisibilityOnIcon from "@vector-im/compound-design-tokens/assets/web/icons
|
||||||
import NotificationsIcon from "@vector-im/compound-design-tokens/assets/web/icons/notifications";
|
import NotificationsIcon from "@vector-im/compound-design-tokens/assets/web/icons/notifications";
|
||||||
import PreferencesIcon from "@vector-im/compound-design-tokens/assets/web/icons/preferences";
|
import PreferencesIcon from "@vector-im/compound-design-tokens/assets/web/icons/preferences";
|
||||||
import KeyboardIcon from "@vector-im/compound-design-tokens/assets/web/icons/keyboard";
|
import KeyboardIcon from "@vector-im/compound-design-tokens/assets/web/icons/keyboard";
|
||||||
|
import KeyIcon from "@vector-im/compound-design-tokens/assets/web/icons/key";
|
||||||
import SidebarIcon from "@vector-im/compound-design-tokens/assets/web/icons/sidebar";
|
import SidebarIcon from "@vector-im/compound-design-tokens/assets/web/icons/sidebar";
|
||||||
import MicOnIcon from "@vector-im/compound-design-tokens/assets/web/icons/mic-on";
|
import MicOnIcon from "@vector-im/compound-design-tokens/assets/web/icons/mic-on";
|
||||||
import LockIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock";
|
import LockIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock";
|
||||||
|
@ -44,6 +45,7 @@ import { NonEmptyArray } from "../../../@types/common";
|
||||||
import { SDKContext, SdkContextClass } from "../../../contexts/SDKContext";
|
import { SDKContext, SdkContextClass } from "../../../contexts/SDKContext";
|
||||||
import { useSettingValue } from "../../../hooks/useSettings";
|
import { useSettingValue } from "../../../hooks/useSettings";
|
||||||
import { ToastContext, useActiveToast } from "../../../contexts/ToastContext";
|
import { ToastContext, useActiveToast } from "../../../contexts/ToastContext";
|
||||||
|
import { EncryptionUserSettingsTab } from "../settings/tabs/user/EncryptionUserSettingsTab";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
initialTabId?: UserTab;
|
initialTabId?: UserTab;
|
||||||
|
@ -75,6 +77,8 @@ function titleForTabID(tabId: UserTab): React.ReactNode {
|
||||||
return _t("settings|voip|dialog_title", undefined, subs);
|
return _t("settings|voip|dialog_title", undefined, subs);
|
||||||
case UserTab.Security:
|
case UserTab.Security:
|
||||||
return _t("settings|security|dialog_title", undefined, subs);
|
return _t("settings|security|dialog_title", undefined, subs);
|
||||||
|
case UserTab.Encryption:
|
||||||
|
return _t("settings|encryption|dialog_title", undefined, subs);
|
||||||
case UserTab.Labs:
|
case UserTab.Labs:
|
||||||
return _t("settings|labs|dialog_title", undefined, subs);
|
return _t("settings|labs|dialog_title", undefined, subs);
|
||||||
case UserTab.Mjolnir:
|
case UserTab.Mjolnir:
|
||||||
|
@ -179,6 +183,10 @@ export default function UserSettingsDialog(props: IProps): JSX.Element {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tabs.push(
|
||||||
|
new Tab(UserTab.Encryption, _td("settings|encryption|title"), <KeyIcon />, <EncryptionUserSettingsTab />),
|
||||||
|
);
|
||||||
|
|
||||||
if (showLabsFlags() || SettingsStore.getFeatureSettingNames().some((k) => SettingsStore.getBetaInfo(k))) {
|
if (showLabsFlags() || SettingsStore.getFeatureSettingNames().some((k) => SettingsStore.getBetaInfo(k))) {
|
||||||
tabs.push(
|
tabs.push(
|
||||||
new Tab(UserTab.Labs, _td("common|labs"), <LabsIcon />, <LabsUserSettingsTab />, "UserSettingsLabs"),
|
new Tab(UserTab.Labs, _td("common|labs"), <LabsIcon />, <LabsUserSettingsTab />, "UserSettingsLabs"),
|
||||||
|
|
|
@ -15,6 +15,7 @@ export enum UserTab {
|
||||||
Sidebar = "USER_SIDEBAR_TAB",
|
Sidebar = "USER_SIDEBAR_TAB",
|
||||||
Voice = "USER_VOICE_TAB",
|
Voice = "USER_VOICE_TAB",
|
||||||
Security = "USER_SECURITY_TAB",
|
Security = "USER_SECURITY_TAB",
|
||||||
|
Encryption = "USER_ENCRYPTION_TAB",
|
||||||
Labs = "USER_LABS_TAB",
|
Labs = "USER_LABS_TAB",
|
||||||
Mjolnir = "USER_MJOLNIR_TAB",
|
Mjolnir = "USER_MJOLNIR_TAB",
|
||||||
Help = "USER_HELP_TAB",
|
Help = "USER_HELP_TAB",
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2024 New Vector Ltd.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||||
|
* Please see LICENSE files in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React, { JSX } from "react";
|
||||||
|
|
||||||
|
import SettingsTab from "../SettingsTab";
|
||||||
|
|
||||||
|
export function EncryptionUserSettingsTab(): JSX.Element {
|
||||||
|
return <SettingsTab />;
|
||||||
|
}
|
|
@ -2462,6 +2462,10 @@
|
||||||
"emoji_autocomplete": "Enable Emoji suggestions while typing",
|
"emoji_autocomplete": "Enable Emoji suggestions while typing",
|
||||||
"enable_markdown": "Enable Markdown",
|
"enable_markdown": "Enable Markdown",
|
||||||
"enable_markdown_description": "Start messages with <code>/plain</code> to send without markdown.",
|
"enable_markdown_description": "Start messages with <code>/plain</code> to send without markdown.",
|
||||||
|
"encryption": {
|
||||||
|
"dialog_title": "<strong>Settings:</strong> Encryption",
|
||||||
|
"title": "Encryption"
|
||||||
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"account_management_section": "Account management",
|
"account_management_section": "Account management",
|
||||||
"account_section": "Account",
|
"account_section": "Account",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue