turn on E2E and Scalar by default
parent
08543a66c4
commit
c322a191af
|
@ -142,7 +142,10 @@ module.exports = {
|
||||||
return MatrixClientPeg.get().setAccountData("im.vector.web.settings", settings);
|
return MatrixClientPeg.get().setAccountData("im.vector.web.settings", settings);
|
||||||
},
|
},
|
||||||
|
|
||||||
isFeatureEnabled: function(feature: string): boolean {
|
isFeatureEnabled: function(feature: string): ?boolean {
|
||||||
|
if (localStorage.getItem(`mx_labs_feature_${feature}`) === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return localStorage.getItem(`mx_labs_feature_${feature}`) === 'true';
|
return localStorage.getItem(`mx_labs_feature_${feature}`) === 'true';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -29,15 +29,18 @@ var AddThreepid = require('../../AddThreepid');
|
||||||
const LABS_FEATURES = [
|
const LABS_FEATURES = [
|
||||||
{
|
{
|
||||||
name: 'Rich Text Editor',
|
name: 'Rich Text Editor',
|
||||||
id: 'rich_text_editor'
|
id: 'rich_text_editor',
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'End-to-End Encryption',
|
name: 'End-to-End Encryption',
|
||||||
id: 'e2e_encryption'
|
id: 'e2e_encryption',
|
||||||
|
default: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Integration Management',
|
name: 'Integration Management',
|
||||||
id: 'integration_management'
|
id: 'integration_management',
|
||||||
|
default: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -382,7 +385,7 @@ module.exports = React.createClass({
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
id={feature.id}
|
id={feature.id}
|
||||||
name={feature.id}
|
name={feature.id}
|
||||||
defaultChecked={UserSettingsStore.isFeatureEnabled(feature.id)}
|
defaultChecked={UserSettingsStore.isFeatureEnabled(feature.id) === null ? feature.default : UserSettingsStore.isFeatureEnabled(feature.id)}
|
||||||
onChange={e => {
|
onChange={e => {
|
||||||
UserSettingsStore.setFeatureEnabled(feature.id, e.target.checked);
|
UserSettingsStore.setFeatureEnabled(feature.id, e.target.checked);
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|
Loading…
Reference in New Issue