mirror of
https://github.com/flarum/core.git
synced 2025-10-15 00:44:40 +02:00
Change notification type components to be like post types
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
import Component from 'flarum/component';
|
||||
import avatar from 'flarum/helpers/avatar';
|
||||
import icon from 'flarum/helpers/icon';
|
||||
import humanTime from 'flarum/helpers/human-time';
|
||||
|
||||
export default class Notification extends Component {
|
||||
view() {
|
||||
view(args) {
|
||||
var notification = this.props.notification;
|
||||
|
||||
return m('div.notification.notification-'+notification.contentType(), {
|
||||
classNames: !notification.isRead() ? 'unread' : '',
|
||||
onclick: this.read.bind(this)
|
||||
}, this.content());
|
||||
}
|
||||
|
||||
content() {
|
||||
//
|
||||
}, m('a', {href: args.href, config: args.config}, [
|
||||
avatar(notification.sender()),
|
||||
m('h3.notification-title', args.title),
|
||||
m('div.notification-info', [
|
||||
icon(args.icon), ' ',
|
||||
args.content, ' ',
|
||||
humanTime(notification.time())
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
read() {
|
||||
|
Reference in New Issue
Block a user