This reverts commit caa29ec973
.
This commit is contained in:
parent
6a1b9a7d2c
commit
3a2319be2b
|
@ -56,7 +56,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, {
|
|||
|
||||
_hideTopicInHeader() {
|
||||
this.appEvents.trigger("header:hide-topic");
|
||||
this.header.inTopic = false;
|
||||
this.header.topic = null;
|
||||
this._lastShowTopic = false;
|
||||
},
|
||||
|
||||
|
@ -65,7 +65,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, {
|
|||
return;
|
||||
}
|
||||
this.appEvents.trigger("header:show-topic", topic);
|
||||
this.header.inTopic = true;
|
||||
this.header.topic = topic;
|
||||
this._lastShowTopic = true;
|
||||
},
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ export default class GlimmerHeader extends Component {
|
|||
</div>
|
||||
<PluginOutlet
|
||||
@name="after-header"
|
||||
@outletArgs={{hash minimized=this.header.inTopic}}
|
||||
@outletArgs={{hash minimized=(globalThis.Boolean this.header.topic)}}
|
||||
/>
|
||||
</header>
|
||||
</template>
|
||||
|
|
|
@ -8,7 +8,7 @@ export default class AuthButtons extends Component {
|
|||
|
||||
<template>
|
||||
<span class="auth-buttons">
|
||||
{{#if (and @canSignUp (not this.header.inTopic))}}
|
||||
{{#if (and @canSignUp (not this.header.topic))}}
|
||||
<DButton
|
||||
class="btn-primary btn-small sign-up-button"
|
||||
@action={{@showCreateAccount}}
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class Contents extends Component {
|
|||
@service sidebarState;
|
||||
|
||||
get topicPresent() {
|
||||
return this.header.inTopic;
|
||||
return !!this.header.topic;
|
||||
}
|
||||
|
||||
get sidebarIcon() {
|
||||
|
@ -45,7 +45,7 @@ export default class Contents extends Component {
|
|||
</PluginOutlet>
|
||||
</div>
|
||||
|
||||
{{#if this.header.inTopic}}
|
||||
{{#if this.header.topic}}
|
||||
<TopicInfo @topic={{this.header.topic}} />
|
||||
{{else if
|
||||
(and
|
||||
|
|
|
@ -10,7 +10,6 @@ import { isTesting } from "discourse-common/config/environment";
|
|||
// This route is used for retrieving a topic based on params
|
||||
export default DiscourseRoute.extend({
|
||||
composer: service(),
|
||||
header: service(),
|
||||
|
||||
// Avoid default model hook
|
||||
model(params) {
|
||||
|
@ -45,8 +44,6 @@ export default DiscourseRoute.extend({
|
|||
if (topic.isPrivateMessage && topic.suggested_topics) {
|
||||
this.pmTopicTrackingState.startTracking();
|
||||
}
|
||||
|
||||
this.header.topic = topic;
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
|
|
|
@ -7,7 +7,6 @@ export default class Header extends Service {
|
|||
@service siteSettings;
|
||||
|
||||
@tracked topic = null;
|
||||
@tracked inTopic = false;
|
||||
@tracked hamburgerVisible = false;
|
||||
@tracked userVisible = false;
|
||||
@tracked anyWidgetHeaderOverrides = false;
|
||||
|
|
Loading…
Reference in New Issue