1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 15:07:53 +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,31 @@
import Notification from 'flarum/components/notification';
import avatar from 'flarum/helpers/avatar';
import icon from 'flarum/helpers/icon';
import username from 'flarum/helpers/username';
import humanTime from 'flarum/helpers/human-time';
export default class NotificationDiscussionRenamed extends Notification {
content() {
var notification = this.props.notification;
var discussion = notification.subject();
return m('a', {href: app.route('discussion.near', {
id: discussion.id(),
slug: discussion.slug(),
near: notification.content().number
}), config: m.route}, [
avatar(notification.sender()),
m('h3.notification-title', notification.content().oldTitle),
m('div.notification-info', [
icon('pencil'),
' Renamed by ', username(notification.sender()),
notification.additionalUnreadCount() ? ' and '+notification.additionalUnreadCount()+' others' : '',
' ', humanTime(notification.time())
])
]);
}
read() {
this.props.notification.save({isRead: true});
}
}