mirror of
https://github.com/flarum/core.git
synced 2025-08-12 11:24:30 +02:00
Update for new extension API; implement l10n
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import Notification from 'flarum/components/notification';
|
||||
import username from 'flarum/helpers/username';
|
||||
|
||||
export default class PostLikedNotification extends Notification {
|
||||
view() {
|
||||
var notification = this.props.notification;
|
||||
var post = notification.subject();
|
||||
var auc = notification.additionalUnreadCount();
|
||||
|
||||
return super.view({
|
||||
href: app.route.post(post),
|
||||
icon: 'thumbs-o-up',
|
||||
content: [username(notification.sender()), auc ? ' and '+auc+' others' : '', ' liked your post #', post.number()]
|
||||
});
|
||||
}
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
import FormModal from 'flarum/components/form-modal';
|
||||
import avatar from 'flarum/helpers/avatar';
|
||||
import username from 'flarum/helpers/username';
|
||||
|
||||
export default class PostLikesModal extends FormModal {
|
||||
view() {
|
||||
var post = this.props.post;
|
||||
|
||||
return super.view({
|
||||
className: 'post-likes-modal',
|
||||
title: 'Users Who Like This',
|
||||
body: [
|
||||
m('ul.post-likes-list', [
|
||||
post.likes().map(user =>
|
||||
m('li', m('a', {href: app.route.user(user), config: m.route}, [
|
||||
avatar(user),
|
||||
username(user)
|
||||
]))
|
||||
)
|
||||
])
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user