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
@ -10,10 +10,10 @@
|
|||||||
Recent mentions
|
Recent mentions
|
||||||
<button
|
<button
|
||||||
v-if="resolvedMessages.length"
|
v-if="resolvedMessages.length"
|
||||||
class="btn hide-all-mentions"
|
class="btn dismiss-all-mentions"
|
||||||
@click="hideAllMentions()"
|
@click="dismissAllMentions()"
|
||||||
>
|
>
|
||||||
Hide all
|
Dismiss all
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="resolvedMessages.length === 0">
|
<template v-if="resolvedMessages.length === 0">
|
||||||
@ -37,11 +37,14 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<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
|
<button
|
||||||
class="msg-hide"
|
class="msg-dismiss"
|
||||||
aria-label="Hide this mention"
|
aria-label="Dismiss this mention"
|
||||||
@click="hideMention(message)"
|
@click="dismissMention(message)"
|
||||||
></button>
|
></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -102,7 +105,7 @@
|
|||||||
word-break: break-word; /* Webkit-specific */
|
word-break: break-word; /* Webkit-specific */
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentions-popup .msg-hide::before {
|
.mentions-popup .msg-dismiss::before {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -111,11 +114,11 @@
|
|||||||
content: "×";
|
content: "×";
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentions-popup .msg-hide:hover {
|
.mentions-popup .msg-dismiss:hover {
|
||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mentions-popup .hide-all-mentions {
|
.mentions-popup .dismiss-all-mentions {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
}
|
}
|
||||||
@ -191,17 +194,17 @@ export default {
|
|||||||
messageTime(time) {
|
messageTime(time) {
|
||||||
return dayjs(time).fromNow();
|
return dayjs(time).fromNow();
|
||||||
},
|
},
|
||||||
hideMention(message) {
|
dismissMention(message) {
|
||||||
this.$store.state.mentions.splice(
|
this.$store.state.mentions.splice(
|
||||||
this.$store.state.mentions.findIndex((m) => m.msgId === message.msgId),
|
this.$store.state.mentions.findIndex((m) => m.msgId === message.msgId),
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
socket.emit("mentions:hide", message.msgId);
|
socket.emit("mentions:dismiss", message.msgId);
|
||||||
},
|
},
|
||||||
hideAllMentions() {
|
dismissAllMentions() {
|
||||||
this.$store.state.mentions = [];
|
this.$store.state.mentions = [];
|
||||||
socket.emit("mentions:hide_all");
|
socket.emit("mentions:dismiss_all");
|
||||||
},
|
},
|
||||||
containerClick(event) {
|
containerClick(event) {
|
||||||
if (event.currentTarget === event.target) {
|
if (event.currentTarget === event.target) {
|
||||||
|
@ -538,7 +538,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) {
|
|||||||
socket.emit("mentions:list", client.mentions);
|
socket.emit("mentions:list", client.mentions);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("mentions:hide", (msgId) => {
|
socket.on("mentions:dismiss", (msgId) => {
|
||||||
if (typeof msgId !== "number") {
|
if (typeof msgId !== "number") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -549,7 +549,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("mentions:hide_all", () => {
|
socket.on("mentions:dismiss_all", () => {
|
||||||
client.mentions = [];
|
client.mentions = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user