DEV: Add outlet wrapper for user card information replacement (#29523)

* DEV: Add outlet wrapper for user card information replacement

* Fix format issues

* Fix format issues
This commit is contained in:
Amanda Alves Branquinho 2024-11-05 14:03:20 -03:00 committed by GitHub
parent afdca41fd5
commit 758de8167b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 110 additions and 93 deletions

View File

@ -27,6 +27,15 @@
</div>
{{else}}
<div class="card-row first-row">
<PluginOutlet
@name="user-card-main-info"
@outletArgs={{hash
user=this.user
post=this.post
contentHidden=this.contentHidden
handleShowUser=this.handleShowUser
}}
>
<div class="user-card-avatar" aria-hidden="true">
{{#if this.contentHidden}}
<span class="card-huge-avatar">{{bound-avatar
@ -94,7 +103,9 @@
@outletArgs={{hash user=this.user showUser=this.handleShowUser}}
/>
{{#if this.nameFirst}}
<div class="names__secondary username">{{this.user.username}}</div>
<div
class="names__secondary username"
>{{this.user.username}}</div>
{{else}}
{{#if this.user.name}}
<div class="names__secondary full-name">{{this.user.name}}</div>
@ -123,6 +134,7 @@
/>
</div>
</div>
</PluginOutlet>
<ul class="usercard-controls">
{{#if this.user.can_send_private_message_to_user}}
<li class="compose-pm">
@ -378,6 +390,10 @@
{{#if this.showBadges}}
<div class="card-row">
<PluginOutlet
@name="user-card-badges"
@outletArgs={{hash user=this.user post=this.post}}
>
{{#if this.user.featured_user_badges}}
<div class="badge-section">
{{#each this.user.featured_user_badges as |ub|}}
@ -392,6 +408,7 @@
{{/if}}
</div>
{{/if}}
</PluginOutlet>
</div>
{{/if}}
{{/if}}