FIX: Correct pm icon link in glimmer header (#26125)

This commit is contained in:
David Taylor 2024-03-11 12:56:03 +00:00 committed by GitHub
parent 296af7310a
commit f52dafe3cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { fn, hash } from "@ember/helper"; import { hash } from "@ember/helper";
import { on } from "@ember/modifier"; import { on } from "@ember/modifier";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
@ -62,6 +62,10 @@ export default class Info extends Component {
return participants.slice(0, this.maxExtraItems); return participants.slice(0, this.maxExtraItems);
} }
get pmHref() {
return this.currentUser.pmPath(this.args.topic);
}
@action @action
jumpToTopPost(e) { jumpToTopPost(e) {
e.preventDefault(); e.preventDefault();
@ -82,7 +86,7 @@ export default class Info extends Component {
{{#if this.showPM}} {{#if this.showPM}}
<a <a
class="private-message-glyph-wrapper" class="private-message-glyph-wrapper"
href={{fn this.currentUser.pmPath @topic}} href={{this.pmHref}}
aria-label={{i18n "user.messages.inbox"}} aria-label={{i18n "user.messages.inbox"}}
> >
{{icon "envelope" class="private-message-glyph"}} {{icon "envelope" class="private-message-glyph"}}