mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
DEV: Add a context
arg to after-topic-status outlet (#30940)
…so that plugins/themes can conditionally conditionally display their topic-status icon (e.g. just on the topic list, or everywhere but the header)
This commit is contained in:
parent
daab816a37
commit
474bfb5757
@ -108,6 +108,7 @@ export default class Info extends Component {
|
||||
<TopicStatus
|
||||
@topic={{@topicInfo}}
|
||||
@disableActions={{@disableActions}}
|
||||
@context="header"
|
||||
/>
|
||||
|
||||
<a
|
||||
|
@ -1,6 +1,10 @@
|
||||
<span class="topic">
|
||||
<span class="first-line">
|
||||
<TopicStatus @topic={{@result.topic}} @disableActions={{true}} />
|
||||
<TopicStatus
|
||||
@topic={{@result.topic}}
|
||||
@disableActions={{true}}
|
||||
@context="topic-view-title"
|
||||
/>
|
||||
<span class="topic-title" data-topic-id={{@result.topic.id}}>
|
||||
{{#if
|
||||
(and
|
||||
|
@ -17,7 +17,7 @@ const onTimestampClick = function (event) {
|
||||
|
||||
const FeaturedTopic = <template>
|
||||
<div data-topic-id={{@topic.id}} class="featured-topic --glimmer">
|
||||
<TopicStatus @topic={{@topic}} />
|
||||
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||
|
||||
<a href={{@topic.lastUnreadUrl}} class="title">{{htmlSafe
|
||||
@topic.fancyTitle
|
||||
|
@ -283,7 +283,7 @@ export default class Item extends Component {
|
||||
@outletArgs={{hash topic=@topic}}
|
||||
/>
|
||||
{{~! no whitespace ~}}
|
||||
<TopicStatus @topic={{@topic}} />
|
||||
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||
{{~! no whitespace ~}}
|
||||
<TopicLink
|
||||
{{on "focus" this.onTitleFocus}}
|
||||
|
@ -67,7 +67,7 @@ export default class TopicCell extends Component {
|
||||
@outletArgs={{hash topic=@topic tagsForUser=@tagsForUser}}
|
||||
>
|
||||
{{~! no whitespace ~}}
|
||||
<TopicStatus @topic={{@topic}} />
|
||||
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||
{{~! no whitespace ~}}
|
||||
<TopicLink
|
||||
{{on "focus" this.onTitleFocus}}
|
||||
|
@ -62,7 +62,7 @@ export default class LatestTopicListItem extends Component {
|
||||
|
||||
<div class="main-link">
|
||||
<div class="top-row">
|
||||
<TopicStatus @topic={{@topic}} />
|
||||
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||
|
||||
{{topicLink @topic}}
|
||||
{{~#if @topic.featured_link}}
|
||||
|
@ -112,7 +112,7 @@ export default class TopicStatus extends Component {
|
||||
{{~#if this.site.useGlimmerTopicList~}}
|
||||
<PluginOutlet
|
||||
@name="after-topic-status"
|
||||
@outletArgs={{hash topic=@topic}}
|
||||
@outletArgs={{hash topic=@topic context=@context}}
|
||||
/>
|
||||
{{~else~}}
|
||||
{{~#each TopicStatusIcons.entries as |entry|~}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user