diff --git a/plugins/chat/assets/javascripts/discourse/components/channel-title/index.gjs b/plugins/chat/assets/javascripts/discourse/components/channel-title/index.gjs index c2339d7f052..2ae556abff1 100644 --- a/plugins/chat/assets/javascripts/discourse/components/channel-title/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/channel-title/index.gjs @@ -3,7 +3,7 @@ import ChannelIcon from "discourse/plugins/chat/discourse/components/channel-ico import ChannelName from "discourse/plugins/chat/discourse/components/channel-name"; const ChatChannelTitle = - {{#if (has-block)}} {{yield}} {{/if}} - + ; export default ChatChannelTitle; diff --git a/plugins/chat/assets/javascripts/discourse/components/thread-title/index.gjs b/plugins/chat/assets/javascripts/discourse/components/thread-title/index.gjs index 7b9213ce4de..0cd1f72ee77 100644 --- a/plugins/chat/assets/javascripts/discourse/components/thread-title/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/thread-title/index.gjs @@ -1,11 +1,14 @@ import Component from "@glimmer/component"; import { LinkTo } from "@ember/routing"; +import { service } from "@ember/service"; import { htmlSafe } from "@ember/template"; import replaceEmoji from "discourse/helpers/replace-emoji"; import { escapeExpression } from "discourse/lib/utilities"; import ThreadUnreadIndicator from "discourse/plugins/chat/discourse/components/thread-unread-indicator"; export default class ChatThreadTitle extends Component { + @service site; + get title() { if (this.args.thread.title) { return replaceEmoji(htmlSafe(escapeExpression(this.args.thread.title))); @@ -15,18 +18,24 @@ export default class ChatThreadTitle extends Component { } - - - - {{this.title}} - + + + {{#if this.site.desktopView}} + + {{this.title}} + + {{else}} + + {{this.title}} + + {{/if}} - - - + + + } diff --git a/plugins/chat/assets/javascripts/discourse/components/thread-unread-indicator/index.gjs b/plugins/chat/assets/javascripts/discourse/components/thread-unread-indicator/index.gjs index 6fe990964f3..cacd5be8e29 100644 --- a/plugins/chat/assets/javascripts/discourse/components/thread-unread-indicator/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/thread-unread-indicator/index.gjs @@ -15,11 +15,11 @@ export default class ChatThreadUnreadIndicator extends Component { {{#if this.showUnreadIndicator}} - - + + {{this.unreadCountLabel}} - - + + {{/if}} } diff --git a/plugins/chat/assets/javascripts/discourse/components/user-threads/index.gjs b/plugins/chat/assets/javascripts/discourse/components/user-threads/index.gjs index e311e2f4923..cc9ac806442 100644 --- a/plugins/chat/assets/javascripts/discourse/components/user-threads/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/user-threads/index.gjs @@ -1,5 +1,6 @@ import Component from "@glimmer/component"; import { cached } from "@glimmer/tracking"; +import { LinkTo } from "@ember/routing"; import { service } from "@ember/service"; import i18n from "discourse-common/helpers/i18n"; import { bind } from "discourse-common/utils/decorators"; @@ -97,12 +98,21 @@ export default class UserThreads extends Component { {{/if}} - - - {{#if this.site.mobileView}} - + + + + + + {{else}} + + + {{this.lastReplyDate}} - - + + {{@preview.lastReplyUser.username}} - + : {{@preview.lastReplyExcerpt}} - + } diff --git a/plugins/chat/assets/stylesheets/common/chat-user-threads.scss b/plugins/chat/assets/stylesheets/common/chat-user-threads.scss index 86061be7f54..1c81d6ac2cf 100644 --- a/plugins/chat/assets/stylesheets/common/chat-user-threads.scss +++ b/plugins/chat/assets/stylesheets/common/chat-user-threads.scss @@ -17,12 +17,19 @@ } } - .chat__thread-title__name { - font-size: var(--font-up-1-rem); - word-break: break-all; + .chat__thread-title { + &-container { + display: flex; + gap: 1rem; + } - &:hover { - color: var(--primary-very-high); + &__name { + font-size: var(--font-up-1-rem); + word-break: break-all; + + &:hover { + color: var(--primary-very-high); + } } } diff --git a/plugins/chat/assets/stylesheets/mobile/chat-user-threads.scss b/plugins/chat/assets/stylesheets/mobile/chat-user-threads.scss index 7532804052a..03e9d1a8638 100644 --- a/plugins/chat/assets/stylesheets/mobile/chat-user-threads.scss +++ b/plugins/chat/assets/stylesheets/mobile/chat-user-threads.scss @@ -1,11 +1,6 @@ .c-user-thread { - display: grid; - grid-template-areas: - "avatar category timestamp" - "avatar title indicator" - "avatar excerpt excerpt"; - grid-template-columns: auto 1fr auto; - grid-column-gap: 0.75em; + display: flex; + gap: 1rem; margin-inline: 0; padding: 0.5rem 1.5rem; @@ -20,6 +15,18 @@ } } + .c-user-thread__link { + display: grid; + grid-column-gap: 0.75em; + grid-template-columns: 1fr auto; + margin-inline: 0; + width: 100%; + grid-template-areas: + "category timestamp" + "title title" + "excerpt excerpt"; + } + .avatar-flair.--threads { position: absolute; top: -4px; @@ -33,9 +40,10 @@ } .chat__thread-title-container { - @include ellipsis; + display: flex; grid-area: title; .chat__thread-title { + @include ellipsis; &__name { @include ellipsis; }