mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
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
26 lines
695 B
Plaintext
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;
|