mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 09:50:37 -06:00
FIX: chat navbar followups (#24953)
- displays title on threads screen on one line instead of two on mobile - ensures chat is not overflowing the screen width
This commit is contained in:
parent
2ed59266a9
commit
608ce620fb
@ -1,5 +1,6 @@
|
|||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
|
import { htmlSafe } from "@ember/template";
|
||||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import i18n from "discourse-common/helpers/i18n";
|
||||||
import I18n from "discourse-i18n";
|
import I18n from "discourse-i18n";
|
||||||
@ -11,6 +12,16 @@ export default class ChatThreadListHeader extends Component {
|
|||||||
|
|
||||||
threadListTitle = I18n.t("chat.threads.list");
|
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>
|
<template>
|
||||||
<Navbar as |navbar|>
|
<Navbar as |navbar|>
|
||||||
<navbar.BackButton
|
<navbar.BackButton
|
||||||
@ -19,15 +30,7 @@ export default class ChatThreadListHeader extends Component {
|
|||||||
@title={{i18n "chat.return_to_channel"}}
|
@title={{i18n "chat.return_to_channel"}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<navbar.Title
|
<navbar.Title @title={{this.title}} @icon="discourse-threads" />
|
||||||
@title={{replaceEmoji this.threadListTitle}}
|
|
||||||
@icon="discourse-threads"
|
|
||||||
as |title|
|
|
||||||
>
|
|
||||||
{{#if this.site.mobileView}}
|
|
||||||
<title.SubTitle @title={{replaceEmoji @channel.title}} />
|
|
||||||
{{/if}}
|
|
||||||
</navbar.Title>
|
|
||||||
|
|
||||||
<navbar.Actions as |action|>
|
<navbar.Actions as |action|>
|
||||||
<action.CloseThreadsButton @channel={{@channel}} />
|
<action.CloseThreadsButton @channel={{@channel}} />
|
||||||
|
@ -271,6 +271,7 @@ html.has-full-page-chat {
|
|||||||
|
|
||||||
.main-chat-outlet {
|
.main-chat-outlet {
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
max-width: 100vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user