mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 05:18:14 +08:00
Make some changes to facilitate updates to mentions extension
This commit is contained in:
parent
fa5c7cb123
commit
edddeeb553
|
@ -16,7 +16,7 @@ export default class PostPreview extends Component {
|
||||||
view() {
|
view() {
|
||||||
const post = this.props.post;
|
const post = this.props.post;
|
||||||
const user = post.user();
|
const user = post.user();
|
||||||
const excerpt = highlight(post.contentPlain(), this.props.highlight, 200);
|
const excerpt = highlight(post.contentPlain(), this.props.highlight, 300);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a className="PostPreview" href={app.route.post(post)} config={m.route} onclick={this.props.onclick}>
|
<a className="PostPreview" href={app.route.post(post)} config={m.route} onclick={this.props.onclick}>
|
||||||
|
|
|
@ -211,6 +211,7 @@ class PostStream extends mixin(Component, evented) {
|
||||||
attrs.config = fadeIn;
|
attrs.config = fadeIn;
|
||||||
attrs['data-time'] = time.toISOString();
|
attrs['data-time'] = time.toISOString();
|
||||||
attrs['data-number'] = post.number();
|
attrs['data-number'] = post.number();
|
||||||
|
attrs['data-id'] = post.id();
|
||||||
|
|
||||||
// If the post before this one was more than 4 hours ago, we will
|
// If the post before this one was more than 4 hours ago, we will
|
||||||
// display a 'time gap' indicating how long it has been in between
|
// display a 'time gap' indicating how long it has been in between
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ShowAction extends SerializeResourceAction
|
||||||
'user.groups' => true,
|
'user.groups' => true,
|
||||||
'editUser' => true,
|
'editUser' => true,
|
||||||
'hideUser' => true,
|
'hideUser' => true,
|
||||||
'discussion' => false
|
'discussion' => true
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user