highlight messages in which the user is mentioned
This commit is contained in:
parent
74cd9cd06e
commit
45537347f3
2 changed files with 7 additions and 2 deletions
|
@ -34,10 +34,11 @@
|
|||
--purple-1: hsl(280, 78%, 50%);
|
||||
--blue-1: hsl(200, 78%, 50%);
|
||||
--green-1: hsl(140, 78%, 50%);
|
||||
--yellow-1: hsl(50, 78%, 65%);
|
||||
--yellow-1: hsl(50, 78%, 50%);
|
||||
--red-1: hsl(2, 78%, 65%);
|
||||
|
||||
--purple-2: hsl(280, 78%, 45%);
|
||||
--purple-alpha-2: hsla(280, 78%, 50%, 20%);
|
||||
--blue-2: hsl(200, 78%, 45%);
|
||||
--green-2: hsl(140, 78%, 40%);
|
||||
--yellow-2: hsl(50, 78%, 60%);
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
padding: var(--space-xxs) var(--space-normplus) var(--space-xxs) var(--space-normplus);
|
||||
}
|
||||
|
||||
.message.pinged {
|
||||
background-color: var(--purple-alpha-2);
|
||||
}
|
||||
|
||||
.message .edit-message {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
@ -60,7 +64,7 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<div class="message">
|
||||
<div class="message" class:pinged={ userInfoStore.value && message.content.includes(`@${userInfoStore.value.username}`) }>
|
||||
<span class="author">{ message.author_username }</span>
|
||||
<span class="message-content" class:pending={ message._isPending }>{ message.content }</span>
|
||||
<button class="icon-button icon-button-auto edit-message" on:click="{ reply }" aria-label="Reply to Message">
|
||||
|
|
Loading…
Reference in a new issue