mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:50:14 +08:00
UX: show meaningful tooltip for user menu
This commit is contained in:
parent
52d0d4f5ef
commit
2f9662e562
|
@ -18,6 +18,10 @@ const HeaderController = DiscourseController.extend({
|
|||
return Discourse.User.current() && !this.get('topic.isPrivateMessage');
|
||||
}.property('topic.isPrivateMessage'),
|
||||
|
||||
userDisplayName: function() {
|
||||
return (Discourse.SiteSettings.enable_names && this.get('currentUser.name')) ? this.get('currentUser.name') : this.get('currentUser.username');
|
||||
}.property('currentUser.name', 'currentUser.username'),
|
||||
|
||||
_resetCachedNotifications: function() {
|
||||
// a bit hacky, but if we have no focus, hide notifications first
|
||||
const visible = $("#notifications-dropdown").is(":visible");
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
data-dropdown="user-dropdown"
|
||||
data-render="renderUserDropdown"
|
||||
href="#"
|
||||
title='{{i18n 'user.avatar.title'}}'
|
||||
title='{{i18n 'user.avatar.title' name=userDisplayName}}'
|
||||
id="current-user">
|
||||
{{bound-avatar currentUser "medium"}}
|
||||
</a>
|
||||
|
|
|
@ -587,7 +587,7 @@ en:
|
|||
registration_ip_address:
|
||||
title: "Registration IP Address"
|
||||
avatar:
|
||||
title: "Profile Picture"
|
||||
title: "{{name}} profile"
|
||||
title:
|
||||
title: "Title"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user