Compare commits

..

2 commits

Author SHA1 Message Date
hippoz
fd8aa70ee2
highlight messages with mentions 2023-08-09 20:44:15 +03:00
hippoz
b52a35a734
trim whitespace before sending message 2023-08-09 20:31:08 +03:00
3 changed files with 21 additions and 3 deletions

View file

@ -53,10 +53,26 @@
height: 40px; height: 40px;
} }
.message:hover, .message.pinged { .message:hover {
background-color: var(--background-color-3); background-color: var(--background-color-3);
} }
.message.pinged {
background-color: var(--purple-2-highlight);
}
.message.pinged::before {
content: "";
display: block;
position: absolute;
width: 3px;
border-radius: 2px;
top: 0;
left: 0;
bottom: 0;
background-color: var(--purple-2);
}
.message-content { .message-content {
color: var(--foreground-color-2); color: var(--foreground-color-2);
white-space: pre-wrap; white-space: pre-wrap;

View file

@ -98,9 +98,9 @@
const sendMessage = async () => { const sendMessage = async () => {
messageTextarea.focus(); messageTextarea.focus();
const content = messageInput; const content = messageInput.trim();
if (content.trim() === "" || !userInfoStore.value) if (!content.length || !userInfoStore.value)
return; return;
// optimistically add message to store // optimistically add message to store

View file

@ -66,6 +66,8 @@
--yellow-2: hsl(50, 78%, 60%); --yellow-2: hsl(50, 78%, 60%);
--red-2: hsl(2, 78%, 60%); --red-2: hsl(2, 78%, 60%);
--purple-2-highlight: hsla(266, 62%, 58%, 0.1);
--space-unit: 1em; --space-unit: 1em;
--space-xxs: calc(0.25 * var(--space-unit)); --space-xxs: calc(0.25 * var(--space-unit));