Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4159 from mstriemer/mark-as-read-button
Browse files Browse the repository at this point in the history
Include a mark as read X under the scroll to unread button
  • Loading branch information
turt2live committed Mar 5, 2020
2 parents 3527fae + df97109 commit fcc28c4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions res/css/views/rooms/_TopUnreadMessagesBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ limitations under the License.
mask-position: 9px 13px;
background: $roomtile-name-color;
}

.mx_TopUnreadMessagesBar_markAsRead {
display: block;
width: 18px;
height: 18px;
background-image: url('$(res)/img/cancel.svg');
background-position: center;
background-size: 10px;
background-repeat: no-repeat;
background-color: $primary-bg-color;
border: 1.3px solid $roomtile-name-color;
border-radius: 99px;
margin: 5px auto;
}
5 changes: 5 additions & 0 deletions src/components/views/rooms/TopUnreadMessagesBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default createReactClass({

propTypes: {
onScrollUpClick: PropTypes.func,
onCloseClick: PropTypes.func,
},

render: function() {
Expand All @@ -36,6 +37,10 @@ export default createReactClass({
title={_t('Jump to first unread message.')}
onClick={this.props.onScrollUpClick}>
</AccessibleButton>
<AccessibleButton className="mx_TopUnreadMessagesBar_markAsRead"
title={_t('Mark all as read')}
onClick={this.props.onCloseClick}>
</AccessibleButton>
</div>
);
},
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@
"Revoke invite": "Revoke invite",
"Invited by %(sender)s": "Invited by %(sender)s",
"Jump to first unread message.": "Jump to first unread message.",
"Mark all as read": "Mark all as read",
"Error updating main address": "Error updating main address",
"There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.": "There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.",
"Error creating alias": "Error creating alias",
Expand Down

0 comments on commit fcc28c4

Please sign in to comment.