mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 07:42:48 +08:00
Clean up post type heritable view arguments
This commit is contained in:
parent
11b39605e2
commit
a822deaa98
|
@ -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', [
|
||||
|
|
|
@ -6,9 +6,6 @@ export default class PostDiscussionRenamed extends PostActivity {
|
|||
var oldTitle = post.content()[0];
|
||||
var newTitle = post.content()[1];
|
||||
|
||||
return super.view(['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.'], {
|
||||
className: 'post-discussion-renamed',
|
||||
icon: 'pencil'
|
||||
});
|
||||
return super.view('pencil', ['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ class AssetManager
|
|||
$lastModTime = max($lastModTime, filemtime($file));
|
||||
}
|
||||
$debug = 0;
|
||||
// $debug = 1;
|
||||
|
||||
if (! file_exists($file = $dir.'/'.$this->name.'-'.$revision.'.'.$type)
|
||||
|| filemtime($file) < $lastModTime
|
||||
|
|
Loading…
Reference in New Issue
Block a user