1
0
mirror of https://github.com/flarum/core.git synced 2025-10-15 00:44:40 +02:00

Replace Ember app with Mithril app

This commit is contained in:
Toby Zerner
2015-04-25 22:28:39 +09:30
parent 6f67b8c247
commit b68a4711dc
377 changed files with 5641 additions and 7330 deletions

View File

@@ -0,0 +1,20 @@
import Component from 'flarum/component';
import icon from 'flarum/helpers/icon';
import humanTime from 'flarum/utils/human-time';
/**
Component for the edited pencil icon in a post header. Shows a tooltip on
hover which details who edited the post and when.
*/
export default class PostHeaderEdited extends Component {
view() {
var post = this.props.post;
var title = 'Edited '+(post.editUser() ? 'by '+post.editUser().username()+' ' : '')+humanTime(post.editTime());
return m('span.post-edited', {
title: title,
config: (element) => $(element).tooltip()
}, icon('pencil'));
}
}