Skip to content

A platform for community discussion. Free, open, simple.

Dev/add outlet for participant (#29864)

Amanda Alves Branquinho02ad1f9cd5d6
diff --git a/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs b/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
index c2d8c1c91dc..a7b8d707efd 100644
--- a/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
@@ -1,6 +1,8 @@
import Component from "@glimmer/component";
+import { hash } from "@ember/helper";
import { htmlSafe } from "@ember/template";
import { gt } from "truth-helpers";
+import PluginOutlet from "discourse/components/plugin-outlet";
import UserAvatarFlair from "discourse/components/user-avatar-flair";
import { userPath } from "discourse/lib/url";
import { avatarImg } from "discourse-common/lib/avatar-utils";
@@ -52,19 +54,24 @@ export default class TopicParticipant extends Component {
}
<template>
- <div class={{this.participantClasses}}>
- <a
- class={{this.linkClasses}}
- data-user-card={{@participant.username}}
- title={{@participant.username}}
- href={{this.userUrl}}
- >
- {{this.avatarImage}}
- {{#if (gt @participant.post_count 1)}}
- <span class="post-count">{{@participant.post_count}}</span>
- {{/if}}
- <UserAvatarFlair @user={{@participant}} />
- </a>
- </div>
+ <PluginOutlet
+ @name="topic-participant"
+ @outletArgs={{hash participant=@participant}}
+ >
+ <div class={{this.participantClasses}}>
+ <a
+ class={{this.linkClasses}}
+ data-user-card={{@participant.username}}
+ title={{@participant.username}}
+ href={{this.userUrl}}
+ >
+ {{this.avatarImage}}
+ {{#if (gt @participant.post_count 1)}}
+ <span class="post-count">{{@participant.post_count}}</span>
+ {{/if}}
+ <UserAvatarFlair @user={{@participant}} />
+ </a>
+ </div>
+ </PluginOutlet>
</template>
}