mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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
|
<TopicStatus
|
||||||
@topic={{@topicInfo}}
|
@topic={{@topicInfo}}
|
||||||
@disableActions={{@disableActions}}
|
@disableActions={{@disableActions}}
|
||||||
|
@context="header"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<span class="topic">
|
<span class="topic">
|
||||||
<span class="first-line">
|
<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}}>
|
<span class="topic-title" data-topic-id={{@result.topic.id}}>
|
||||||
{{#if
|
{{#if
|
||||||
(and
|
(and
|
||||||
|
@ -17,7 +17,7 @@ const onTimestampClick = function (event) {
|
|||||||
|
|
||||||
const FeaturedTopic = <template>
|
const FeaturedTopic = <template>
|
||||||
<div data-topic-id={{@topic.id}} class="featured-topic --glimmer">
|
<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
|
<a href={{@topic.lastUnreadUrl}} class="title">{{htmlSafe
|
||||||
@topic.fancyTitle
|
@topic.fancyTitle
|
||||||
|
@ -283,7 +283,7 @@ export default class Item extends Component {
|
|||||||
@outletArgs={{hash topic=@topic}}
|
@outletArgs={{hash topic=@topic}}
|
||||||
/>
|
/>
|
||||||
{{~! no whitespace ~}}
|
{{~! no whitespace ~}}
|
||||||
<TopicStatus @topic={{@topic}} />
|
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||||
{{~! no whitespace ~}}
|
{{~! no whitespace ~}}
|
||||||
<TopicLink
|
<TopicLink
|
||||||
{{on "focus" this.onTitleFocus}}
|
{{on "focus" this.onTitleFocus}}
|
||||||
|
@ -67,7 +67,7 @@ export default class TopicCell extends Component {
|
|||||||
@outletArgs={{hash topic=@topic tagsForUser=@tagsForUser}}
|
@outletArgs={{hash topic=@topic tagsForUser=@tagsForUser}}
|
||||||
>
|
>
|
||||||
{{~! no whitespace ~}}
|
{{~! no whitespace ~}}
|
||||||
<TopicStatus @topic={{@topic}} />
|
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||||
{{~! no whitespace ~}}
|
{{~! no whitespace ~}}
|
||||||
<TopicLink
|
<TopicLink
|
||||||
{{on "focus" this.onTitleFocus}}
|
{{on "focus" this.onTitleFocus}}
|
||||||
|
@ -62,7 +62,7 @@ export default class LatestTopicListItem extends Component {
|
|||||||
|
|
||||||
<div class="main-link">
|
<div class="main-link">
|
||||||
<div class="top-row">
|
<div class="top-row">
|
||||||
<TopicStatus @topic={{@topic}} />
|
<TopicStatus @topic={{@topic}} @context="topic-list" />
|
||||||
|
|
||||||
{{topicLink @topic}}
|
{{topicLink @topic}}
|
||||||
{{~#if @topic.featured_link}}
|
{{~#if @topic.featured_link}}
|
||||||
|
@ -112,7 +112,7 @@ export default class TopicStatus extends Component {
|
|||||||
{{~#if this.site.useGlimmerTopicList~}}
|
{{~#if this.site.useGlimmerTopicList~}}
|
||||||
<PluginOutlet
|
<PluginOutlet
|
||||||
@name="after-topic-status"
|
@name="after-topic-status"
|
||||||
@outletArgs={{hash topic=@topic}}
|
@outletArgs={{hash topic=@topic context=@context}}
|
||||||
/>
|
/>
|
||||||
{{~else~}}
|
{{~else~}}
|
||||||
{{~#each TopicStatusIcons.entries as |entry|~}}
|
{{~#each TopicStatusIcons.entries as |entry|~}}
|
||||||
|
Loading…
Reference in New Issue
Block a user