mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
UX: respect prioritize_username_in_ux
setting for user avatar title
This commit is contained in:
parent
9c930c622e
commit
8e36816bde
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { get } from "@ember/object";
|
import { get } from "@ember/object";
|
||||||
import { registerUnbound } from "discourse-common/lib/helpers";
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||||
import { avatarImg, formatUsername } from "discourse/lib/utilities";
|
import { avatarImg, formatUsername } from "discourse/lib/utilities";
|
||||||
|
import { prioritizeNameInUx } from "discourse/lib/settings";
|
||||||
|
|
||||||
let _customAvatarHelpers;
|
let _customAvatarHelpers;
|
||||||
|
|
||||||
|
@ -42,7 +43,9 @@ function renderAvatar(user, options) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
let displayName = name || formatUsername(username);
|
let displayName = prioritizeNameInUx(name, this.siteSettings)
|
||||||
|
? name
|
||||||
|
: formatUsername(username);
|
||||||
|
|
||||||
let title = options.title;
|
let title = options.title;
|
||||||
if (!title && !options.ignoreTitle) {
|
if (!title && !options.ignoreTitle) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue