Allow dismissing unread marker.

This commit is contained in:
Richard Lewis 2020-01-04 18:16:13 +00:00
parent b93cae2e01
commit e621e1e50f
2 changed files with 10 additions and 1 deletions

View file

@ -29,7 +29,9 @@
:key="message.id + '-unread'"
class="unread-marker"
>
<span class="unread-marker-text" />
<span class="tooltipped tooltipped-n" aria-label="Dismiss">
<span class="unread-marker-text" @click="clearUnreadMarker" />
</span>
</div>
<MessageCondensed
@ -333,6 +335,9 @@ export default {
const el = this.$refs.chat;
el.scrollTop = el.scrollHeight;
},
clearUnreadMarker() {
this.channel.firstUnread = this.channel.messages[this.channel.messages.length - 1].id;
},
},
};
</script>

View file

@ -1244,6 +1244,10 @@ textarea.input {
border-top: 1px solid var(--unread-marker-color);
}
#chat .unread-marker-text {
cursor: pointer;
}
#chat .unread-marker-text::before {
content: "New messages";
background-color: var(--window-bg-color);