2017-11-04 08:19:45 +03:00
|
|
|
|
/*
|
|
|
|
|
Copyright 2017 Travis Ralston
|
2021-06-16 11:01:13 +03:00
|
|
|
|
Copyright 2018 - 2021 The Matrix.org Foundation C.I.C.
|
2017-11-04 08:19:45 +03: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 21:02:02 +03:00
|
|
|
|
import { MatrixClient } from 'matrix-js-sdk/src/client';
|
2021-04-29 00:47:08 +03:00
|
|
|
|
import React, { ReactNode } from "react";
|
2020-03-25 21:38:12 +03:00
|
|
|
|
|
2021-04-27 18:29:42 +03:00
|
|
|
|
import { _t, _td } from '../languageHandler';
|
2017-11-05 08:28:35 +03:00
|
|
|
|
import {
|
|
|
|
|
NotificationBodyEnabledController,
|
|
|
|
|
NotificationsEnabledController,
|
|
|
|
|
} from "./controllers/NotificationControllers";
|
2019-01-12 03:24:06 +03:00
|
|
|
|
import CustomStatusController from "./controllers/CustomStatusController";
|
2019-02-11 21:10:00 +03:00
|
|
|
|
import ThemeController from './controllers/ThemeController';
|
2020-03-25 21:38:12 +03:00
|
|
|
|
import PushToMatrixClientController from './controllers/PushToMatrixClientController';
|
2019-11-15 14:31:19 +03:00
|
|
|
|
import ReloadOnChangeController from "./controllers/ReloadOnChangeController";
|
2020-04-14 18:18:57 +03:00
|
|
|
|
import FontSizeController from './controllers/FontSizeController';
|
2020-06-15 17:33:52 +03:00
|
|
|
|
import SystemFontController from './controllers/SystemFontController';
|
|
|
|
|
import UseSystemFontController from './controllers/UseSystemFontController';
|
2020-07-28 21:02:02 +03:00
|
|
|
|
import { SettingLevel } from "./SettingLevel";
|
2020-07-29 00:24:32 +03:00
|
|
|
|
import SettingController from "./controllers/SettingController";
|
2020-07-30 17:53:54 +03:00
|
|
|
|
import { RightPanelPhases } from "../stores/RightPanelStorePhases";
|
2020-09-08 12:46:09 +03:00
|
|
|
|
import { isMac } from '../Keyboard';
|
2020-09-15 07:27:40 +03:00
|
|
|
|
import UIFeatureController from "./controllers/UIFeatureController";
|
|
|
|
|
import { UIFeature } from "./UIFeature";
|
2020-09-18 20:33:02 +03:00
|
|
|
|
import { OrderedMultiController } from "./controllers/OrderedMultiController";
|
2021-02-19 16:38:43 +03:00
|
|
|
|
import { Layout } from "./Layout";
|
2021-02-17 20:43:31 +03:00
|
|
|
|
import ReducedMotionController from './controllers/ReducedMotionController';
|
2021-02-19 16:06:45 +03:00
|
|
|
|
import IncompatibleController from "./controllers/IncompatibleController";
|
2021-04-27 18:29:42 +03:00
|
|
|
|
import SdkConfig from "../SdkConfig";
|
2017-11-04 08:19:45 +03:00
|
|
|
|
|
|
|
|
|
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
|
2020-07-28 21:02:02 +03: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 07:27:40 +03:00
|
|
|
|
const LEVELS_UI_FEATURE = [
|
|
|
|
|
SettingLevel.CONFIG,
|
|
|
|
|
// in future we might have a .well-known level or something
|
|
|
|
|
];
|
2017-11-04 08:19:45 +03:00
|
|
|
|
|
2020-07-29 19:57:14 +03:00
|
|
|
|
export interface ISetting {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
// Must be set to true for features. Default is 'false'.
|
|
|
|
|
isFeature?: boolean;
|
|
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 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-29 00:24:32 +03:00
|
|
|
|
controller?: SettingController;
|
2020-07-28 21:02:02 +03: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 18:29:42 +03:00
|
|
|
|
|
|
|
|
|
betaInfo?: {
|
|
|
|
|
title: string; // _td
|
|
|
|
|
caption: string; // _td
|
2021-04-29 00:47:08 +03:00
|
|
|
|
disclaimer?: (enabled: boolean) => ReactNode;
|
2021-04-27 18:29:42 +03:00
|
|
|
|
image: string; // require(...)
|
2021-05-11 17:58:19 +03:00
|
|
|
|
feedbackSubheading?: string;
|
|
|
|
|
feedbackLabel?: string;
|
2021-06-16 11:01:13 +03:00
|
|
|
|
extraSettings?: string[];
|
2021-04-27 18:29:42 +03:00
|
|
|
|
};
|
2020-07-28 21:02:02 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const SETTINGS: {[setting: string]: ISetting} = {
|
2021-02-19 16:50:49 +03:00
|
|
|
|
"feature_spaces": {
|
|
|
|
|
isFeature: true,
|
2021-02-25 15:20:10 +03:00
|
|
|
|
displayName: _td("Spaces prototype. Incompatible with Communities, Communities v2 and Custom Tags. " +
|
|
|
|
|
"Requires compatible homeserver for some features."),
|
2021-02-19 16:50:49 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
controller: new ReloadOnChangeController(),
|
2021-04-27 18:29:42 +03:00
|
|
|
|
betaInfo: {
|
|
|
|
|
title: _td("Spaces"),
|
2021-05-07 13:56:41 +03:00
|
|
|
|
caption: _td("Spaces are a new way to group rooms and people."),
|
2021-04-29 00:47:08 +03:00
|
|
|
|
disclaimer: (enabled) => {
|
|
|
|
|
if (enabled) {
|
|
|
|
|
return <>
|
2021-05-11 17:58:19 +03:00
|
|
|
|
<p>{ _t("If you leave, %(brand)s will reload with Spaces disabled. " +
|
2021-04-29 00:47:08 +03:00
|
|
|
|
"Communities and custom tags will be visible again.", {
|
|
|
|
|
brand: SdkConfig.get().brand,
|
|
|
|
|
}) }</p>
|
|
|
|
|
<p>{ _t("Beta available for web, desktop and Android. Thank you for trying the beta.") }</p>
|
|
|
|
|
</>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return <>
|
2021-04-29 18:08:59 +03:00
|
|
|
|
<p>{ _t("%(brand)s will reload with Spaces enabled. " +
|
|
|
|
|
"Communities and custom tags will be hidden.", {
|
2021-04-29 00:47:08 +03:00
|
|
|
|
brand: SdkConfig.get().brand,
|
|
|
|
|
}) }</p>
|
2021-04-30 00:02:18 +03:00
|
|
|
|
<b>{ _t("You can leave the beta any time from settings or tapping on a beta badge, " +
|
|
|
|
|
"like the one above.") }</b>
|
2021-04-29 00:47:08 +03:00
|
|
|
|
<p>{ _t("Beta available for web, desktop and Android. " +
|
|
|
|
|
"Some features may be unavailable on your homeserver.") }</p>
|
|
|
|
|
</>;
|
|
|
|
|
},
|
2021-04-27 18:29:42 +03:00
|
|
|
|
image: require("../../res/img/betas/spaces.png"),
|
2021-05-12 18:11:38 +03:00
|
|
|
|
feedbackSubheading: _td("Your feedback will help make spaces better. " +
|
|
|
|
|
"The more detail you can go into, the better."),
|
2021-05-11 17:58:19 +03:00
|
|
|
|
feedbackLabel: "spaces-feedback",
|
2021-06-16 11:01:13 +03:00
|
|
|
|
extraSettings: [
|
|
|
|
|
"feature_spaces.all_rooms",
|
|
|
|
|
"feature_spaces.space_member_dms",
|
|
|
|
|
"feature_spaces.space_dm_badges",
|
|
|
|
|
],
|
2021-04-27 18:29:42 +03:00
|
|
|
|
},
|
2021-02-19 16:50:49 +03:00
|
|
|
|
},
|
2021-06-16 11:01:13 +03:00
|
|
|
|
"feature_spaces.all_rooms": {
|
|
|
|
|
displayName: _td("Use an all rooms space instead of a home space."),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
|
},
|
|
|
|
|
"feature_spaces.space_member_dms": {
|
|
|
|
|
displayName: _td("Show DMs for joined/invited members in the space."),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
|
},
|
|
|
|
|
"feature_spaces.space_dm_badges": {
|
|
|
|
|
displayName: _td("Show notification badges for DMs in spaces."),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
controller: new ReloadOnChangeController(),
|
|
|
|
|
},
|
2021-04-15 09:47:09 +03:00
|
|
|
|
"feature_dnd": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Show options to enable 'Do not disturb' mode"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2021-03-12 07:28:40 +03:00
|
|
|
|
"feature_voice_messages": {
|
|
|
|
|
isFeature: true,
|
2021-05-08 04:36:29 +03:00
|
|
|
|
displayName: _td("Send and receive voice messages"),
|
2021-03-12 07:28:40 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-10-10 18:32:49 +03:00
|
|
|
|
"feature_latex_maths": {
|
|
|
|
|
isFeature: true,
|
2020-11-26 20:26:42 +03:00
|
|
|
|
displayName: _td("Render LaTeX maths in messages"),
|
2020-10-10 18:32:49 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-08-21 04:44:59 +03:00
|
|
|
|
"feature_communities_v2_prototypes": {
|
|
|
|
|
isFeature: true,
|
2020-08-21 04:59:44 +03:00
|
|
|
|
displayName: _td(
|
|
|
|
|
"Communities v2 prototypes. Requires compatible homeserver. " +
|
|
|
|
|
"Highly experimental - use with caution.",
|
|
|
|
|
),
|
2020-08-21 04:44:59 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
2021-02-19 16:50:49 +03:00
|
|
|
|
controller: new IncompatibleController("feature_spaces"),
|
2020-08-21 04:44:59 +03:00
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"feature_pinning": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Message Pinning"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2017-11-05 00:44:01 +03:00
|
|
|
|
default: false,
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2018-12-19 01:11:08 +03:00
|
|
|
|
"feature_custom_status": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Custom user status messages"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
2019-01-12 03:24:06 +03:00
|
|
|
|
controller: new CustomStatusController(),
|
2018-12-19 01:11:08 +03:00
|
|
|
|
},
|
2019-02-07 21:04:30 +03:00
|
|
|
|
"feature_custom_tags": {
|
2018-09-13 19:11:46 +03:00
|
|
|
|
isFeature: true,
|
2019-02-07 21:04:30 +03:00
|
|
|
|
displayName: _td("Group & filter rooms by custom tags (refresh to apply changes)"),
|
2018-09-13 19:11:46 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
2021-02-19 16:50:49 +03:00
|
|
|
|
controller: new IncompatibleController("feature_spaces"),
|
2018-09-13 19:11:46 +03:00
|
|
|
|
},
|
2018-12-24 18:09:10 +03:00
|
|
|
|
"feature_state_counters": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Render simple counters in room header"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-08-23 18:12:40 +03:00
|
|
|
|
"feature_many_integration_managers": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Multiple integration managers"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-10-31 22:19:54 +03:00
|
|
|
|
"feature_mjolnir": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Try out new ways to ignore people (experimental)"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2020-01-03 03:40:18 +03:00
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-02-28 21:42:16 +03:00
|
|
|
|
"feature_custom_themes": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Support adding custom themes"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-08-13 18:40:18 +03:00
|
|
|
|
"feature_roomlist_preview_reactions_dms": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Show message previews for reactions in DMs"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
2021-02-19 16:06:45 +03: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 18:40:18 +03:00
|
|
|
|
},
|
|
|
|
|
"feature_roomlist_preview_reactions_all": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
displayName: _td("Show message previews for reactions in all rooms"),
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-10-02 04:41:03 +03:00
|
|
|
|
"feature_dehydration": {
|
|
|
|
|
isFeature: true,
|
2020-10-03 00:43:49 +03:00
|
|
|
|
displayName: _td("Offline encrypted messaging using dehydrated devices"),
|
2020-10-02 04:41:03 +03:00
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-07-16 23:43:43 +03:00
|
|
|
|
"advancedRoomListLogging": {
|
2020-08-03 18:02:26 +03:00
|
|
|
|
// TODO: Remove flag before launch: https://github.com/vector-im/element-web/issues/14231
|
2020-07-16 23:43:43 +03:00
|
|
|
|
displayName: _td("Enable advanced debugging for the room list"),
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2021-04-15 09:47:09 +03:00
|
|
|
|
"doNotDisturb": {
|
|
|
|
|
supportedLevels: [SettingLevel.DEVICE],
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-10-31 22:19:54 +03:00
|
|
|
|
"mjolnirRooms": {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-31 22:19:54 +03:00
|
|
|
|
default: [],
|
|
|
|
|
},
|
|
|
|
|
"mjolnirPersonalRoom": {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-31 22:19:54 +03:00
|
|
|
|
default: null,
|
|
|
|
|
},
|
2019-12-09 16:28:43 +03:00
|
|
|
|
"feature_bridge_state": {
|
|
|
|
|
isFeature: true,
|
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
|
displayName: _td("Show info about bridges in room settings"),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-07-22 00:02:59 +03:00
|
|
|
|
"RoomList.backgroundImage": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2020-06-04 19:50:56 +03:00
|
|
|
|
"baseFontSize": {
|
2020-04-21 13:41:41 +03:00
|
|
|
|
displayName: _td("Font size"),
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-06-04 19:50:56 +03:00
|
|
|
|
default: 10,
|
2020-04-21 13:41:41 +03:00
|
|
|
|
controller: new FontSizeController(),
|
|
|
|
|
},
|
2020-04-23 14:09:08 +03:00
|
|
|
|
"useCustomFontSize": {
|
2020-06-16 17:41:10 +03:00
|
|
|
|
displayName: _td("Use custom size"),
|
2020-04-23 14:09:08 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"MessageComposerInput.suggestEmoji": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Enable Emoji suggestions while typing'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'MessageComposerInput.dontSuggestEmoji',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2021-01-03 00:31:49 +03:00
|
|
|
|
"MessageComposerInput.showStickersButton": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Show stickers button'),
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-06-20 00:44:37 +03:00
|
|
|
|
// TODO: Wire up appropriately to UI (FTUE notifications)
|
|
|
|
|
"Notifications.alwaysShowBadgeCounts": {
|
2020-06-25 10:58:54 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
2020-06-20 00:44:37 +03:00
|
|
|
|
default: false,
|
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"useCompactLayout": {
|
2020-07-03 14:06:00 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-06-24 18:06:50 +03:00
|
|
|
|
displayName: _td('Use a more compact ‘Modern’ layout'),
|
2017-11-04 08:19:45 +03:00
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"showRedactions": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Show a placeholder for removed messages'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'hideRedactions',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"showJoinLeaves": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Show join/leave messages (invites/kicks/bans unaffected)'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'hideJoinLeaves',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"showAvatarChanges": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Show avatar changes'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'hideAvatarChanges',
|
2017-11-13 22:58:10 +03:00
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"showDisplaynameChanges": {
|
2017-11-13 22:58:10 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Show display name changes'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'hideDisplaynameChanges',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"showReadReceipts": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS,
|
2019-02-27 01:27:50 +03:00
|
|
|
|
displayName: _td('Show read receipts sent by other users'),
|
2019-01-25 06:57:40 +03:00
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'hideReadReceipts',
|
2017-11-04 08:19:45 +03: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,
|
|
|
|
|
},
|
|
|
|
|
"autoplayGifsAndVideos": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Autoplay GIFs and videos'),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
"enableSyntaxHighlightLanguageDetection": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Enable automatic language detection for syntax highlighting'),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2021-01-18 19:44:32 +03:00
|
|
|
|
"expandCodeByDefault": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Expand code blocks by default'),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2021-01-21 15:08:55 +03:00
|
|
|
|
"showCodeLineNumbers": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Show line numbers in code blocks'),
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2021-02-26 20:34:54 +03: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 06:57:40 +03:00
|
|
|
|
"Pill.shouldShowPillAvatar": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Show avatars in user and room mentions'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'Pill.shouldHidePillAvatar',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"TextualBody.enableBigEmoji": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Enable big emoji in chat'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'TextualBody.disableBigEmoji',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
|
|
|
|
"MessageComposerInput.isRichTextEnabled": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
"MessageComposer.showFormatting": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-01-25 06:57:40 +03:00
|
|
|
|
"sendTypingNotifications": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td("Send typing notifications"),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'dontSendTypingNotifications',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2020-02-09 00:21:30 +03:00
|
|
|
|
"showTypingNotifications": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td("Show typing notifications"),
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2021-01-17 18:44:29 +03:00
|
|
|
|
"ctrlFForSearch": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: isMac ? _td("Use Command + F to search") : _td("Use Ctrl + F to search"),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2020-08-30 11:17:08 +03:00
|
|
|
|
"MessageComposerInput.ctrlEnterToSend": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-09-08 12:46:09 +03:00
|
|
|
|
displayName: isMac ? _td("Use Command + Enter to send a message") : _td("Use Ctrl + Enter to send a message"),
|
2020-08-30 11:17:08 +03:00
|
|
|
|
default: false,
|
|
|
|
|
},
|
2017-11-04 08:19:45 +03: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 06:57:40 +03:00
|
|
|
|
"TagPanel.enableTagPanel": {
|
2018-02-28 21:16:01 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-25 06:57:40 +03:00
|
|
|
|
displayName: _td('Enable Community Filter Panel'),
|
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'TagPanel.disableTagPanel',
|
2020-09-16 14:55:04 +03:00
|
|
|
|
// We force the value to true because the invertedSettingName causes it to flip
|
|
|
|
|
controller: new UIFeatureController(UIFeature.Communities, true),
|
2018-02-28 21:16:01 +03:00
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"theme": {
|
2019-02-12 12:13:39 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-02-13 12:45:20 +03:00
|
|
|
|
default: "light",
|
2019-02-11 21:10:00 +03:00
|
|
|
|
controller: new ThemeController(),
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-10-01 16:21:22 +03:00
|
|
|
|
"custom_themes": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: [],
|
|
|
|
|
},
|
2019-11-20 16:41:06 +03:00
|
|
|
|
"use_system_theme": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: true,
|
2019-11-26 19:52:03 +03:00
|
|
|
|
displayName: _td("Match system theme"),
|
2019-11-20 16:41:06 +03:00
|
|
|
|
},
|
2020-06-15 17:33:52 +03: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 14:51:32 +03:00
|
|
|
|
"webRtcAllowPeerToPeer": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2021-05-04 13:36:22 +03: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 06:57:40 +03:00
|
|
|
|
default: true,
|
|
|
|
|
invertedSettingName: 'webRtcForceTURN',
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2018-05-26 19:22:23 +03:00
|
|
|
|
"webrtc_audiooutput": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"webrtc_audioinput": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 00:44:01 +03:00
|
|
|
|
default: null,
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
|
|
|
|
"webrtc_videoinput": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 00:44:01 +03:00
|
|
|
|
default: null,
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
|
|
|
|
"language": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2017-11-06 01:37:06 +03:00
|
|
|
|
default: "en",
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2019-04-05 00:06:03 +03:00
|
|
|
|
"breadcrumb_rooms": {
|
2020-07-16 06:15:32 +03:00
|
|
|
|
// not really a setting
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2020-07-16 06:15:32 +03:00
|
|
|
|
default: [],
|
|
|
|
|
},
|
|
|
|
|
"recent_emoji": {
|
|
|
|
|
// not really a setting
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-04-05 00:06:03 +03:00
|
|
|
|
default: [],
|
|
|
|
|
},
|
2020-03-13 03:02:50 +03:00
|
|
|
|
"room_directory_servers": {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2020-03-13 03:02:50 +03:00
|
|
|
|
default: [],
|
|
|
|
|
},
|
2019-10-29 23:26:35 +03:00
|
|
|
|
"integrationProvisioning": {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ACCOUNT],
|
2019-10-29 23:20:53 +03:00
|
|
|
|
default: true,
|
|
|
|
|
},
|
2019-10-29 23:35:35 +03:00
|
|
|
|
"allowedWidgets": {
|
2021-01-14 20:30:25 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ROOM_ACCOUNT, SettingLevel.ROOM_DEVICE],
|
|
|
|
|
supportedLevelsAreOrdered: true,
|
2019-10-29 23:35:35 +03:00
|
|
|
|
default: {}, // none allowed
|
|
|
|
|
},
|
2018-05-15 15:15:40 +03:00
|
|
|
|
"analyticsOptIn": {
|
2017-11-04 08:19:45 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2018-05-15 15:15:40 +03:00
|
|
|
|
displayName: _td('Send analytics data'),
|
2017-11-04 08:19:45 +03:00
|
|
|
|
default: false,
|
|
|
|
|
},
|
2018-05-15 15:15:40 +03:00
|
|
|
|
"showCookieBar": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"autocompleteDelay": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
|
default: 200,
|
|
|
|
|
},
|
2019-09-17 19:34:30 +03:00
|
|
|
|
"readMarkerInViewThresholdMs": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
|
default: 3000,
|
|
|
|
|
},
|
|
|
|
|
"readMarkerOutOfViewThresholdMs": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
|
default: 30000,
|
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
"blacklistUnverifiedDevices": {
|
2017-11-09 03:41:32 +03: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 06:00:32 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.DEVICE],
|
2017-11-09 03:41:32 +03:00
|
|
|
|
supportedLevelsAreOrdered: true,
|
2017-11-05 05:15:55 +03:00
|
|
|
|
displayName: {
|
2020-01-29 18:48:25 +03:00
|
|
|
|
"default": _td('Never send encrypted messages to unverified sessions from this session'),
|
2020-01-29 22:55:27 +03:00
|
|
|
|
"room-device": _td('Never send encrypted messages to unverified sessions in this room from this session'),
|
2017-11-05 05:15:55 +03:00
|
|
|
|
},
|
2017-11-04 08:19:45 +03:00
|
|
|
|
default: false,
|
2020-09-18 20:33:02 +03:00
|
|
|
|
controller: new UIFeatureController(UIFeature.AdvancedEncryption),
|
2017-11-04 08:19:45 +03: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 07:27:40 +03:00
|
|
|
|
controller: new UIFeatureController(UIFeature.URLPreviews),
|
2017-11-04 08:19:45 +03:00
|
|
|
|
},
|
2018-06-22 20:44:54 +03:00
|
|
|
|
"urlPreviewsEnabled_e2ee": {
|
2020-07-28 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.ROOM_ACCOUNT],
|
2018-06-22 20:44:54 +03:00
|
|
|
|
displayName: {
|
|
|
|
|
"room-account": _td("Enable URL previews for this room (only affects you)"),
|
|
|
|
|
},
|
|
|
|
|
default: false,
|
2020-09-15 07:27:40 +03:00
|
|
|
|
controller: new UIFeatureController(UIFeature.URLPreviews),
|
2018-06-22 20:44:54 +03:00
|
|
|
|
},
|
2017-11-05 01:10:25 +03:00
|
|
|
|
"roomColor": {
|
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
|
|
|
|
displayName: _td("Room Colour"),
|
|
|
|
|
default: {
|
|
|
|
|
primary_color: null, // Hex string, eg: #000000
|
|
|
|
|
secondary_color: null, // Hex string, eg: #000000
|
|
|
|
|
},
|
|
|
|
|
},
|
2017-11-05 07:47:18 +03:00
|
|
|
|
"notificationsEnabled": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: false,
|
2017-11-05 08:28:35 +03:00
|
|
|
|
controller: new NotificationsEnabledController(),
|
2017-11-05 07:47:18 +03:00
|
|
|
|
},
|
2019-04-20 00:31:51 +03:00
|
|
|
|
"notificationSound": {
|
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2017-11-05 07:47:18 +03:00
|
|
|
|
"notificationBodyEnabled": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 08:28:35 +03:00
|
|
|
|
default: true,
|
|
|
|
|
controller: new NotificationBodyEnabledController(),
|
2017-11-05 07:47:18 +03:00
|
|
|
|
},
|
|
|
|
|
"audioNotificationsEnabled": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2017-11-05 08:28:35 +03:00
|
|
|
|
default: true,
|
2017-11-05 07:47:18 +03:00
|
|
|
|
},
|
2018-05-12 23:29:37 +03:00
|
|
|
|
"enableWidgetScreenshots": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Enable widget screenshots on supported widgets'),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-01-16 18:07:30 +03:00
|
|
|
|
"promptBeforeInviteUnknownUsers": {
|
2019-01-11 07:43:21 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2019-01-16 18:07:30 +03:00
|
|
|
|
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
|
|
|
|
|
default: true,
|
2019-01-11 07:43:21 +03:00
|
|
|
|
},
|
2018-10-24 20:15:25 +03:00
|
|
|
|
"showDeveloperTools": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td('Show developer tools'),
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-03-16 06:33:31 +03:00
|
|
|
|
"widgetOpenIDPermissions": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: {
|
2019-03-26 06:14:21 +03:00
|
|
|
|
allow: [],
|
|
|
|
|
deny: [],
|
2019-03-16 06:33:31 +03:00
|
|
|
|
},
|
|
|
|
|
},
|
2020-08-03 18:02:26 +03:00
|
|
|
|
// TODO: Remove setting: https://github.com/vector-im/element-web/issues/14373
|
2020-02-27 02:05:08 +03:00
|
|
|
|
"RoomList.orderAlphabetically": {
|
2020-02-18 17:55:12 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-27 02:19:05 +03:00
|
|
|
|
displayName: _td("Order rooms by name"),
|
2020-02-27 02:21:37 +03:00
|
|
|
|
default: false,
|
2020-02-18 17:55:12 +03:00
|
|
|
|
},
|
2020-08-03 18:02:26 +03:00
|
|
|
|
// TODO: Remove setting: https://github.com/vector-im/element-web/issues/14373
|
2019-02-23 02:57:41 +03:00
|
|
|
|
"RoomList.orderByImportance": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-18 17:55:12 +03:00
|
|
|
|
displayName: _td("Show rooms with unread notifications first"),
|
2019-02-23 02:57:41 +03:00
|
|
|
|
default: true,
|
|
|
|
|
},
|
2019-06-03 09:15:33 +03:00
|
|
|
|
"breadcrumbs": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2020-02-18 17:55:12 +03:00
|
|
|
|
displayName: _td("Show shortcuts to recently viewed rooms above the room list"),
|
2019-06-03 09:15:33 +03:00
|
|
|
|
default: true,
|
|
|
|
|
},
|
2019-05-17 19:43:08 +03:00
|
|
|
|
"showHiddenEventsInTimeline": {
|
|
|
|
|
displayName: _td("Show hidden events in timeline"),
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2019-02-08 19:44:03 +03:00
|
|
|
|
"lowBandwidth": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
2019-05-31 04:57:17 +03:00
|
|
|
|
displayName: _td('Low bandwidth mode'),
|
2019-02-08 19:44:03 +03:00
|
|
|
|
default: false,
|
2019-11-15 14:31:19 +03:00
|
|
|
|
controller: new ReloadOnChangeController(),
|
2019-02-08 19:44:03 +03:00
|
|
|
|
},
|
2019-08-14 16:02:25 +03:00
|
|
|
|
"fallbackICEServerAllowed": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2019-08-15 13:11:46 +03: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 16:02:25 +03:00
|
|
|
|
// This is a tri-state value, where `null` means "prompt the user".
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2019-09-28 06:08:31 +03:00
|
|
|
|
"showImages": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
displayName: _td("Show previews/thumbnails for images"),
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2019-12-06 01:31:01 +03:00
|
|
|
|
"showRightPanelInRoom": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
"showRightPanelInGroup": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
|
|
|
|
"lastRightPanelPhaseForRoom": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-09-09 13:42:41 +03:00
|
|
|
|
default: RightPanelPhases.RoomSummary,
|
2019-12-06 01:31:01 +03:00
|
|
|
|
},
|
|
|
|
|
"lastRightPanelPhaseForGroup": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-07-30 17:53:54 +03:00
|
|
|
|
default: RightPanelPhases.GroupMemberList,
|
2019-12-06 01:31:01 +03:00
|
|
|
|
},
|
2020-01-23 14:24:54 +03:00
|
|
|
|
"enableEventIndexing": {
|
2019-11-26 15:31:16 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-01-23 14:24:54 +03:00
|
|
|
|
displayName: _td("Enable message search in encrypted rooms"),
|
2019-11-26 15:31:16 +03:00
|
|
|
|
default: true,
|
2019-11-26 17:06:04 +03:00
|
|
|
|
},
|
2020-01-31 20:44:52 +03:00
|
|
|
|
"crawlerSleepTime": {
|
2020-01-30 17:18:12 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
2020-01-31 20:44:52 +03:00
|
|
|
|
displayName: _td("How fast should messages be downloaded."),
|
|
|
|
|
default: 3000,
|
2020-01-30 17:18:12 +03:00
|
|
|
|
},
|
2020-03-17 14:33:10 +03:00
|
|
|
|
"showCallButtonsInComposer": {
|
2021-02-26 23:46:39 +03:00
|
|
|
|
// Dev note: This is no longer "in composer" but is instead "in room header".
|
|
|
|
|
// TODO: Rename with settings v3
|
2020-03-17 14:33:10 +03:00
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
|
default: true,
|
2020-09-16 15:40:27 +03:00
|
|
|
|
controller: new UIFeatureController(UIFeature.Voip),
|
2020-03-17 14:33:10 +03:00
|
|
|
|
},
|
2020-03-25 21:38:12 +03:00
|
|
|
|
"e2ee.manuallyVerifyAllSessions": {
|
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
|
displayName: _td("Manually verify all remote sessions"),
|
|
|
|
|
default: false,
|
2020-09-18 20:33:02 +03: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 21:38:12 +03:00
|
|
|
|
},
|
2020-05-13 04:16:43 +03: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 21:02:02 +03:00
|
|
|
|
supportedLevels: [SettingLevel.ROOM_DEVICE, SettingLevel.DEVICE],
|
|
|
|
|
supportedLevelsAreOrdered: true,
|
2020-05-13 04:16:43 +03:00
|
|
|
|
displayName: _td("IRC display name width"),
|
|
|
|
|
default: 80,
|
|
|
|
|
},
|
2021-01-22 15:44:45 +03:00
|
|
|
|
"layout": {
|
2021-02-15 18:06:38 +03:00
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
2021-01-22 15:44:45 +03:00
|
|
|
|
default: Layout.Group,
|
2020-06-16 19:55:19 +03:00
|
|
|
|
},
|
2020-10-19 22:25:01 +03:00
|
|
|
|
"showChatEffects": {
|
2021-05-20 18:10:21 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
|
2021-02-17 20:28:23 +03:00
|
|
|
|
displayName: _td("Show chat effects (animations when receiving e.g. confetti)"),
|
2020-10-19 22:25:01 +03:00
|
|
|
|
default: true,
|
2021-02-17 20:43:31 +03:00
|
|
|
|
controller: new ReducedMotionController(),
|
2020-10-19 14:24:22 +03:00
|
|
|
|
},
|
2021-01-19 03:41:42 +03:00
|
|
|
|
"Widgets.pinned": { // deprecated
|
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
|
|
|
|
default: {},
|
|
|
|
|
},
|
|
|
|
|
"Widgets.layout": {
|
2020-09-08 10:48:03 +03:00
|
|
|
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
2020-09-08 18:27:09 +03:00
|
|
|
|
default: {},
|
2020-09-08 10:48:03 +03:00
|
|
|
|
},
|
2020-09-24 11:28:49 +03:00
|
|
|
|
"Widgets.leftPanel": {
|
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2020-10-28 04:20:25 +03:00
|
|
|
|
[UIFeature.RoomHistorySettings]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-18 20:33:02 +03:00
|
|
|
|
[UIFeature.AdvancedEncryption]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-15 07:27:40 +03:00
|
|
|
|
[UIFeature.URLPreviews]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-16 13:38:50 +03:00
|
|
|
|
[UIFeature.Widgets]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-16 15:40:27 +03:00
|
|
|
|
[UIFeature.Voip]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-16 12:59:14 +03:00
|
|
|
|
[UIFeature.Feedback]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-17 13:55:10 +03: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 18:06:17 +03:00
|
|
|
|
[UIFeature.ShareQRCode]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
|
|
|
|
[UIFeature.ShareSocial]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-16 16:45:34 +03:00
|
|
|
|
[UIFeature.IdentityServer]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
2020-09-18 13:15:48 +03:00
|
|
|
|
// Identity Server (Discovery) Settings make no sense if 3PIDs in general are hidden
|
|
|
|
|
controller: new UIFeatureController(UIFeature.ThirdPartyID),
|
2020-09-16 16:45:34 +03:00
|
|
|
|
},
|
2020-09-17 15:25:18 +03:00
|
|
|
|
[UIFeature.ThirdPartyID]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
|
|
|
|
},
|
2020-09-16 13:26:15 +03:00
|
|
|
|
[UIFeature.Flair]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
2020-09-16 14:55:04 +03:00
|
|
|
|
// Disable Flair when Communities are disabled
|
|
|
|
|
controller: new UIFeatureController(UIFeature.Communities),
|
|
|
|
|
},
|
|
|
|
|
[UIFeature.Communities]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
2021-02-19 16:50:49 +03:00
|
|
|
|
controller: new IncompatibleController("feature_spaces"),
|
2020-09-16 13:26:15 +03:00
|
|
|
|
},
|
2020-09-16 14:14:33 +03:00
|
|
|
|
[UIFeature.AdvancedSettings]: {
|
|
|
|
|
supportedLevels: LEVELS_UI_FEATURE,
|
|
|
|
|
default: true,
|
2020-08-18 10:56:38 +03:00
|
|
|
|
},
|
2017-11-06 01:37:06 +03:00
|
|
|
|
};
|