2017-11-04 05:19:45 +00:00
|
|
|
/*
|
|
|
|
Copyright 2017 Travis Ralston
|
2021-06-16 08:01:13 +00:00
|
|
|
Copyright 2018 - 2021 The Matrix.org Foundation C.I.C.
|
2017-11-04 05:19:45 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2020-07-28 18:02:02 +00:00
|
|
|
import { MatrixClient } from 'matrix-js-sdk/src/client';
|
2021-08-11 14:36:35 +00:00
|
|
|
import { ReactNode } from "react";
|
2020-03-25 18:38:12 +00:00
|
|
|
|
2021-08-11 14:36:35 +00:00
|
|
|
import { _td } from '../languageHandler';
|
2017-11-05 05:28:35 +00:00
|
|
|
import {
|
|
|
|
NotificationBodyEnabledController,
|
|
|
|
NotificationsEnabledController,
|
|
|
|
} from "./controllers/NotificationControllers";
|
2019-01-12 00:24:06 +00:00
|
|
|
import CustomStatusController from "./controllers/CustomStatusController";
|
2019-02-11 18:10:00 +00:00
|
|
|
import ThemeController from './controllers/ThemeController';
|
2020-03-25 18:38:12 +00:00
|
|
|
import PushToMatrixClientController from './controllers/PushToMatrixClientController';
|
2019-11-15 11:31:19 +00:00
|
|
|
import ReloadOnChangeController from "./controllers/ReloadOnChangeController";
|
2020-04-14 15:18:57 +00:00
|
|
|
import FontSizeController from './controllers/FontSizeController';
|
2020-06-15 14:33:52 +00:00
|
|
|
import SystemFontController from './controllers/SystemFontController';
|
|
|
|
import UseSystemFontController from './controllers/UseSystemFontController';
|
2020-07-28 18:02:02 +00:00
|
|
|
import { SettingLevel } from "./SettingLevel";
|
2020-07-28 21:24:32 +00:00
|
|
|
import SettingController from "./controllers/SettingController";
|
2020-09-08 09:46:09 +00:00
|
|
|
import { isMac } from '../Keyboard';
|
2020-09-15 04:27:40 +00:00
|
|
|
import UIFeatureController from "./controllers/UIFeatureController";
|
|
|
|
import { UIFeature } from "./UIFeature";
|
2020-09-18 17:33:02 +00:00
|
|
|
import { OrderedMultiController } from "./controllers/OrderedMultiController";
|
2021-11-17 15:19:30 +00:00
|
|
|
import { Layout } from "./enums/Layout";
|
2021-02-17 17:43:31 +00:00
|
|
|
import ReducedMotionController from './controllers/ReducedMotionController';
|
2021-02-19 13:06:45 +00:00
|
|
|
import IncompatibleController from "./controllers/IncompatibleController";
|
2021-11-17 15:19:30 +00:00
|
|
|
import { ImageSize } from "./enums/ImageSize";
|
2021-11-11 13:07:41 +00:00
|
|
|
import { MetaSpace } from "../stores/spaces";
|
2017-11-04 05:19:45 +00:00
|
|
|
|
|
|
|
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
|
2020-07-28 18:02:02 +00:00
|
|
|
const LEVELS_ROOM_SETTINGS = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
SettingLevel.ROOM_DEVICE,
|
|
|
|
SettingLevel.ROOM_ACCOUNT,
|
|
|
|
SettingLevel.ACCOUNT,
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
];
|
|
|
|
const LEVELS_ROOM_OR_ACCOUNT = [
|
|
|
|
SettingLevel.ROOM_ACCOUNT,
|
|
|
|
SettingLevel.ACCOUNT,
|
|
|
|
];
|
|
|
|
const LEVELS_ROOM_SETTINGS_WITH_ROOM = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
SettingLevel.ROOM_DEVICE,
|
|
|
|
SettingLevel.ROOM_ACCOUNT,
|
|
|
|
SettingLevel.ACCOUNT,
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
SettingLevel.ROOM,
|
|
|
|
];
|
|
|
|
const LEVELS_ACCOUNT_SETTINGS = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
SettingLevel.ACCOUNT,
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
];
|
|
|
|
const LEVELS_FEATURE = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
];
|
|
|
|
const LEVELS_DEVICE_ONLY_SETTINGS = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
];
|
|
|
|
const LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG = [
|
|
|
|
SettingLevel.DEVICE,
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
];
|
2020-09-15 04:27:40 +00:00
|
|
|
const LEVELS_UI_FEATURE = [
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
// in future we might have a .well-known level or something
|
|
|
|
];
|
2017-11-04 05:19:45 +00:00
|
|
|
|
2021-11-25 16:21:10 +00:00
|
|
|
export enum LabGroup {
|
|
|
|
Messaging,
|
|
|
|
Profile,
|
|
|
|
Spaces,
|
|
|
|
Widgets,
|
|
|
|
Rooms,
|
|
|
|
Moderation,
|
|
|
|
Analytics,
|
|
|
|
MessagePreviews,
|
|
|
|
Themes,
|
|
|
|
Encryption,
|
|
|
|
Experimental,
|
|
|
|
Developer,
|
|
|
|
}
|
|
|
|
|
|
|
|
export const labGroupNames: Record<LabGroup, string> = {
|
|
|
|
[LabGroup.Messaging]: _td("Messaging"),
|
|
|
|
[LabGroup.Profile]: _td("Profile"),
|
|
|
|
[LabGroup.Spaces]: _td("Spaces"),
|
|
|
|
[LabGroup.Widgets]: _td("Widgets"),
|
|
|
|
[LabGroup.Rooms]: _td("Rooms"),
|
|
|
|
[LabGroup.Moderation]: _td("Moderation"),
|
|
|
|
[LabGroup.Analytics]: _td("Analytics"),
|
|
|
|
[LabGroup.MessagePreviews]: _td("Message Previews"),
|
|
|
|
[LabGroup.Themes]: _td("Themes"),
|
|
|
|
[LabGroup.Encryption]: _td("Encryption"),
|
|
|
|
[LabGroup.Experimental]: _td("Experimental"),
|
|
|
|
[LabGroup.Developer]: _td("Developer"),
|
|
|
|
};
|
|
|
|
|
|
|
|
interface IBaseSetting {
|
|
|
|
isFeature?: false | undefined;
|
2020-07-28 18:02:02 +00:00
|
|
|
|
|
|
|
// Display names are strongly recommended for clarity.
|
|
|
|
// Display name can also be an object for different levels.
|
|
|
|
displayName?: string | {
|
|
|
|
// @ts-ignore - TS wants the key to be a string, but we know better
|
|
|
|
[level: SettingLevel]: string;
|
|
|
|
};
|
|
|
|
|
2021-06-17 15:22:40 +00:00
|
|
|
// Optional description which will be shown as microCopy under SettingsFlags
|
|
|
|
description?: string;
|
|
|
|
|
2020-07-28 18:02:02 +00:00
|
|
|
// The supported levels are required. Preferably, use the preset arrays
|
|
|
|
// at the top of this file to define this rather than a custom array.
|
|
|
|
supportedLevels?: SettingLevel[];
|
|
|
|
|
|
|
|
// Required. Can be any data type. The value specified here should match
|
|
|
|
// the data being stored (ie: if a boolean is used, the setting should
|
|
|
|
// represent a boolean).
|
|
|
|
default: any;
|
|
|
|
|
|
|
|
// Optional settings controller. See SettingsController for more information.
|
2020-07-28 21:24:32 +00:00
|
|
|
controller?: SettingController;
|
2020-07-28 18:02:02 +00:00
|
|
|
|
|
|
|
// Optional flag to make supportedLevels be respected as the order to handle
|
|
|
|
// settings. The first element is treated as "most preferred". The "default"
|
|
|
|
// level is always appended to the end.
|
|
|
|
supportedLevelsAreOrdered?: boolean;
|
|
|
|
|
|
|
|
// Optional value to invert a boolean setting's value. The string given will
|
|
|
|
// be read as the setting's ID instead of the one provided as the key for the
|
|
|
|
// setting definition. By setting this, the returned value will automatically
|
|
|
|
// be inverted, except for when the default value is returned. Inversion will
|
|
|
|
// occur after the controller is asked for an override. This should be used by
|
|
|
|
// historical settings which we don't want existing user's values be wiped. Do
|
|
|
|
// not use this for new settings.
|
|
|
|
invertedSettingName?: string;
|
2021-04-27 15:29:42 +00:00
|
|
|
|
2021-07-23 14:47:11 +00:00
|
|
|
// XXX: Keep this around for re-use in future Betas
|
2021-04-27 15:29:42 +00:00
|
|
|
betaInfo?: {
|
|
|
|
title: string; // _td
|
|
|
|
caption: string; // _td
|
2021-04-28 21:47:08 +00:00
|
|
|
disclaimer?: (enabled: boolean) => ReactNode;
|
2021-04-27 15:29:42 +00:00
|
|
|
image: string; // require(...)
|
2021-05-11 14:58:19 +00:00
|
|
|
feedbackSubheading?: string;
|
|
|
|
feedbackLabel?: string;
|
2021-06-16 08:01:13 +00:00
|
|
|
extraSettings?: string[];
|
2021-04-27 15:29:42 +00:00
|
|
|
};
|
2020-07-28 18:02:02 +00:00
|
|
|
}
|
|
|
|
|
2021-11-25 16:21:10 +00:00
|
|
|
export interface IFeature extends Omit<IBaseSetting, "isFeature"> {
|
|
|
|
// Must be set to true for features.
|
|
|
|
isFeature: true;
|
|
|
|
labsGroup: LabGroup;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Type using I-identifier for backwards compatibility from before it became a discriminated union
|
|
|
|
export type ISetting = IBaseSetting | IFeature;
|
|
|
|
|
2020-07-28 18:02:02 +00:00
|
|
|
export const SETTINGS: {[setting: string]: ISetting} = {
|
2022-01-17 15:04:37 +00:00
|
|
|
"feature_msc3531_hide_messages_pending_moderation": {
|
|
|
|
isFeature: true,
|
|
|
|
labsGroup: LabGroup.Moderation,
|
|
|
|
displayName: _td("Let moderators hide messages pending moderation."),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-06-18 16:09:02 +00:00
|
|
|
"feature_report_to_moderators": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Moderation,
|
2021-06-18 16:09:02 +00:00
|
|
|
displayName: _td("Report to moderators prototype. " +
|
|
|
|
"In rooms that support moderation, the `report` button will let you report abuse to room moderators"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-04-15 06:47:09 +00:00
|
|
|
"feature_dnd": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Profile,
|
2021-04-15 06:47:09 +00:00
|
|
|
displayName: _td("Show options to enable 'Do not disturb' mode"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-10-10 15:32:49 +00:00
|
|
|
"feature_latex_maths": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Messaging,
|
2020-11-26 17:26:42 +00:00
|
|
|
displayName: _td("Render LaTeX maths in messages"),
|
2020-10-10 15:32:49 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-08-21 01:44:59 +00:00
|
|
|
"feature_communities_v2_prototypes": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Spaces,
|
2020-08-21 01:59:44 +00:00
|
|
|
displayName: _td(
|
|
|
|
"Communities v2 prototypes. Requires compatible homeserver. " +
|
|
|
|
"Highly experimental - use with caution.",
|
|
|
|
),
|
2020-08-21 01:44:59 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
2021-08-11 13:52:40 +00:00
|
|
|
controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false),
|
2020-06-25 23:00:30 +00:00
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"feature_pinning": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Messaging,
|
2017-11-04 05:19:45 +00:00
|
|
|
displayName: _td("Message Pinning"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2017-11-04 21:44:01 +00:00
|
|
|
default: false,
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2021-08-24 08:09:28 +00:00
|
|
|
"feature_thread": {
|
2021-07-08 09:30:56 +00:00
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Messaging,
|
2021-08-19 11:25:29 +00:00
|
|
|
// Requires a reload as we change an option flag on the `js-sdk`
|
|
|
|
// And the entire sync history needs to be parsed again
|
|
|
|
controller: new ReloadOnChangeController(),
|
2021-07-08 09:30:56 +00:00
|
|
|
displayName: _td("Threaded messaging"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2018-12-18 22:11:08 +00:00
|
|
|
"feature_custom_status": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Profile,
|
2018-12-18 22:11:08 +00:00
|
|
|
displayName: _td("Custom user status messages"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
2019-01-12 00:24:06 +00:00
|
|
|
controller: new CustomStatusController(),
|
2018-12-18 22:11:08 +00:00
|
|
|
},
|
2019-02-07 18:04:30 +00:00
|
|
|
"feature_custom_tags": {
|
2018-09-13 16:11:46 +00:00
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Experimental,
|
2019-02-07 18:04:30 +00:00
|
|
|
displayName: _td("Group & filter rooms by custom tags (refresh to apply changes)"),
|
2018-09-13 16:11:46 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
2021-08-11 13:52:40 +00:00
|
|
|
controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false),
|
2018-09-13 16:11:46 +00:00
|
|
|
},
|
2018-12-24 15:09:10 +00:00
|
|
|
"feature_state_counters": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Rooms,
|
2018-12-24 15:09:10 +00:00
|
|
|
displayName: _td("Render simple counters in room header"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-08-23 15:12:40 +00:00
|
|
|
"feature_many_integration_managers": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Experimental,
|
2021-08-24 02:27:29 +00:00
|
|
|
displayName: _td("Multiple integration managers (requires manual setup)"),
|
2019-08-23 15:12:40 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-10-31 19:19:54 +00:00
|
|
|
"feature_mjolnir": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Moderation,
|
2019-10-31 19:19:54 +00:00
|
|
|
displayName: _td("Try out new ways to ignore people (experimental)"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2020-01-03 00:40:18 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2020-02-28 18:42:16 +00:00
|
|
|
"feature_custom_themes": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Themes,
|
2020-02-28 18:42:16 +00:00
|
|
|
displayName: _td("Support adding custom themes"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-08-13 15:40:18 +00:00
|
|
|
"feature_roomlist_preview_reactions_dms": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.MessagePreviews,
|
2020-08-13 15:40:18 +00:00
|
|
|
displayName: _td("Show message previews for reactions in DMs"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
2021-02-19 13:06:45 +00:00
|
|
|
// this option is a subset of `feature_roomlist_preview_reactions_all` so disable it when that one is enabled
|
|
|
|
controller: new IncompatibleController("feature_roomlist_preview_reactions_all"),
|
2020-08-13 15:40:18 +00:00
|
|
|
},
|
|
|
|
"feature_roomlist_preview_reactions_all": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.MessagePreviews,
|
2020-08-13 15:40:18 +00:00
|
|
|
displayName: _td("Show message previews for reactions in all rooms"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-10-02 01:41:03 +00:00
|
|
|
"feature_dehydration": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Encryption,
|
2020-10-02 21:43:49 +00:00
|
|
|
displayName: _td("Offline encrypted messaging using dehydrated devices"),
|
2020-10-02 01:41:03 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2022-01-13 17:03:37 +00:00
|
|
|
"feature_extensible_events": {
|
|
|
|
isFeature: true,
|
|
|
|
labsGroup: LabGroup.Developer, // developer for now, eventually Messaging and default on
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("Show extensible event representation of events"),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-04-15 06:47:09 +00:00
|
|
|
"doNotDisturb": {
|
|
|
|
supportedLevels: [SettingLevel.DEVICE],
|
|
|
|
default: false,
|
2021-11-30 18:08:46 +00:00
|
|
|
controller: new IncompatibleController("feature_dnd", false, false),
|
2021-04-15 06:47:09 +00:00
|
|
|
},
|
2019-10-31 19:19:54 +00:00
|
|
|
"mjolnirRooms": {
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-31 19:19:54 +00:00
|
|
|
default: [],
|
|
|
|
},
|
|
|
|
"mjolnirPersonalRoom": {
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-31 19:19:54 +00:00
|
|
|
default: null,
|
|
|
|
},
|
2019-12-09 13:28:43 +00:00
|
|
|
"feature_bridge_state": {
|
|
|
|
isFeature: true,
|
2021-11-25 16:21:10 +00:00
|
|
|
labsGroup: LabGroup.Rooms,
|
2019-12-09 13:28:43 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("Show info about bridges in room settings"),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-12-01 10:50:06 +00:00
|
|
|
"feature_breadcrumbs_v2": {
|
|
|
|
isFeature: true,
|
|
|
|
labsGroup: LabGroup.Rooms,
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("Use new room breadcrumbs"),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-12-10 11:50:01 +00:00
|
|
|
"feature_spotlight": {
|
|
|
|
isFeature: true,
|
|
|
|
labsGroup: LabGroup.Rooms,
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("New spotlight search experience"),
|
|
|
|
default: false,
|
|
|
|
},
|
2022-01-24 17:53:42 +00:00
|
|
|
"feature_right_panel_default_open": {
|
|
|
|
isFeature: true,
|
|
|
|
labsGroup: LabGroup.Rooms,
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("Right panel stays open (defaults to room member list)"),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-12-15 12:34:47 +00:00
|
|
|
"feature_jump_to_date": {
|
|
|
|
// We purposely leave out `isFeature: true` so it doesn't show in Labs
|
|
|
|
// by default. We will conditionally show it depending on whether we can
|
|
|
|
// detect MSC3030 support (see LabUserSettingsTab.tsx).
|
|
|
|
// labsGroup: LabGroup.Messaging,
|
2022-01-27 22:32:12 +00:00
|
|
|
displayName: _td("Jump to date (adds /jumptodate and jump to date headers)"),
|
2021-12-15 12:34:47 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-07-21 21:02:59 +00:00
|
|
|
"RoomList.backgroundImage": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: null,
|
|
|
|
},
|
2021-08-06 05:55:08 +00:00
|
|
|
"feature_hidden_read_receipts": {
|
2021-08-06 05:51:57 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2021-11-25 16:21:10 +00:00
|
|
|
displayName: _td("Don't send read receipts"),
|
2021-08-06 05:51:57 +00:00
|
|
|
default: false,
|
2021-07-14 13:12:35 +00:00
|
|
|
},
|
2020-06-04 16:50:56 +00:00
|
|
|
"baseFontSize": {
|
2020-04-21 10:41:41 +00:00
|
|
|
displayName: _td("Font size"),
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-06-04 16:50:56 +00:00
|
|
|
default: 10,
|
2020-04-21 10:41:41 +00:00
|
|
|
controller: new FontSizeController(),
|
|
|
|
},
|
2020-04-23 11:09:08 +00:00
|
|
|
"useCustomFontSize": {
|
2020-06-16 14:41:10 +00:00
|
|
|
displayName: _td("Use custom size"),
|
2020-04-23 11:09:08 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"MessageComposerInput.suggestEmoji": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Enable Emoji suggestions while typing'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'MessageComposerInput.dontSuggestEmoji',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2021-01-02 21:31:49 +00:00
|
|
|
"MessageComposerInput.showStickersButton": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Show stickers button'),
|
|
|
|
default: true,
|
2021-12-02 14:09:57 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.Widgets, false),
|
2021-01-02 21:31:49 +00:00
|
|
|
},
|
2020-06-19 21:44:37 +00:00
|
|
|
// TODO: Wire up appropriately to UI (FTUE notifications)
|
|
|
|
"Notifications.alwaysShowBadgeCounts": {
|
2020-06-25 07:58:54 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
2020-06-19 21:44:37 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"useCompactLayout": {
|
2020-07-03 11:06:00 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2021-10-30 01:59:21 +00:00
|
|
|
displayName: _td("Use a more compact 'Modern' layout"),
|
2017-11-04 05:19:45 +00:00
|
|
|
default: false,
|
2021-12-15 16:27:02 +00:00
|
|
|
controller: new IncompatibleController("layout", false, v => v !== Layout.Group),
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"showRedactions": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Show a placeholder for removed messages'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'hideRedactions',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"showJoinLeaves": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2022-01-14 13:08:34 +00:00
|
|
|
displayName: _td('Show join/leave messages (invites/removes/bans unaffected)'),
|
2019-01-25 03:57:40 +00:00
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'hideJoinLeaves',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"showAvatarChanges": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Show avatar changes'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'hideAvatarChanges',
|
2017-11-13 19:58:10 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"showDisplaynameChanges": {
|
2017-11-13 19:58:10 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Show display name changes'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'hideDisplaynameChanges',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"showReadReceipts": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS,
|
2019-02-26 22:27:50 +00:00
|
|
|
displayName: _td('Show read receipts sent by other users'),
|
2019-01-25 03:57:40 +00:00
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'hideReadReceipts',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
|
|
|
"showTwelveHourTimestamps": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Show timestamps in 12 hour format (e.g. 2:30pm)'),
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"alwaysShowTimestamps": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Always show message timestamps'),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-09-01 15:28:02 +00:00
|
|
|
"autoplayGifs": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-09-01 15:28:02 +00:00
|
|
|
displayName: _td('Autoplay GIFs'),
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"autoplayVideo": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-09-01 15:28:02 +00:00
|
|
|
displayName: _td('Autoplay videos'),
|
2017-11-04 05:19:45 +00:00
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"enableSyntaxHighlightLanguageDetection": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Enable automatic language detection for syntax highlighting'),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-18 16:44:32 +00:00
|
|
|
"expandCodeByDefault": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Expand code blocks by default'),
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-21 12:08:55 +00:00
|
|
|
"showCodeLineNumbers": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Show line numbers in code blocks'),
|
|
|
|
default: true,
|
|
|
|
},
|
2021-02-26 17:34:54 +00:00
|
|
|
"scrollToBottomOnMessageSent": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Jump to the bottom of the timeline when you send a message'),
|
|
|
|
default: true,
|
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"Pill.shouldShowPillAvatar": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Show avatars in user and room mentions'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'Pill.shouldHidePillAvatar',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"TextualBody.enableBigEmoji": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Enable big emoji in chat'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'TextualBody.disableBigEmoji',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
|
|
|
"MessageComposerInput.isRichTextEnabled": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"MessageComposer.showFormatting": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"sendTypingNotifications": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td("Send typing notifications"),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'dontSendTypingNotifications',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2020-02-08 21:21:30 +00:00
|
|
|
"showTypingNotifications": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td("Show typing notifications"),
|
|
|
|
default: true,
|
|
|
|
},
|
2021-01-17 15:44:29 +00:00
|
|
|
"ctrlFForSearch": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-07-01 16:53:38 +00:00
|
|
|
displayName: isMac ? _td("Use Command + F to search timeline") : _td("Use Ctrl + F to search timeline"),
|
2021-01-17 15:44:29 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2020-08-30 08:17:08 +00:00
|
|
|
"MessageComposerInput.ctrlEnterToSend": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-09-08 09:46:09 +00:00
|
|
|
displayName: isMac ? _td("Use Command + Enter to send a message") : _td("Use Ctrl + Enter to send a message"),
|
2020-08-30 08:17:08 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2021-02-12 06:53:09 +00:00
|
|
|
"MessageComposerInput.surroundWith": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-08-04 16:14:32 +00:00
|
|
|
displayName: _td("Surround selected text when typing special characters"),
|
2021-02-12 06:53:09 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"MessageComposerInput.autoReplaceEmoji": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Automatically replace plain text Emoji'),
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"VideoView.flipVideoHorizontally": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Mirror local video feed'),
|
|
|
|
default: false,
|
|
|
|
},
|
2019-01-25 03:57:40 +00:00
|
|
|
"TagPanel.enableTagPanel": {
|
2018-02-28 18:16:01 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Enable Community Filter Panel'),
|
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'TagPanel.disableTagPanel',
|
2020-09-16 11:55:04 +00:00
|
|
|
// We force the value to true because the invertedSettingName causes it to flip
|
|
|
|
controller: new UIFeatureController(UIFeature.Communities, true),
|
2018-02-28 18:16:01 +00:00
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"theme": {
|
2019-02-12 09:13:39 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-02-13 09:45:20 +00:00
|
|
|
default: "light",
|
2019-02-11 18:10:00 +00:00
|
|
|
controller: new ThemeController(),
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-10-01 13:21:22 +00:00
|
|
|
"custom_themes": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: [],
|
|
|
|
},
|
2019-11-20 13:41:06 +00:00
|
|
|
"use_system_theme": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: true,
|
2019-11-26 16:52:03 +00:00
|
|
|
displayName: _td("Match system theme"),
|
2019-11-20 13:41:06 +00:00
|
|
|
},
|
2020-06-15 14:33:52 +00:00
|
|
|
"useSystemFont": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
displayName: _td("Use a system font"),
|
|
|
|
controller: new UseSystemFontController(),
|
|
|
|
},
|
|
|
|
"systemFont": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: "",
|
|
|
|
displayName: _td("System font name"),
|
|
|
|
controller: new SystemFontController(),
|
|
|
|
},
|
2019-02-13 11:51:32 +00:00
|
|
|
"webRtcAllowPeerToPeer": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2021-05-04 10:36:22 +00:00
|
|
|
displayName: _td(
|
|
|
|
"Allow Peer-to-Peer for 1:1 calls " +
|
|
|
|
"(if you enable this, the other party might be able to see your IP address)",
|
|
|
|
),
|
2019-01-25 03:57:40 +00:00
|
|
|
default: true,
|
|
|
|
invertedSettingName: 'webRtcForceTURN',
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2018-05-26 16:22:23 +00:00
|
|
|
"webrtc_audiooutput": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: null,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"webrtc_audioinput": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-04 21:44:01 +00:00
|
|
|
default: null,
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
|
|
|
"webrtc_videoinput": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-04 21:44:01 +00:00
|
|
|
default: null,
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
|
|
|
"language": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2017-11-05 22:37:06 +00:00
|
|
|
default: "en",
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2019-04-04 21:06:03 +00:00
|
|
|
"breadcrumb_rooms": {
|
2020-07-16 03:15:32 +00:00
|
|
|
// not really a setting
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2020-07-16 03:15:32 +00:00
|
|
|
default: [],
|
|
|
|
},
|
|
|
|
"recent_emoji": {
|
|
|
|
// not really a setting
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-04-04 21:06:03 +00:00
|
|
|
default: [],
|
|
|
|
},
|
2021-12-10 11:50:01 +00:00
|
|
|
"SpotlightSearch.recentSearches": {
|
|
|
|
// not really a setting
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
|
|
|
default: [], // list of room IDs, most recent first
|
|
|
|
},
|
2020-03-13 00:02:50 +00:00
|
|
|
"room_directory_servers": {
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2020-03-13 00:02:50 +00:00
|
|
|
default: [],
|
|
|
|
},
|
2019-10-29 20:26:35 +00:00
|
|
|
"integrationProvisioning": {
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-29 20:20:53 +00:00
|
|
|
default: true,
|
|
|
|
},
|
2019-10-29 20:35:35 +00:00
|
|
|
"allowedWidgets": {
|
2021-01-14 17:30:25 +00:00
|
|
|
supportedLevels: [SettingLevel.ROOM_ACCOUNT, SettingLevel.ROOM_DEVICE],
|
|
|
|
supportedLevelsAreOrdered: true,
|
2019-10-29 20:35:35 +00:00
|
|
|
default: {}, // none allowed
|
|
|
|
},
|
2018-05-15 12:15:40 +00:00
|
|
|
"analyticsOptIn": {
|
2017-11-04 05:19:45 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2018-05-15 12:15:40 +00:00
|
|
|
displayName: _td('Send analytics data'),
|
2017-11-04 05:19:45 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2018-05-15 12:15:40 +00:00
|
|
|
"showCookieBar": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: true,
|
|
|
|
},
|
2021-12-05 22:39:33 +00:00
|
|
|
"pseudonymousAnalyticsOptIn": {
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
|
|
|
displayName: _td('Send analytics data'),
|
|
|
|
default: null,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"autocompleteDelay": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: 200,
|
|
|
|
},
|
2019-09-17 16:34:30 +00:00
|
|
|
"readMarkerInViewThresholdMs": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: 3000,
|
|
|
|
},
|
|
|
|
"readMarkerOutOfViewThresholdMs": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: 30000,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"blacklistUnverifiedDevices": {
|
2017-11-09 00:41:32 +00:00
|
|
|
// We specifically want to have room-device > device so that users may set a device default
|
|
|
|
// with a per-room override.
|
2020-07-30 03:00:32 +00:00
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.DEVICE],
|
2017-11-09 00:41:32 +00:00
|
|
|
supportedLevelsAreOrdered: true,
|
2017-11-05 02:15:55 +00:00
|
|
|
displayName: {
|
2020-01-29 15:48:25 +00:00
|
|
|
"default": _td('Never send encrypted messages to unverified sessions from this session'),
|
2020-01-29 19:55:27 +00:00
|
|
|
"room-device": _td('Never send encrypted messages to unverified sessions in this room from this session'),
|
2017-11-05 02:15:55 +00:00
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
default: false,
|
2020-09-18 17:33:02 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.AdvancedEncryption),
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
|
|
|
"urlPreviewsEnabled": {
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
|
|
|
displayName: {
|
|
|
|
"default": _td('Enable inline URL previews by default'),
|
|
|
|
"room-account": _td("Enable URL previews for this room (only affects you)"),
|
|
|
|
"room": _td("Enable URL previews by default for participants in this room"),
|
|
|
|
},
|
|
|
|
default: true,
|
2020-09-15 04:27:40 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.URLPreviews),
|
2017-11-04 05:19:45 +00:00
|
|
|
},
|
2018-06-22 17:44:54 +00:00
|
|
|
"urlPreviewsEnabled_e2ee": {
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.ROOM_ACCOUNT],
|
2018-06-22 17:44:54 +00:00
|
|
|
displayName: {
|
|
|
|
"room-account": _td("Enable URL previews for this room (only affects you)"),
|
|
|
|
},
|
|
|
|
default: false,
|
2020-09-15 04:27:40 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.URLPreviews),
|
2018-06-22 17:44:54 +00:00
|
|
|
},
|
2017-11-05 04:47:18 +00:00
|
|
|
"notificationsEnabled": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
2017-11-05 05:28:35 +00:00
|
|
|
controller: new NotificationsEnabledController(),
|
2017-11-05 04:47:18 +00:00
|
|
|
},
|
2019-04-19 21:31:51 +00:00
|
|
|
"notificationSound": {
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
|
|
|
default: false,
|
|
|
|
},
|
2017-11-05 04:47:18 +00:00
|
|
|
"notificationBodyEnabled": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 05:28:35 +00:00
|
|
|
default: true,
|
|
|
|
controller: new NotificationBodyEnabledController(),
|
2017-11-05 04:47:18 +00:00
|
|
|
},
|
|
|
|
"audioNotificationsEnabled": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 05:28:35 +00:00
|
|
|
default: true,
|
2017-11-05 04:47:18 +00:00
|
|
|
},
|
2018-05-12 20:29:37 +00:00
|
|
|
"enableWidgetScreenshots": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Enable widget screenshots on supported widgets'),
|
|
|
|
default: false,
|
|
|
|
},
|
2019-01-16 15:07:30 +00:00
|
|
|
"promptBeforeInviteUnknownUsers": {
|
2019-01-11 04:43:21 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-16 15:07:30 +00:00
|
|
|
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
|
|
|
|
default: true,
|
2019-01-11 04:43:21 +00:00
|
|
|
},
|
2018-10-24 17:15:25 +00:00
|
|
|
"showDeveloperTools": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Show developer tools'),
|
|
|
|
default: false,
|
|
|
|
},
|
2019-03-16 03:33:31 +00:00
|
|
|
"widgetOpenIDPermissions": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: {
|
2019-03-26 03:14:21 +00:00
|
|
|
allow: [],
|
|
|
|
deny: [],
|
2019-03-16 03:33:31 +00:00
|
|
|
},
|
|
|
|
},
|
2020-08-03 15:02:26 +00:00
|
|
|
// TODO: Remove setting: https://github.com/vector-im/element-web/issues/14373
|
2020-02-26 23:05:08 +00:00
|
|
|
"RoomList.orderAlphabetically": {
|
2020-02-18 14:55:12 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-26 23:19:05 +00:00
|
|
|
displayName: _td("Order rooms by name"),
|
2020-02-26 23:21:37 +00:00
|
|
|
default: false,
|
2020-02-18 14:55:12 +00:00
|
|
|
},
|
2020-08-03 15:02:26 +00:00
|
|
|
// TODO: Remove setting: https://github.com/vector-im/element-web/issues/14373
|
2019-02-22 23:57:41 +00:00
|
|
|
"RoomList.orderByImportance": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-18 14:55:12 +00:00
|
|
|
displayName: _td("Show rooms with unread notifications first"),
|
2019-02-22 23:57:41 +00:00
|
|
|
default: true,
|
|
|
|
},
|
2019-06-03 06:15:33 +00:00
|
|
|
"breadcrumbs": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-18 14:55:12 +00:00
|
|
|
displayName: _td("Show shortcuts to recently viewed rooms above the room list"),
|
2019-06-03 06:15:33 +00:00
|
|
|
default: true,
|
2021-12-01 10:50:06 +00:00
|
|
|
controller: new IncompatibleController("feature_breadcrumbs_v2", true),
|
2019-06-03 06:15:33 +00:00
|
|
|
},
|
2019-05-17 16:43:08 +00:00
|
|
|
"showHiddenEventsInTimeline": {
|
|
|
|
displayName: _td("Show hidden events in timeline"),
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-02-08 16:44:03 +00:00
|
|
|
"lowBandwidth": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2021-08-24 02:27:29 +00:00
|
|
|
displayName: _td('Low bandwidth mode (requires compatible homeserver)'),
|
2019-02-08 16:44:03 +00:00
|
|
|
default: false,
|
2019-11-15 11:31:19 +00:00
|
|
|
controller: new ReloadOnChangeController(),
|
2019-02-08 16:44:03 +00:00
|
|
|
},
|
2019-08-14 13:02:25 +00:00
|
|
|
"fallbackICEServerAllowed": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2019-08-15 10:11:46 +00:00
|
|
|
displayName: _td(
|
|
|
|
"Allow fallback call assist server turn.matrix.org when your homeserver " +
|
|
|
|
"does not offer one (your IP address would be shared during a call)",
|
|
|
|
),
|
2019-08-14 13:02:25 +00:00
|
|
|
// This is a tri-state value, where `null` means "prompt the user".
|
|
|
|
default: null,
|
|
|
|
},
|
2019-09-28 03:08:31 +00:00
|
|
|
"showImages": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td("Show previews/thumbnails for images"),
|
|
|
|
default: true,
|
|
|
|
},
|
2022-01-05 15:14:44 +00:00
|
|
|
"RightPanel.phasesGlobal": {
|
|
|
|
supportedLevels: [SettingLevel.DEVICE],
|
|
|
|
default: null,
|
2019-12-05 22:31:01 +00:00
|
|
|
},
|
2022-01-05 15:14:44 +00:00
|
|
|
"RightPanel.phases": {
|
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE],
|
|
|
|
default: null,
|
2019-12-05 22:31:01 +00:00
|
|
|
},
|
2020-01-23 11:24:54 +00:00
|
|
|
"enableEventIndexing": {
|
2019-11-26 12:31:16 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-01-23 11:24:54 +00:00
|
|
|
displayName: _td("Enable message search in encrypted rooms"),
|
2019-11-26 12:31:16 +00:00
|
|
|
default: true,
|
2019-11-26 14:06:04 +00:00
|
|
|
},
|
2020-01-31 17:44:52 +00:00
|
|
|
"crawlerSleepTime": {
|
2020-01-30 14:18:12 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-01-31 17:44:52 +00:00
|
|
|
displayName: _td("How fast should messages be downloaded."),
|
|
|
|
default: 3000,
|
2020-01-30 14:18:12 +00:00
|
|
|
},
|
2020-03-17 11:33:10 +00:00
|
|
|
"showCallButtonsInComposer": {
|
2021-02-26 20:46:39 +00:00
|
|
|
// Dev note: This is no longer "in composer" but is instead "in room header".
|
|
|
|
// TODO: Rename with settings v3
|
2020-03-17 11:33:10 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: true,
|
2020-09-16 12:40:27 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.Voip),
|
2020-03-17 11:33:10 +00:00
|
|
|
},
|
2020-03-25 18:38:12 +00:00
|
|
|
"e2ee.manuallyVerifyAllSessions": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
displayName: _td("Manually verify all remote sessions"),
|
|
|
|
default: false,
|
2020-09-18 17:33:02 +00:00
|
|
|
controller: new OrderedMultiController([
|
|
|
|
// Apply the feature controller first to ensure that the setting doesn't
|
|
|
|
// show up and can't be toggled. PushToMatrixClientController doesn't
|
|
|
|
// do any overrides anyways.
|
|
|
|
new UIFeatureController(UIFeature.AdvancedEncryption),
|
|
|
|
new PushToMatrixClientController(
|
|
|
|
MatrixClient.prototype.setCryptoTrustCrossSignedDevices, true,
|
|
|
|
),
|
|
|
|
]),
|
2020-03-25 18:38:12 +00:00
|
|
|
},
|
2020-05-13 01:16:43 +00:00
|
|
|
"ircDisplayNameWidth": {
|
|
|
|
// We specifically want to have room-device > device so that users may set a device default
|
|
|
|
// with a per-room override.
|
2020-07-28 18:02:02 +00:00
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.DEVICE],
|
|
|
|
supportedLevelsAreOrdered: true,
|
2020-05-13 01:16:43 +00:00
|
|
|
displayName: _td("IRC display name width"),
|
|
|
|
default: 80,
|
|
|
|
},
|
2021-01-22 12:44:45 +00:00
|
|
|
"layout": {
|
2020-06-16 16:55:19 +00:00
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-01-22 12:44:45 +00:00
|
|
|
default: Layout.Group,
|
2020-06-16 16:55:19 +00:00
|
|
|
},
|
2021-11-17 15:19:30 +00:00
|
|
|
"Images.size": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: ImageSize.Normal,
|
|
|
|
},
|
2020-10-19 19:25:01 +00:00
|
|
|
"showChatEffects": {
|
2021-05-20 15:10:21 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2021-02-17 17:28:23 +00:00
|
|
|
displayName: _td("Show chat effects (animations when receiving e.g. confetti)"),
|
2020-10-19 19:25:01 +00:00
|
|
|
default: true,
|
2021-02-17 17:43:31 +00:00
|
|
|
controller: new ReducedMotionController(),
|
2020-10-19 11:24:22 +00:00
|
|
|
},
|
2021-09-08 17:26:54 +00:00
|
|
|
"Performance.addSendMessageTimingMetadata": {
|
|
|
|
supportedLevels: [SettingLevel.CONFIG],
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-19 00:41:42 +00:00
|
|
|
"Widgets.pinned": { // deprecated
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
|
|
|
default: {},
|
|
|
|
},
|
|
|
|
"Widgets.layout": {
|
2020-09-08 07:48:03 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
2020-09-08 15:27:09 +00:00
|
|
|
default: {},
|
2020-09-08 07:48:03 +00:00
|
|
|
},
|
2020-09-24 08:28:49 +00:00
|
|
|
"Widgets.leftPanel": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: null,
|
2021-07-27 20:17:24 +00:00
|
|
|
},
|
2021-07-30 11:20:02 +00:00
|
|
|
"Spaces.allRoomsInHome": {
|
2021-07-27 20:17:24 +00:00
|
|
|
displayName: _td("Show all rooms in Home"),
|
2021-07-28 13:39:19 +00:00
|
|
|
description: _td("All rooms you're in will appear in Home."),
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-07-27 20:17:24 +00:00
|
|
|
default: false,
|
2021-08-11 22:33:10 +00:00
|
|
|
controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", null),
|
2020-09-24 08:28:49 +00:00
|
|
|
},
|
2021-11-11 13:07:41 +00:00
|
|
|
"Spaces.enabledMetaSpaces": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: {
|
|
|
|
[MetaSpace.Home]: true,
|
|
|
|
},
|
|
|
|
},
|
2021-12-17 09:26:32 +00:00
|
|
|
"Spaces.showPeopleInSpace": {
|
|
|
|
supportedLevels: [SettingLevel.ROOM_ACCOUNT],
|
|
|
|
default: true,
|
|
|
|
controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", null),
|
|
|
|
},
|
2021-08-11 13:52:40 +00:00
|
|
|
"showCommunitiesInsteadOfSpaces": {
|
|
|
|
displayName: _td("Display Communities instead of Spaces"),
|
2021-08-12 14:53:10 +00:00
|
|
|
description: _td("Temporarily show communities instead of Spaces for this session. " +
|
|
|
|
"Support for this will be removed in the near future. This will reload Element."),
|
2021-08-11 13:52:40 +00:00
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: false,
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
},
|
2021-10-20 12:55:22 +00:00
|
|
|
"developerMode": {
|
|
|
|
displayName: _td("Developer mode"),
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-10-29 08:34:25 +00:00
|
|
|
"automaticErrorReporting": {
|
|
|
|
displayName: _td("Automatically send debug logs on any error"),
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
},
|
2022-01-13 15:55:25 +00:00
|
|
|
"automaticDecryptionErrorReporting": {
|
|
|
|
displayName: _td("Automatically send debug logs on decryption errors"),
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
},
|
2020-10-28 01:20:25 +00:00
|
|
|
[UIFeature.RoomHistorySettings]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-18 17:33:02 +00:00
|
|
|
[UIFeature.AdvancedEncryption]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-15 04:27:40 +00:00
|
|
|
[UIFeature.URLPreviews]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 10:38:50 +00:00
|
|
|
[UIFeature.Widgets]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 12:40:27 +00:00
|
|
|
[UIFeature.Voip]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 09:59:14 +00:00
|
|
|
[UIFeature.Feedback]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-17 10:55:10 +00:00
|
|
|
[UIFeature.Registration]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
[UIFeature.PasswordReset]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
[UIFeature.Deactivate]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 15:06:17 +00:00
|
|
|
[UIFeature.ShareQRCode]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
|
|
|
[UIFeature.ShareSocial]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 13:45:34 +00:00
|
|
|
[UIFeature.IdentityServer]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
2021-07-13 14:05:27 +00:00
|
|
|
// Identity server (discovery) settings make no sense if 3PIDs in general are hidden
|
2020-09-18 10:15:48 +00:00
|
|
|
controller: new UIFeatureController(UIFeature.ThirdPartyID),
|
2020-09-16 13:45:34 +00:00
|
|
|
},
|
2020-09-17 12:25:18 +00:00
|
|
|
[UIFeature.ThirdPartyID]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-09-16 10:26:15 +00:00
|
|
|
[UIFeature.Flair]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
2020-09-16 11:55:04 +00:00
|
|
|
// Disable Flair when Communities are disabled
|
|
|
|
controller: new UIFeatureController(UIFeature.Communities),
|
|
|
|
},
|
|
|
|
[UIFeature.Communities]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
2021-08-11 13:52:40 +00:00
|
|
|
controller: new IncompatibleController("showCommunitiesInsteadOfSpaces", false, false),
|
2020-09-16 10:26:15 +00:00
|
|
|
},
|
2020-09-16 11:14:33 +00:00
|
|
|
[UIFeature.AdvancedSettings]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
2020-08-18 07:56:38 +00:00
|
|
|
},
|
2021-12-21 09:08:22 +00:00
|
|
|
[UIFeature.TimelineEnableRelativeDates]: {
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
default: true,
|
|
|
|
},
|
2017-11-05 22:37:06 +00:00
|
|
|
};
|