DEV: Move menu-item-end PluginOutlet outside <a> tag (#25001)

This commit is contained in:
Mark VanLandingham 2023-12-21 12:39:17 -06:00 committed by GitHub
parent 2887e2c055
commit 7c7e2aeff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -25,10 +25,9 @@
{{/if}}
</div>
<PluginOutlet @name="menu-item-end" @outletArgs={{hash item=this}}>
{{#if this.endComponent}}
<this.endComponent />
{{/if}}
</PluginOutlet>
{{#if this.endComponent}}
<this.endComponent />
{{/if}}
</a>
<PluginOutlet @name="menu-item-end" @outletArgs={{this.endOutletArgs}} />
</li>

View File

@ -61,6 +61,10 @@ export default class UserMenuItem extends Component {
return this.#item.endComponent;
}
get endOutletArgs() {
return this.#item.endOutletArgs;
}
get #item() {
return this.args.item;
}

View File

@ -70,6 +70,12 @@ export default class UserMenuNotificationItem extends UserMenuBaseItem {
return this.notification.acting_user_avatar_template;
}
get endOutletArgs() {
return {
notification: this.notification,
};
}
get #notificationName() {
return this.site.notificationLookup[this.notification.notification_type];
}