UX: improve styling of closed messages

also cleans up styling of time gaps on mobile
This commit is contained in:
Sam
2015-07-30 11:19:30 +10:00
parent 3ccae5ed32
commit ccc07605a7
4 changed files with 37 additions and 5 deletions

View File

@@ -22,8 +22,16 @@ export default Ember.Component.extend({
if (actionCode) {
const dt = new Date(this.get('post.created_at'));
const when = Discourse.Formatter.relativeAge(dt, {format: 'medium-with-ago'});
const result = I18n.t(`action_codes.${actionCode}`, {when});
return result + (this.get('post.cooked') || '');
var result = I18n.t(`action_codes.${actionCode}`, {when});
var cooked = this.get('post.cooked');
result = "<p>" + result + "</p>";
if (!Em.isEmpty(cooked)) {
result += "<div class='custom-message'>" + cooked + "</div>";
}
return result;
}
}.property('actionCode', 'post.created_at', 'post.cooked'),

View File

@@ -11,5 +11,5 @@
{{avatar post imageSize="small"}}
</a>
{{/if}}
<p>{{{description}}}</p>
{{{description}}}
</div>