mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +00:00
client/Mentions: change button copy to "Dismiss all" (#4322)
* client/Mentions: change button copy to "Dismiss all" * s/hide/dismiss/g
This commit is contained in:
parent
1d33e0195a
commit
2693db4274
2 changed files with 19 additions and 16 deletions
|
@ -10,10 +10,10 @@
|
|||
Recent mentions
|
||||
<button
|
||||
v-if="resolvedMessages.length"
|
||||
class="btn hide-all-mentions"
|
||||
@click="hideAllMentions()"
|
||||
class="btn dismiss-all-mentions"
|
||||
@click="dismissAllMentions()"
|
||||
>
|
||||
Hide all
|
||||
Dismiss all
|
||||
</button>
|
||||
</div>
|
||||
<template v-if="resolvedMessages.length === 0">
|
||||
|
@ -37,11 +37,14 @@
|
|||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="close-tooltip tooltipped tooltipped-w" aria-label="Close">
|
||||
<span
|
||||
class="close-tooltip tooltipped tooltipped-w"
|
||||
aria-label="Dismiss this mention"
|
||||
>
|
||||
<button
|
||||
class="msg-hide"
|
||||
aria-label="Hide this mention"
|
||||
@click="hideMention(message)"
|
||||
class="msg-dismiss"
|
||||
aria-label="Dismiss this mention"
|
||||
@click="dismissMention(message)"
|
||||
></button>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -102,7 +105,7 @@
|
|||
word-break: break-word; /* Webkit-specific */
|
||||
}
|
||||
|
||||
.mentions-popup .msg-hide::before {
|
||||
.mentions-popup .msg-dismiss::before {
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
|
@ -111,11 +114,11 @@
|
|||
content: "×";
|
||||
}
|
||||
|
||||
.mentions-popup .msg-hide:hover {
|
||||
.mentions-popup .msg-dismiss:hover {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.mentions-popup .hide-all-mentions {
|
||||
.mentions-popup .dismiss-all-mentions {
|
||||
margin: 0;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
|
@ -191,17 +194,17 @@ export default {
|
|||
messageTime(time) {
|
||||
return dayjs(time).fromNow();
|
||||
},
|
||||
hideMention(message) {
|
||||
dismissMention(message) {
|
||||
this.$store.state.mentions.splice(
|
||||
this.$store.state.mentions.findIndex((m) => m.msgId === message.msgId),
|
||||
1
|
||||
);
|
||||
|
||||
socket.emit("mentions:hide", message.msgId);
|
||||
socket.emit("mentions:dismiss", message.msgId);
|
||||
},
|
||||
hideAllMentions() {
|
||||
dismissAllMentions() {
|
||||
this.$store.state.mentions = [];
|
||||
socket.emit("mentions:hide_all");
|
||||
socket.emit("mentions:dismiss_all");
|
||||
},
|
||||
containerClick(event) {
|
||||
if (event.currentTarget === event.target) {
|
||||
|
|
|
@ -538,7 +538,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) {
|
|||
socket.emit("mentions:list", client.mentions);
|
||||
});
|
||||
|
||||
socket.on("mentions:hide", (msgId) => {
|
||||
socket.on("mentions:dismiss", (msgId) => {
|
||||
if (typeof msgId !== "number") {
|
||||
return;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) {
|
|||
);
|
||||
});
|
||||
|
||||
socket.on("mentions:hide_all", () => {
|
||||
socket.on("mentions:dismiss_all", () => {
|
||||
client.mentions = [];
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue