FIX: time read on users directory was not rendering correctly on mobile

This commit is contained in:
Neil Lalonde 2018-01-29 13:31:06 -05:00
parent 51e327f640
commit fcc86d5be3
4 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
export default Ember.Component.extend({
classNames: ['user-stat'],
type: 'number',
isNumber: Ember.computed.equal('type', 'number')
isNumber: Ember.computed.equal('type', 'number'),
isDuration: Ember.computed.equal('type', 'duration')
});

View File

@ -1,6 +1,8 @@
<span class='value'>
{{#if isNumber}}
{{number value}}
{{else if isDuration}}
{{format-duration value}}
{{else}}
{{value}}
{{/if}}

View File

@ -7,5 +7,5 @@
{{user-stat value=item.posts_read label="directory.posts_read"}}
{{user-stat value=item.days_visited label="directory.days_visited"}}
{{#if showTimeRead}}
<div class='time-read'>{{unbound item.time_read}}</div>
{{user-stat value=item.time_read label="directory.time_read" type="duration"}}
{{/if}}

View File

@ -32,6 +32,9 @@
font-size: $font-up-3;
color: $primary-medium;
}
.time-read {
white-space: nowrap;
}
}
tr.me {
@ -39,7 +42,7 @@
background-color: dark-light-choose($highlight-low, $highlight-medium);
.username a, .name, .title, .number, .time-read {
color: $primary-medium;
color: $primary-medium;
}
}
}