2017-11-04 05:19:45 +00:00
|
|
|
/*
|
|
|
|
Copyright 2017 Travis Ralston
|
2019-02-22 23:57:41 +00:00
|
|
|
Copyright 2018, 2019 New Vector Ltd.
|
2020-01-15 21:13:56 +00:00
|
|
|
Copyright 2019, 2020 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-03-25 18:38:12 +00:00
|
|
|
import {MatrixClient} from 'matrix-js-sdk';
|
|
|
|
|
2017-11-04 05:19:45 +00:00
|
|
|
import {_td} from '../languageHandler';
|
2017-11-05 05:28:35 +00:00
|
|
|
import {
|
|
|
|
AudioNotificationsEnabledController,
|
|
|
|
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";
|
2019-12-06 00:47:18 +00:00
|
|
|
import {RIGHT_PANEL_PHASES} from "../stores/RightPanelStorePhases";
|
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';
|
2017-11-04 05:19:45 +00:00
|
|
|
|
|
|
|
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
|
|
|
|
const LEVELS_ROOM_SETTINGS = ['device', 'room-device', 'room-account', 'account', 'config'];
|
2019-04-19 21:31:51 +00:00
|
|
|
const LEVELS_ROOM_OR_ACCOUNT = ['room-account', 'account'];
|
2017-11-04 05:19:45 +00:00
|
|
|
const LEVELS_ROOM_SETTINGS_WITH_ROOM = ['device', 'room-device', 'room-account', 'account', 'config', 'room'];
|
|
|
|
const LEVELS_ACCOUNT_SETTINGS = ['device', 'account', 'config'];
|
|
|
|
const LEVELS_FEATURE = ['device', 'config'];
|
|
|
|
const LEVELS_DEVICE_ONLY_SETTINGS = ['device'];
|
|
|
|
const LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG = ['device', 'config'];
|
|
|
|
|
|
|
|
export const SETTINGS = {
|
|
|
|
// EXAMPLE SETTING:
|
|
|
|
// "my-setting": {
|
2017-11-04 21:44:01 +00:00
|
|
|
// // Must be set to true for features. Default is 'false'.
|
2017-11-04 05:19:45 +00:00
|
|
|
// isFeature: false,
|
|
|
|
//
|
2017-11-04 21:44:01 +00:00
|
|
|
// // Display names are strongly recommended for clarity.
|
2017-11-04 05:19:45 +00:00
|
|
|
// displayName: _td("Cool Name"),
|
|
|
|
//
|
2017-11-04 21:44:01 +00:00
|
|
|
// // Display name can also be an object for different levels.
|
|
|
|
// //displayName: {
|
|
|
|
// // "device": _td("Name for when the setting is used at 'device'"),
|
|
|
|
// // "room": _td("Name for when the setting is used at 'room'"),
|
|
|
|
// // "default": _td("The name for all other levels"),
|
|
|
|
// //}
|
|
|
|
//
|
|
|
|
// // The supported levels are required. Preferably, use the preset arrays
|
|
|
|
// // at the top of this file to define this rather than a custom array.
|
2017-11-04 05:19:45 +00:00
|
|
|
// supportedLevels: [
|
|
|
|
// // The order does not matter.
|
|
|
|
//
|
|
|
|
// "device", // Affects the current device only
|
|
|
|
// "room-device", // Affects the current room on the current device
|
|
|
|
// "room-account", // Affects the current room for the current account
|
|
|
|
// "account", // Affects the current account
|
|
|
|
// "room", // Affects the current room (controlled by room admins)
|
|
|
|
// "config", // Affects the current application
|
|
|
|
//
|
|
|
|
// // "default" is always supported and does not get listed here.
|
|
|
|
// ],
|
|
|
|
//
|
2017-11-04 21:44:01 +00:00
|
|
|
// // 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).
|
2017-11-04 05:19:45 +00:00
|
|
|
// default: {
|
|
|
|
// your: "value",
|
|
|
|
// },
|
2017-11-05 04:47:18 +00:00
|
|
|
//
|
|
|
|
// // Optional settings controller. See SettingsController for more information.
|
|
|
|
// controller: new MySettingController(),
|
2017-11-09 00:41:32 +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: false,
|
2019-01-25 03:57:40 +00:00
|
|
|
//
|
|
|
|
// // 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: "my-negative-setting",
|
2017-11-04 05:19:45 +00:00
|
|
|
// },
|
2020-04-16 09:28:07 +00:00
|
|
|
"feature_font_scaling": {
|
|
|
|
isFeature: true,
|
|
|
|
displayName: _td("Font scaling"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2020-04-16 19:47:29 +00:00
|
|
|
default: false,
|
2020-04-16 09:28:07 +00:00
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"feature_pinning": {
|
|
|
|
isFeature: true,
|
|
|
|
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
|
|
|
},
|
2018-12-18 22:11:08 +00:00
|
|
|
"feature_custom_status": {
|
|
|
|
isFeature: true,
|
|
|
|
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,
|
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,
|
|
|
|
},
|
2018-12-24 15:09:10 +00:00
|
|
|
"feature_state_counters": {
|
|
|
|
isFeature: true,
|
|
|
|
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,
|
|
|
|
displayName: _td("Multiple integration managers"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2019-10-31 19:19:54 +00:00
|
|
|
"feature_mjolnir": {
|
|
|
|
isFeature: true,
|
|
|
|
displayName: _td("Try out new ways to ignore people (experimental)"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
2020-01-03 00:40:18 +00:00
|
|
|
default: false,
|
|
|
|
},
|
2020-03-20 20:38:20 +00:00
|
|
|
"feature_new_room_list": {
|
|
|
|
isFeature: true,
|
2020-06-17 14:21:08 +00:00
|
|
|
displayName: _td("Use the improved room list (in development - will refresh to apply changes)"),
|
2020-03-20 20:38:20 +00:00
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
2020-06-17 14:21:08 +00:00
|
|
|
controller: new ReloadOnChangeController(),
|
2020-03-20 20:38:20 +00:00
|
|
|
},
|
2020-02-28 18:42:16 +00:00
|
|
|
"feature_custom_themes": {
|
|
|
|
isFeature: true,
|
|
|
|
displayName: _td("Support adding custom themes"),
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
default: false,
|
|
|
|
},
|
2020-05-07 12:55:23 +00:00
|
|
|
"feature_irc_ui": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Use IRC layout'),
|
|
|
|
default: false,
|
|
|
|
isFeature: true,
|
|
|
|
},
|
2019-10-31 19:19:54 +00:00
|
|
|
"mjolnirRooms": {
|
|
|
|
supportedLevels: ['account'],
|
|
|
|
default: [],
|
|
|
|
},
|
|
|
|
"mjolnirPersonalRoom": {
|
|
|
|
supportedLevels: ['account'],
|
|
|
|
default: null,
|
|
|
|
},
|
2019-12-09 13:28:43 +00:00
|
|
|
"feature_bridge_state": {
|
|
|
|
isFeature: true,
|
|
|
|
supportedLevels: LEVELS_FEATURE,
|
|
|
|
displayName: _td("Show info about bridges in room settings"),
|
|
|
|
default: false,
|
|
|
|
},
|
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": {
|
|
|
|
displayName: _td("Custom font size"),
|
|
|
|
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
|
|
|
},
|
|
|
|
"useCompactLayout": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Use compact timeline layout'),
|
|
|
|
default: false,
|
|
|
|
},
|
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,
|
2019-01-25 03:57:40 +00:00
|
|
|
displayName: _td('Show join/leave messages (invites/kicks/bans unaffected)'),
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
"autoplayGifsAndVideos": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Autoplay GIFs and videos'),
|
|
|
|
default: false,
|
|
|
|
},
|
2018-04-23 02:30:37 +00:00
|
|
|
"alwaysShowEncryptionIcons": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Always show encryption icons'),
|
|
|
|
default: true,
|
|
|
|
},
|
2018-12-06 21:39:59 +00:00
|
|
|
"showRoomRecoveryReminder": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Show a reminder to enable Secure Message Recovery in encrypted rooms'),
|
|
|
|
default: true,
|
|
|
|
},
|
2017-11-04 05:19:45 +00:00
|
|
|
"enableSyntaxHighlightLanguageDetection": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td('Enable automatic language detection for syntax highlighting'),
|
|
|
|
default: false,
|
|
|
|
},
|
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,
|
|
|
|
},
|
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',
|
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,
|
2019-02-13 11:51:32 +00:00
|
|
|
displayName: _td('Allow Peer-to-Peer for 1:1 calls'),
|
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": {
|
|
|
|
supportedLevels: ['account'],
|
|
|
|
default: [],
|
|
|
|
},
|
2020-03-13 00:02:50 +00:00
|
|
|
"room_directory_servers": {
|
|
|
|
supportedLevels: ['account'],
|
|
|
|
default: [],
|
|
|
|
},
|
2019-10-29 20:26:35 +00:00
|
|
|
"integrationProvisioning": {
|
2019-10-29 20:20:53 +00:00
|
|
|
supportedLevels: ['account'],
|
|
|
|
default: true,
|
|
|
|
},
|
2019-10-29 20:35:35 +00:00
|
|
|
"allowedWidgets": {
|
|
|
|
supportedLevels: ['room-account'],
|
|
|
|
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,
|
|
|
|
},
|
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.
|
|
|
|
supportedLevels: ['room-device', 'device'],
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
"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,
|
|
|
|
},
|
2018-06-22 17:44:54 +00:00
|
|
|
"urlPreviewsEnabled_e2ee": {
|
|
|
|
supportedLevels: ['room-device', 'room-account'],
|
|
|
|
displayName: {
|
|
|
|
"room-account": _td("Enable URL previews for this room (only affects you)"),
|
|
|
|
},
|
|
|
|
default: false,
|
|
|
|
},
|
2017-11-04 22:10:25 +00: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 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,
|
|
|
|
controller: new AudioNotificationsEnabledController(),
|
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,
|
|
|
|
},
|
2018-05-27 01:32:23 +00:00
|
|
|
"PinnedEvents.isOpen": {
|
|
|
|
supportedLevels: ['room-device'],
|
|
|
|
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-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
|
|
|
},
|
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,
|
|
|
|
},
|
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,
|
2019-05-31 01:57:17 +00:00
|
|
|
displayName: _td('Low bandwidth mode'),
|
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-06 02:30:19 +00:00
|
|
|
"sendReadReceipts": {
|
2019-09-06 19:02:18 +00:00
|
|
|
supportedLevels: LEVELS_ROOM_SETTINGS,
|
2019-09-06 02:30:19 +00:00
|
|
|
displayName: _td(
|
|
|
|
"Send read receipts for messages (requires compatible homeserver to disable)",
|
|
|
|
),
|
|
|
|
default: true,
|
|
|
|
},
|
2019-09-28 03:08:31 +00:00
|
|
|
"showImages": {
|
|
|
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
|
|
displayName: _td("Show previews/thumbnails for images"),
|
|
|
|
default: true,
|
|
|
|
},
|
2019-12-05 22:31:01 +00:00
|
|
|
"showRightPanelInRoom": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"showRightPanelInGroup": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
"lastRightPanelPhaseForRoom": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: RIGHT_PANEL_PHASES.RoomMemberInfo,
|
|
|
|
},
|
|
|
|
"lastRightPanelPhaseForGroup": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
default: RIGHT_PANEL_PHASES.GroupMemberList,
|
|
|
|
},
|
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": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
|
|
|
|
default: true,
|
|
|
|
},
|
2020-03-25 18:38:12 +00:00
|
|
|
"e2ee.manuallyVerifyAllSessions": {
|
|
|
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
|
|
|
displayName: _td("Manually verify all remote sessions"),
|
|
|
|
default: false,
|
|
|
|
controller: new PushToMatrixClientController(
|
|
|
|
MatrixClient.prototype.setCryptoTrustCrossSignedDevices, true,
|
|
|
|
),
|
|
|
|
},
|
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.
|
|
|
|
supportedLevels: ['room-device', 'device'],
|
|
|
|
displayName: _td("IRC display name width"),
|
|
|
|
default: 80,
|
|
|
|
},
|
2017-11-05 22:37:06 +00:00
|
|
|
};
|