diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-09-09 05:06:50 -0500 |
---|---|---|
committer | Surinna Curtis <ekiru.0@gmail.com> | 2017-09-13 21:47:30 -0500 |
commit | 0e0703dbd8c9055c4fdf93c7b29ae387043e9937 (patch) | |
tree | a90359b676b9daba47b070b597fc4ca1340e230a /app/javascript | |
parent | 7dbcc7ed3df9ed858ebdd44607d2baa0b2939b4c (diff) |
Show whether muted users' notifications are muted in account lists
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/account.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index 6456c12ba..faf697c63 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -14,6 +14,8 @@ const messages = defineMessages({ requested: { id: 'account.requested', defaultMessage: 'Awaiting approval' }, unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' }, + mute_notifications: { id: 'account.mute_notifications', defaultMessage: 'Mute notifications from @{name}' }, + unmute_notifications: { id: 'account.unmute_notifications', defaultMessage: 'Unmute notifications from @{name}' }, }); @injectIntl @@ -41,6 +43,12 @@ export default class Account extends ImmutablePureComponent { this.props.onMute(this.props.account); } + handleMuteNotifications = () => { + } + + handleUnmuteNotifications = () => { + } + render () { const { account, me, intl, hidden } = this.props; @@ -70,7 +78,22 @@ export default class Account extends ImmutablePureComponent { } else if (blocking) { buttons = <IconButton active icon='unlock-alt' title={intl.formatMessage(messages.unblock, { name: account.get('username') })} onClick={this.handleBlock} />; } else if (muting) { - buttons = <IconButton active icon='volume-up' title={intl.formatMessage(messages.unmute, { name: account.get('username') })} onClick={this.handleMute} />; + let hidingNotificationsButton; + if (muting.get('notifications')) { + hidingNotificationsButton = <IconButton active icon='bell' title={intl.formatMessage(messages.unmute_notifications, { name: account.get('username') })} onClick={this.handleUnmuteNotifications} />; + } else { +<<<<<<< HEAD + hidingNotificationsButton = <IconButton active icon='bell' title={intl.formatMessage(messages.mute_notifications, { name: account.get('username') })} onClick={this.handleMuteNotifications} /> +======= + hidingNotificationsButton = <IconButton active icon='bell-slash' title={intl.formatMessage(messages.mute_notifications, { name: account.get('username') })} onClick={this.handleMuteNotifications} />; +>>>>>>> 917b2d5f... fixup swapped icons + } + buttons = ( + <div> + <IconButton active icon='volume-up' title={intl.formatMessage(messages.unmute, { name: account.get('username') })} onClick={this.handleMute} /> + {hidingNotificationsButton} + </div> + ); } else { buttons = <IconButton icon={following ? 'user-times' : 'user-plus'} title={intl.formatMessage(following ? messages.unfollow : messages.follow)} onClick={this.handleFollow} active={following} />; } |