DEV: migrates reviewable-created-by to gjs (#27862)

This commit is contained in:
Joffrey JAFFEUX 2024-07-11 11:54:35 +02:00 committed by GitHub
parent 38f80be810
commit 6547f78ff8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 20 additions and 27 deletions

View File

@ -0,0 +1,15 @@
import UserLink from "discourse/components/user-link";
import avatar from "discourse/helpers/avatar";
import icon from "discourse-common/helpers/d-icon";
const ReviewableCreatedBy = <template>
<div class="created-by">
{{#if @user}}
<UserLink @user={{@user}}>{{avatar @user imageSize="large"}}</UserLink>
{{else}}
{{icon "far-trash-alt" class="deleted-user-avatar"}}
{{/if}}
</div>
</template>;
export default ReviewableCreatedBy;

View File

@ -1,10 +0,0 @@
<div class="created-by">
{{#if this.user}}
<UserLink @user={{this.user}}>{{avatar
this.user
imageSize="large"
}}</UserLink>
{{else}}
{{d-icon "far-trash-alt" class="deleted-user-avatar"}}
{{/if}}
</div>

View File

@ -1,3 +0,0 @@
import Component from "@ember/component";
export default Component.extend({});

View File

@ -4,7 +4,7 @@
</div>
<div class="post-contents-wrapper">
<ReviewableCreatedBy @user={{@reviewable.target_created_by}} @tagName="" />
<ReviewableCreatedBy @user={{@reviewable.target_created_by}} />
<div class="post-contents">
<ReviewablePostHeader
@reviewable={{@reviewable}}

View File

@ -4,10 +4,7 @@
</div>
<div class="post-contents-wrapper">
<ReviewableCreatedBy
@user={{this.reviewable.target_created_by}}
@tagName=""
/>
<ReviewableCreatedBy @user={{this.reviewable.target_created_by}} />
<div class="post-contents">
<ReviewablePostHeader
@reviewable={{this.reviewable}}

View File

@ -13,7 +13,7 @@
</ReviewableTopicLink>
<div class="post-contents-wrapper">
<ReviewableCreatedBy @user={{@reviewable.target_created_by}} @tagName="" />
<ReviewableCreatedBy @user={{@reviewable.target_created_by}} />
<div class="post-contents">
<ReviewablePostHeader

View File

@ -399,10 +399,7 @@
</span>
</div>
<div class="post-contents-wrapper">
<ReviewableCreatedBy
@user={{this.currentUser}}
@tagName=""
/>
<ReviewableCreatedBy @user={{this.currentUser}} />
<div class="post-contents">
<ReviewableCreatedByName @user={{this.currentUser}} />
<div class="post-body"><CookText

View File

@ -40,10 +40,7 @@ export default class ReviewableChatMessage extends Component {
{{/if}}
<div class="post-contents-wrapper">
<ReviewableCreatedBy
@user={{@reviewable.target_created_by}}
@tagName=""
/>
<ReviewableCreatedBy @user={{@reviewable.target_created_by}} />
<div class="post-contents">
<ReviewablePostHeader
@reviewable={{@reviewable}}