mirror of
https://github.com/flarum/core.git
synced 2025-08-02 22:47:33 +02:00
Add excerpt for user mentioned notification
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import Notification from 'flarum/components/Notification';
|
import Notification from 'flarum/components/Notification';
|
||||||
import username from 'flarum/helpers/username';
|
import username from 'flarum/helpers/username';
|
||||||
import punctuate from 'flarum/helpers/punctuate';
|
import punctuate from 'flarum/helpers/punctuate';
|
||||||
import { truncate } from 'flarum/utils/string';
|
|
||||||
|
|
||||||
export default class PostMentionedNotification extends Notification {
|
export default class PostMentionedNotification extends Notification {
|
||||||
icon() {
|
icon() {
|
||||||
@@ -32,6 +31,6 @@ export default class PostMentionedNotification extends Notification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
excerpt() {
|
excerpt() {
|
||||||
return truncate(this.props.notification.subject().contentPlain(), 100);
|
return this.props.notification.subject().contentPlain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import Notification from 'flarum/components/Notification';
|
import Notification from 'flarum/components/Notification';
|
||||||
import username from 'flarum/helpers/username';
|
|
||||||
|
|
||||||
export default class UserMentionedNotification extends Notification {
|
export default class UserMentionedNotification extends Notification {
|
||||||
icon() {
|
icon() {
|
||||||
@@ -17,4 +16,8 @@ export default class UserMentionedNotification extends Notification {
|
|||||||
|
|
||||||
return app.trans('mentions.user_mentioned_notification', {user});
|
return app.trans('mentions.user_mentioned_notification', {user});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
excerpt() {
|
||||||
|
return this.props.notification.subject().contentPlain();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user