UX: username should always be case sensitive in user card

This commit is contained in:
Régis Hanol 2015-11-23 15:57:10 +01:00
parent 753f4d1b7b
commit 72fe3e19f4
4 changed files with 3 additions and 5 deletions

View File

@ -38,7 +38,7 @@ export default Ember.Component.extend(StringBuffer, {
if (users.length) {
let postUrl;
users.forEach(function(u) {
const username = u.get('username_lower');
const username = u.get('username');
iconsHtml += `<a href="${Discourse.getURL("/users")}${username}" data-user-card="${username}">`;
if (u.post_url) {

View File

@ -2,5 +2,5 @@ export default Ember.Component.extend({
tagName: 'a',
attributeBindings: ['href', 'data-user-card'],
href: Ember.computed.alias('user.path'),
'data-user-card': Ember.computed.alias('user.username_lower')
'data-user-card': Ember.computed.alias('user.username')
});

View File

@ -9,7 +9,7 @@ export default Ember.Component.extend(StringBuffer, {
buffer.push("<div class='who-liked'>");
let iconsHtml = "";
users.forEach(function(u) {
iconsHtml += "<a href=\"" + Discourse.getURL("/users/") + u.get('username_lower') + "\" data-user-card=\"" + u.get('username_lower') + "\">";
iconsHtml += "<a href=\"" + Discourse.getURL("/users/") + u.get('username_lower') + "\" data-user-card=\"" + u.get('username') + "\">";
iconsHtml += Discourse.Utilities.avatarImg({
size: 'small',
avatarTemplate: u.get('avatar_template'),

View File

@ -9,8 +9,6 @@
<div class='user'>
{{#user-link user=au}}
{{avatar au imageSize="small"}}
{{/user-link}}
{{#user-link user=au}}
{{unbound au.username}}
{{/user-link}}
{{#if details.can_remove_allowed_users}}