mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-28 07:19:11 +08:00
- On mobile, the `navbar back-button` unread indicator now only reflects unreads from other channels, excluding the currently viewed one (addresses https://meta.discourse.org/t/notification-about-chat-messages-in-the-header/386167/8?u=chapoi) - The `scroll-to-bottom button` now displays a "N new messages" text label for unread messages in the current channel (only when the original arrow-button is rendered) - Both indicators render independently — if there are unreads in both the current and other channels, both appear - Fixed || to ?? fallback logic in ChatHeaderIconUnreadIndicator so that explicit 0 counts are respected instead of falling through to global aggregates <img width="730" height="1572" alt="CleanShot 2026-04-06 at 17 31 29@2x" src="https://github.com/user-attachments/assets/5071985d-733f-4e9b-9ff4-38e543521610" /> This means that this new indicator _within_ the current channel doesn't distinguish between unread or mention. This is an intentional simplification so it represents all new activity. --------- Co-authored-by: David Battersby <info@davidbattersby.com>
68 lines
1.2 KiB
SCSS
Vendored
68 lines
1.2 KiB
SCSS
Vendored
.chat-scroll-to-bottom {
|
|
display: flex;
|
|
justify-content: center;
|
|
position: relative;
|
|
|
|
&__button {
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-2);
|
|
position: absolute;
|
|
height: 2rem;
|
|
bottom: -25px;
|
|
padding: 0 var(--space-2);
|
|
background: var(--primary-medium);
|
|
opacity: 0;
|
|
transition:
|
|
opacity 0.25s ease,
|
|
transform 0.5s ease;
|
|
transform: scale(0.1);
|
|
z-index: z("dropdown");
|
|
color: var(--secondary);
|
|
|
|
.d-icon {
|
|
color: inherit;
|
|
}
|
|
|
|
> * {
|
|
pointer-events: none;
|
|
}
|
|
|
|
&:hover,
|
|
&:active,
|
|
&:focus {
|
|
background: none !important;
|
|
|
|
.d-icon {
|
|
color: var(--secondary) !important;
|
|
}
|
|
}
|
|
|
|
.no-touch & {
|
|
&:hover {
|
|
opacity: 1;
|
|
|
|
.d-icon {
|
|
color: var(--primary-very-high) !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.visible {
|
|
transform: translateY(-32px) scale(1);
|
|
opacity: 0.8;
|
|
|
|
&:hover {
|
|
transform: translateY(-32px) scale(1);
|
|
|
|
&:active {
|
|
transform: translateY(-32px) scale(0.8);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&__new-messages {
|
|
font-size: var(--font-down-1-rem);
|
|
}
|
|
}
|