From 81d29e41260b608bff545ed2283d9444ce28bbec Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 20 Dec 2017 16:19:59 +0900 Subject: Rename settingKey in setting_toggle to settingPath (#6046) --- .../notifications/components/column_settings.js | 32 +++++++++++----------- .../notifications/components/setting_toggle.js | 10 +++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.js b/app/javascript/mastodon/features/notifications/components/column_settings.js index 88a29d4d3..57cded4f1 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.js +++ b/app/javascript/mastodon/features/notifications/components/column_settings.js @@ -40,10 +40,10 @@ export default class ColumnSettings extends React.PureComponent {
- - {showPushSettings && } - - + + {showPushSettings && } + +
@@ -51,10 +51,10 @@ export default class ColumnSettings extends React.PureComponent {
- - {showPushSettings && } - - + + {showPushSettings && } + +
@@ -62,10 +62,10 @@ export default class ColumnSettings extends React.PureComponent {
- - {showPushSettings && } - - + + {showPushSettings && } + +
@@ -73,10 +73,10 @@ export default class ColumnSettings extends React.PureComponent {
- - {showPushSettings && } - - + + {showPushSettings && } + +
diff --git a/app/javascript/mastodon/features/notifications/components/setting_toggle.js b/app/javascript/mastodon/features/notifications/components/setting_toggle.js index 281359d2a..ac2211e48 100644 --- a/app/javascript/mastodon/features/notifications/components/setting_toggle.js +++ b/app/javascript/mastodon/features/notifications/components/setting_toggle.js @@ -8,23 +8,23 @@ export default class SettingToggle extends React.PureComponent { static propTypes = { prefix: PropTypes.string, settings: ImmutablePropTypes.map.isRequired, - settingKey: PropTypes.array.isRequired, + settingPath: PropTypes.array.isRequired, label: PropTypes.node.isRequired, meta: PropTypes.node, onChange: PropTypes.func.isRequired, } onChange = ({ target }) => { - this.props.onChange(this.props.settingKey, target.checked); + this.props.onChange(this.props.settingPath, target.checked); } render () { - const { prefix, settings, settingKey, label, meta } = this.props; - const id = ['setting-toggle', prefix, ...settingKey].filter(Boolean).join('-'); + const { prefix, settings, settingPath, label, meta } = this.props; + const id = ['setting-toggle', prefix, ...settingPath].filter(Boolean).join('-'); return (
- + {meta && {meta}}
-- cgit