mirror of
https://github.com/flarum/framework.git
synced 2025-01-31 23:37:32 +08:00
Clean up post type heritable view arguments
This commit is contained in:
parent
3baa817326
commit
0e38fa0156
|
@ -4,14 +4,12 @@ import icon from 'flarum/helpers/icon';
|
||||||
import humanTime from 'flarum/utils/human-time';
|
import humanTime from 'flarum/utils/human-time';
|
||||||
|
|
||||||
export default class PostActivity extends Post {
|
export default class PostActivity extends Post {
|
||||||
view(content, attrs) {
|
view(iconName, content, attrs) {
|
||||||
attrs.className = 'post-activity '+(attrs.className || '');
|
|
||||||
|
|
||||||
var iconName = attrs.icon;
|
|
||||||
delete attrs.icon;
|
|
||||||
|
|
||||||
var post = this.props.post;
|
var post = this.props.post;
|
||||||
|
|
||||||
|
attrs = attrs || {};
|
||||||
|
attrs.className = 'post-activity post-'+post.contentType()+' '+(attrs.className || '');
|
||||||
|
|
||||||
return super.view([
|
return super.view([
|
||||||
icon(iconName+' post-icon'),
|
icon(iconName+' post-icon'),
|
||||||
m('div.post-activity-info', [
|
m('div.post-activity-info', [
|
||||||
|
|
|
@ -6,9 +6,6 @@ export default class PostDiscussionRenamed extends PostActivity {
|
||||||
var oldTitle = post.content()[0];
|
var oldTitle = post.content()[0];
|
||||||
var newTitle = post.content()[1];
|
var newTitle = post.content()[1];
|
||||||
|
|
||||||
return super.view(['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.'], {
|
return super.view('pencil', ['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.']);
|
||||||
className: 'post-discussion-renamed',
|
|
||||||
icon: 'pencil'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ class AssetManager
|
||||||
$lastModTime = max($lastModTime, filemtime($file));
|
$lastModTime = max($lastModTime, filemtime($file));
|
||||||
}
|
}
|
||||||
$debug = 0;
|
$debug = 0;
|
||||||
|
// $debug = 1;
|
||||||
|
|
||||||
if (! file_exists($file = $dir.'/'.$this->name.'-'.$revision.'.'.$type)
|
if (! file_exists($file = $dir.'/'.$this->name.'-'.$revision.'.'.$type)
|
||||||
|| filemtime($file) < $lastModTime
|
|| filemtime($file) < $lastModTime
|
||||||
|
|
Loading…
Reference in New Issue
Block a user