mirror of
https://github.com/flarum/core.git
synced 2025-07-16 22:31:18 +02:00
Webpack (#15)
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:
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user