Files
David BattersbyandGitHub 3c4efba9e4 UX: chat drawer increase unread channel visibility (#28731)
This change increases the visibility of unread channels to make them stand out more in drawer mode (desktop).

When a channel is unread:

- it floats to the top;
- when multiple channels are unread, they are sorted alphabetically (equal to how it’s done on mobile)
- the unread indicator blue dot moves to directly right of the channel name
2024-09-05 13:36:50 +04:00

26 lines
695 B
Plaintext

import concatClass from "discourse/helpers/concat-class";
import ChannelIcon from "discourse/plugins/chat/discourse/components/channel-icon";
import ChannelName from "discourse/plugins/chat/discourse/components/channel-name";
const ChatChannelTitle = <template>
<div
class={{concatClass
"chat-channel-title"
(if @channel.isDirectMessageChannel "is-dm" "is-category")
}}
>
<ChannelIcon @channel={{@channel}} />
<ChannelName @channel={{@channel}} />
{{#if @isUnread}}
<div class="unread-indicator {{if @isUrgent '-urgent'}}"></div>
{{/if}}
{{#if (has-block)}}
{{yield}}
{{/if}}
</div>
</template>;
export default ChatChannelTitle;