A platform for community discussion. Free, open, simple.
FIX: chat navbar followups (#24953)
Joffrey JAFFEUX608ce620fb3b
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/header.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/header.gjsindex 24c65b4191d..9362bb8ee0b 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/header.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/header.gjs@@ -1,5 +1,6 @@import Component from "@glimmer/component";import { inject as service } from "@ember/service";+import { htmlSafe } from "@ember/template";import replaceEmoji from "discourse/helpers/replace-emoji";import i18n from "discourse-common/helpers/i18n";import I18n from "discourse-i18n";@@ -11,6 +12,16 @@ export default class ChatThreadListHeader extends Component {threadListTitle = I18n.t("chat.threads.list");+ get title() {+ let title = replaceEmoji(this.threadListTitle);++ if (this.site.mobileView) {+ title += " - " + replaceEmoji(this.args.channel.title);+ }++ return htmlSafe(title);+ }+<template><Navbar as |navbar|><navbar.BackButton@@ -19,15 +30,7 @@ export default class ChatThreadListHeader extends Component {@title={{i18n "chat.return_to_channel"}}/>- <navbar.Title- @title={{replaceEmoji this.threadListTitle}}- @icon="discourse-threads"- as |title|- >- {{#if this.site.mobileView}}- <title.SubTitle @title={{replaceEmoji @channel.title}} />- {{/if}}- </navbar.Title>+ <navbar.Title @title={{this.title}} @icon="discourse-threads" /><navbar.Actions as |action|><action.CloseThreadsButton @channel={{@channel}} />diff --git a/plugins/chat/assets/stylesheets/common/base-common.scss b/plugins/chat/assets/stylesheets/common/base-common.scssindex 8e2016f5db3..3be42a043db 100644--- a/plugins/chat/assets/stylesheets/common/base-common.scss+++ b/plugins/chat/assets/stylesheets/common/base-common.scss@@ -271,6 +271,7 @@ html.has-full-page-chat {.main-chat-outlet {min-height: 0;+ max-width: 100vw;}}}