DEV: migrates groups-info to gjs (#27832)

Co-authored-by: Jarek Radosz <jarek@cvx.dev>
This commit is contained in:
Joffrey JAFFEUX 2024-07-10 16:14:04 +02:00 committed by GitHub
parent 52ea5c7eb0
commit 89bcf955c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 17 deletions

View File

@ -0,0 +1,11 @@
import { or } from "truth-helpers";
const GroupsInfo = <template>
<span class="group-info-details">
<span class="groups-info-name">
{{or @group.full_name @group.displayName}}
</span>
</span>
</template>;
export default GroupsInfo;

View File

@ -1,5 +0,0 @@
{{#if this.showFullName}}
<span class="groups-info-name">{{this.group.full_name}}</span>
{{else}}
<span class="groups-info-name">{{this.group.displayName}}</span>
{{/if}}

View File

@ -1,12 +0,0 @@
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
export default Component.extend({
tagName: "span",
classNames: ["group-info-details"],
@discourseComputed("group.full_name")
showFullName(fullName) {
return fullName && fullName.length;
},
});