mirror of
https://github.com/flarum/core.git
synced 2025-10-14 16:34:26 +02:00
Replace Ember app with Mithril app
This commit is contained in:
20
js/forum/src/components/notification.js
Normal file
20
js/forum/src/components/notification.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import Component from 'flarum/component';
|
||||
|
||||
export default class Notification extends Component {
|
||||
view() {
|
||||
var notification = this.props.notification;
|
||||
|
||||
return m('div.notification', {
|
||||
classNames: !notification.isRead ? 'unread' : '',
|
||||
onclick: this.read.bind(this)
|
||||
}, this.content());
|
||||
}
|
||||
|
||||
content() {
|
||||
//
|
||||
}
|
||||
|
||||
read() {
|
||||
this.props.notification.save({isRead: true});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user