FEATURE: display username user dropdown

This commit is contained in:
Sam 2015-12-20 17:15:45 +11:00
parent 63076a841e
commit 8496f8dfc2
3 changed files with 17 additions and 3 deletions

View File

@ -57,8 +57,12 @@ export default Ember.Component.extend({
if (label) {
if (icon) { buffer.push(" "); }
const count = this.get('count');
buffer.push(I18n.t(label, { count }));
if (this.get('translateLabel') === "false") {
buffer.push(label);
} else {
const count = this.get('count');
buffer.push(I18n.t(label, { count }));
}
}
}

View File

@ -1,10 +1,12 @@
{{#menu-panel visible=visible}}
<div class='menu-links-header'>
<ul class='menu-links-row'>
<li>{{d-link route='user' model=currentUser class="user-activity-link" icon="user" label="user.profile"}}</li>
{{#if showDisableAnon}}
<li>{{d-link route='user' model=currentUser class="user-activity-link" icon="user" label="user.profile"}}</li>
<li>{{d-link action="toggleAnon" label="switch_from_anon"}}</li>
{{else}}
<li>{{d-link route='user' model=currentUser class="user-activity-link" icon="user" translateLabel="false" label=currentUser.username}}</li>
{{/if}}
<li class='glyphs'>
{{d-link path=bookmarksPath title="user.bookmarks" icon="bookmark"}}

View File

@ -270,6 +270,14 @@ div.menu-links-header {
a {
padding: 0.5em;
}
a.user-activity-link {
max-width: 150px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: -0.5em 0;
}
li {
display: table-cell;
width: auto;