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}} {{/if}}
</div> </div>
<PluginOutlet @name="menu-item-end" @outletArgs={{hash item=this}}> {{#if this.endComponent}}
{{#if this.endComponent}} <this.endComponent />
<this.endComponent /> {{/if}}
{{/if}}
</PluginOutlet>
</a> </a>
<PluginOutlet @name="menu-item-end" @outletArgs={{this.endOutletArgs}} />
</li> </li>

View File

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

View File

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