Private
Public Access
Composer gains an emoji picker (static curated unicode list, insert at cursor position) and messages gain Slack/Mattermost-style reactions: react with any emoji, toggle off by reacting again, see who reacted via a tooltip on each pill. Backend: MessageReaction model (unique on message_id+user_id+emoji backs toggle semantics), WS "reaction" envelope broadcasts the full recomputed reaction list per message (same approach as message edits), REST message list embeds reactions so a reload doesn't lose state that only arrived over WS. Frontend: shared EmojiPicker component (anchored popover, Escape/outside- click dismiss via new useEscapeKey hook) used by both the composer and a new hover-revealed reaction trigger on each message row.
160 lines
2.8 KiB
CSS
160 lines
2.8 KiB
CSS
.composer {
|
|
padding: var(--sp-3) var(--sp-4);
|
|
border-top: 1px solid var(--ds-border);
|
|
background: var(--ds-surface);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.composer-box {
|
|
display: flex;
|
|
gap: var(--sp-2);
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.composer-box textarea {
|
|
flex: 1;
|
|
resize: none;
|
|
background: var(--ds-surface-2);
|
|
border: 1px solid var(--ds-border);
|
|
border-radius: var(--radius);
|
|
padding: 9px 12px;
|
|
color: var(--ds-text);
|
|
font-size: 0.88rem;
|
|
outline: none;
|
|
max-height: 120px;
|
|
}
|
|
|
|
.composer-box textarea:focus {
|
|
border-color: var(--ds-accent);
|
|
}
|
|
|
|
.composer-send {
|
|
width: 36px;
|
|
height: 36px;
|
|
flex: none;
|
|
border-radius: var(--radius);
|
|
background: var(--ds-accent);
|
|
color: var(--ds-void);
|
|
border: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.composer-send:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.composer-file-input {
|
|
display: none;
|
|
}
|
|
|
|
.composer-emoji-wrap {
|
|
position: relative;
|
|
flex: none;
|
|
}
|
|
|
|
.composer-emoji-trigger {
|
|
width: 36px;
|
|
height: 36px;
|
|
flex: none;
|
|
border-radius: var(--radius);
|
|
background: transparent;
|
|
border: 1px solid var(--ds-border);
|
|
font-size: 1rem;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.composer-emoji-trigger:hover:not(:disabled) {
|
|
border-color: var(--ds-accent);
|
|
}
|
|
|
|
.composer-emoji-trigger:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.composer-attach {
|
|
width: 36px;
|
|
height: 36px;
|
|
flex: none;
|
|
border-radius: var(--radius);
|
|
background: transparent;
|
|
color: var(--ds-muted);
|
|
border: 1px solid var(--ds-border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.composer-attach:hover:not(:disabled) {
|
|
color: var(--ds-text);
|
|
border-color: var(--ds-accent);
|
|
}
|
|
|
|
.composer-attach:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.composer-spinner {
|
|
animation: composer-spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes composer-spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
.composer-attachment {
|
|
position: relative;
|
|
width: fit-content;
|
|
}
|
|
|
|
.composer-attachment-thumb {
|
|
max-height: 72px;
|
|
max-width: 140px;
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--ds-border);
|
|
display: block;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.composer-attachment-remove {
|
|
position: absolute;
|
|
top: -6px;
|
|
right: -6px;
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background: var(--ds-surface-2);
|
|
border: 1px solid var(--ds-border);
|
|
color: var(--ds-text);
|
|
font-size: 0.7rem;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.composer-status {
|
|
font-size: 0.76rem;
|
|
color: var(--ds-muted);
|
|
padding-left: 2px;
|
|
}
|
|
|
|
.composer-error {
|
|
color: var(--ds-danger, #e5484d);
|
|
}
|