1
0
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:
Toby Zerner
2015-07-22 10:15:08 +09:30
parent fb9ed378e0
commit 9c384bee98
30 changed files with 690 additions and 340 deletions

View File

@@ -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()]
});
}
}

View File

@@ -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)
]))
)
])
]
});
}
}