Merge pull request #3513 from techAPJ/patch-3

UX: show meaningful tooltip for user menu
This commit is contained in:
Sam 2015-06-01 16:55:59 +10:00
commit 9910dc041f
3 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,10 @@ const HeaderController = DiscourseController.extend({
return Discourse.User.current() && !this.get('topic.isPrivateMessage'); return Discourse.User.current() && !this.get('topic.isPrivateMessage');
}.property('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() { _resetCachedNotifications: function() {
// a bit hacky, but if we have no focus, hide notifications first // a bit hacky, but if we have no focus, hide notifications first
const visible = $("#notifications-dropdown").is(":visible"); const visible = $("#notifications-dropdown").is(":visible");

View File

@ -68,7 +68,7 @@
data-dropdown="user-dropdown" data-dropdown="user-dropdown"
data-render="renderUserDropdown" data-render="renderUserDropdown"
href="#" href="#"
title='{{i18n 'user.avatar.title'}}' title='{{i18n 'user.avatar.title' name=userDisplayName}}'
id="current-user"> id="current-user">
{{bound-avatar currentUser "medium"}} {{bound-avatar currentUser "medium"}}
</a> </a>

View File

@ -587,7 +587,7 @@ en:
registration_ip_address: registration_ip_address:
title: "Registration IP Address" title: "Registration IP Address"
avatar: avatar:
title: "Profile Picture" title: "{{name}} profile"
title: title:
title: "Title" title: "Title"