mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
FIX: Correct className for notification avatars using system avatar (#25578)
This commit is contained in:
parent
090252bc39
commit
13186e6790
@ -42,11 +42,18 @@ export default class UserMenuBaseItem {
|
||||
}
|
||||
|
||||
get iconComponentArgs() {
|
||||
// Use endsWith to determine if the avatarTemplate is the system avatar, because locally the
|
||||
// system avatar is a relative path and doesn't contain hostname. Exact matches will also
|
||||
// evaluate to true.
|
||||
const usingSystemAvatar =
|
||||
!this.avatarTemplate ||
|
||||
this.avatarTemplate.endsWith(this.site.system_user_avatar_template);
|
||||
|
||||
return {
|
||||
avatarTemplate:
|
||||
this.avatarTemplate || this.site.system_user_avatar_template,
|
||||
icon: this.icon,
|
||||
classNames: this.avatarTemplate ? "user-avatar" : "system-avatar",
|
||||
classNames: usingSystemAvatar ? "system-avatar" : "user-avatar",
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user