mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:50:24 +08:00
Truncate notification excerpts
This commit is contained in:
parent
732432d00b
commit
72ba762fed
@ -1,4 +1,5 @@
|
||||
import Notification from 'flarum/components/Notification';
|
||||
import { truncate } from 'flarum/utils/string';
|
||||
|
||||
export default class PostLikedNotification extends Notification {
|
||||
icon() {
|
||||
@ -17,6 +18,6 @@ export default class PostLikedNotification extends Notification {
|
||||
}
|
||||
|
||||
excerpt() {
|
||||
return this.props.notification.subject().contentPlain();
|
||||
return truncate(this.props.notification.subject().contentPlain(), 200);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user