mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 22:53:58 +08:00
6b0aeced7e
This PR is introducing glimmer usage in the chat-live-pane, for components but also for models. RestModel usage has been dropped in favor of native classes. Other changes/additions in this PR: sticky dates, scrolling will now keep the date separator of the current section at the top of the screen better unread management, marking a channel as unread will correctly mark the correct message and not mark the whole channel as read. Tracking state will also now correctly return unread count and unread mentions. adds an animation on bottom arrow better scrolling behavior, we should now always correctly keep the scroll position while loading more reactions are now more reactive, and will update their tooltip without needed to close/reopen it skeleton has been improved with placeholder images and reactions when making a reaction on the desktop message actions, the menu won't move anymore simplify logic and stop maintaining a list of unloaded messages
143 lines
2.7 KiB
SCSS
143 lines
2.7 KiB
SCSS
.chat-composer-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 3;
|
|
background-color: var(--secondary);
|
|
|
|
#chat-full-page-uploader,
|
|
#chat-widget-uploader {
|
|
display: none;
|
|
}
|
|
|
|
.drop-a-file {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.chat-composer {
|
|
display: flex;
|
|
align-items: center;
|
|
background-color: var(--secondary);
|
|
border: 1px solid var(--primary-low-mid);
|
|
border-radius: 5px;
|
|
padding: 0.15rem 0.25rem;
|
|
margin-top: 0.5rem;
|
|
|
|
&.is-disabled {
|
|
background-color: var(--primary-low);
|
|
border: 1px solid var(--primary-low-mid);
|
|
}
|
|
|
|
.send-btn {
|
|
padding: 0.4rem 0.5rem;
|
|
border: 1px solid transparent;
|
|
border-radius: 5px;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.d-icon {
|
|
color: var(--tertiary);
|
|
}
|
|
|
|
&:disabled {
|
|
cursor: not-allowed;
|
|
|
|
.d-icon {
|
|
color: var(--primary-low);
|
|
}
|
|
}
|
|
|
|
&:not(:disabled) {
|
|
&:hover,
|
|
&:focus {
|
|
background: var(--tertiary);
|
|
.d-icon {
|
|
color: var(--secondary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__close-emoji-picker-btn {
|
|
margin-left: 0.2rem;
|
|
padding: 5px !important;
|
|
border-radius: 100%;
|
|
background: var(--primary-med-or-secondary-high);
|
|
border: 1px solid transparent;
|
|
display: flex;
|
|
|
|
.d-icon {
|
|
color: var(--secondary-very-high);
|
|
}
|
|
|
|
&:focus {
|
|
border-color: var(--tertiary);
|
|
}
|
|
|
|
.discourse-no-touch &:hover {
|
|
background: var(--primary-high);
|
|
.d-icon {
|
|
color: var(--primary-low);
|
|
}
|
|
}
|
|
}
|
|
|
|
.chat-composer-input {
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
appearance: none;
|
|
outline: none;
|
|
border: 0;
|
|
resize: none;
|
|
max-height: 125px;
|
|
scrollbar-color: var(--primary-low-mid) transparent;
|
|
transition: scrollbar-color 0.2s ease-in-out;
|
|
background: none;
|
|
margin: 0;
|
|
padding: 0.25rem 0.5rem;
|
|
text-overflow: ellipsis;
|
|
|
|
&:placeholder-shown,
|
|
&::placeholder {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
background-color: var(--primary-low-mid);
|
|
border-radius: 6px;
|
|
border: 3px solid var(--secondary);
|
|
}
|
|
&:hover {
|
|
scrollbar-color: var(--primary-low-mid) transparent;
|
|
&::-webkit-scrollbar-thumb {
|
|
background-color: var(--primary-low-mid);
|
|
}
|
|
}
|
|
&::-webkit-scrollbar {
|
|
width: 12px;
|
|
}
|
|
}
|
|
|
|
&__unreliable-network {
|
|
color: var(--danger);
|
|
padding: 0 0.5em;
|
|
}
|
|
}
|
|
|
|
.chat-composer-message-details {
|
|
padding: 0.5rem 0.75rem;
|
|
border-top: 1px solid var(--primary-low);
|
|
display: flex;
|
|
align-items: center;
|
|
@include ellipsis;
|
|
position: relative;
|
|
height: 100%;
|
|
max-height: calc(2em - 5px);
|
|
|
|
.cancel-message-action {
|
|
margin-left: auto;
|
|
}
|
|
}
|