1
0
mirror of https://github.com/flarum/core.git synced 2025-07-16 22:31:18 +02:00
See https://github.com/flarum/core/pull/1367

* Replace gulp with webpack and npm scripts for JS compilation
* Set up Travis CI to commit compiled JS
* Restructure `js` directory; only one instance of npm, forum/admin are "submodules"
* Restructure `less` directory
This commit is contained in:
Toby Zerner
2018-06-20 13:35:14 +09:30
committed by GitHub
parent f25cf83e9b
commit 8efb08dcfa
24 changed files with 4758 additions and 399 deletions

View File

@@ -0,0 +1,31 @@
import Notification from 'flarum/components/Notification';
import username from 'flarum/helpers/username';
import punctuateSeries from 'flarum/helpers/punctuateSeries';
export default class PostLikedNotification extends Notification {
icon() {
return 'far fa-thumbs-up';
}
href() {
return app.route.post(this.props.notification.subject());
}
content() {
const notification = this.props.notification;
const user = notification.sender();
const auc = notification.additionalUnreadCount();
return app.translator.transChoice('flarum-likes.forum.notifications.post_liked_text', auc + 1, {
user,
username: auc ? punctuateSeries([
username(user),
app.translator.transChoice('flarum-likes.forum.notifications.others_text', auc, {count: auc})
]) : undefined
});
}
excerpt() {
return this.props.notification.subject().contentPlain();
}
}