1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Clean up post type heritable view arguments

This commit is contained in:
Toby Zerner
2015-05-05 17:29:43 +09:30
parent 11b39605e2
commit a822deaa98
3 changed files with 6 additions and 10 deletions

View File

@@ -4,14 +4,12 @@ import icon from 'flarum/helpers/icon';
import humanTime from 'flarum/utils/human-time';
export default class PostActivity extends Post {
view(content, attrs) {
attrs.className = 'post-activity '+(attrs.className || '');
var iconName = attrs.icon;
delete attrs.icon;
view(iconName, content, attrs) {
var post = this.props.post;
attrs = attrs || {};
attrs.className = 'post-activity post-'+post.contentType()+' '+(attrs.className || '');
return super.view([
icon(iconName+' post-icon'),
m('div.post-activity-info', [