,
+ ));
+ tabs.push(new Tab(
+ _td("Visit old settings"),
+ "mx_UserSettingsDialog_helpIcon",
+ ,
+ ));
+
+ return tabs;
}
render() {
diff --git a/src/components/views/settings/tabs/LabsSettingsTab.js b/src/components/views/settings/tabs/LabsSettingsTab.js
new file mode 100644
index 0000000000..5cda8f6cd6
--- /dev/null
+++ b/src/components/views/settings/tabs/LabsSettingsTab.js
@@ -0,0 +1,69 @@
+/*
+Copyright 2019 New Vector Ltd
+
+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.
+*/
+
+import React from 'react';
+import {_t} from "../../../../languageHandler";
+import PropTypes from "prop-types";
+import SettingsStore from "../../../../settings/SettingsStore";
+import ToggleSwitch from "../../elements/ToggleSwitch";
+
+export class LabsSettingToggle extends React.Component {
+ static propTypes = {
+ featureId: PropTypes.string.isRequired,
+ };
+
+ _onChange = async (checked) => {
+ if (this.props.featureId === "feature_lazyloading") {
+ const confirmed = await this._onLazyLoadChanging(checked);
+ if (!confirmed) {
+ return;
+ }
+ }
+
+ await SettingsStore.setFeatureEnabled(this.props.featureId, checked);
+ this.forceUpdate();
+ };
+
+ render() {
+ // This is a minimal version of a SettingsFlag
+ const label = _t(SettingsStore.getDisplayName(this.props.featureId));
+ const value = SettingsStore.isFeatureEnabled(this.props.featureId);
+ return (
+
+ );
+ }
+}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index b9b4684e08..b2dbb5387b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -439,6 +439,7 @@
"Deactivating your account is a permanent action - be careful!": "Deactivating your account is a permanent action - be careful!",
"Close Account": "Close Account",
"General": "General",
+ "Labs": "Labs",
"Cannot add any more widgets": "Cannot add any more widgets",
"The maximum permitted number of widgets have already been added to this room.": "The maximum permitted number of widgets have already been added to this room.",
"Add a widget": "Add a widget",
@@ -1281,7 +1282,6 @@
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
"Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.": "Privacy is important to us, so we don't collect any personal or identifiable data for our analytics.",
"Learn more about how we use analytics.": "Learn more about how we use analytics.",
- "Labs": "Labs",
"These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
"Use with caution": "Use with caution",
"Lazy loading members not supported": "Lazy loading members not supported",