diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 9bd628ed15..64ee01a41c 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -664,10 +664,10 @@ module.exports = React.createClass({ }, _renderSyncedSetting: function(setting) { - const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox"); + const SettingsFlag = sdk.getComponent("elements.SettingsFlag"); return ( <div className="mx_UserSettings_toggle" key={setting.id}> - <SettingsCheckbox name={setting.id} + <SettingsFlag name={setting.id} label={setting.label} level="account" onChange={setting.fn} /> @@ -676,11 +676,11 @@ module.exports = React.createClass({ }, _renderThemeSelector: function(setting) { - const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox"); + const SettingsFlag = sdk.getComponent("elements.SettingsFlag"); const onChange = (v) => dis.dispatch({action: 'set_theme', value: setting.value}); return ( <div className="mx_UserSettings_toggle" key={setting.id + '_' + setting.value}> - <SettingsCheckbox name="theme" + <SettingsFlag name="theme" label={setting.label} level="account" onChange={onChange} @@ -756,10 +756,10 @@ module.exports = React.createClass({ }, _renderLocalSetting: function(setting) { - const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox"); + const SettingsFlag = sdk.getComponent("elements.SettingsFlag"); return ( <div className="mx_UserSettings_toggle" key={setting.id}> - <SettingsCheckbox name={setting.id} + <SettingsFlag name={setting.id} label={setting.label} level="device" onChange={setting.fn} /> diff --git a/src/components/views/elements/SettingsCheckbox.js b/src/components/views/elements/SettingsFlag.js similarity index 98% rename from src/components/views/elements/SettingsCheckbox.js rename to src/components/views/elements/SettingsFlag.js index a39b400183..59dae79e38 100644 --- a/src/components/views/elements/SettingsCheckbox.js +++ b/src/components/views/elements/SettingsFlag.js @@ -19,7 +19,7 @@ import SettingsStore from "../../../settings/SettingsStore"; import { _t } from '../../../languageHandler'; module.exports = React.createClass({ - displayName: 'SettingsCheckbox', + displayName: 'SettingsFlag', propTypes: { name: React.PropTypes.string.isRequired, level: React.PropTypes.string.isRequired, diff --git a/src/components/views/room_settings/UrlPreviewSettings.js b/src/components/views/room_settings/UrlPreviewSettings.js index cfd75537ef..580d2660d8 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.js +++ b/src/components/views/room_settings/UrlPreviewSettings.js @@ -34,7 +34,7 @@ module.exports = React.createClass({ }, render: function() { - const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox"); + const SettingsFlag = sdk.getComponent("elements.SettingsFlag"); const roomId = this.props.room.roomId; let previewsForAccount = null; @@ -53,7 +53,7 @@ module.exports = React.createClass({ if (SettingsStore.canSetValue("urlPreviewsEnabled", roomId, "room")) { previewsForRoom = ( <label> - <SettingsCheckbox name="urlPreviewsEnabled" + <SettingsFlag name="urlPreviewsEnabled" level="room" roomId={this.props.room.roomId} isExplicit={true} /> @@ -68,7 +68,7 @@ module.exports = React.createClass({ } let previewsForRoomAccount = ( - <SettingsCheckbox name="urlPreviewsEnabled" + <SettingsFlag name="urlPreviewsEnabled" level="room-account" roomId={this.props.room.roomId} />