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