mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 15:43:59 +08:00
Rename user.commentCount
This commit is contained in:
parent
e253b79fe6
commit
14508d9fcc
|
@ -26,7 +26,7 @@ Object.assign(User.prototype, {
|
|||
newNotificationsCount: Model.attribute('newNotificationsCount'),
|
||||
|
||||
discussionCount: Model.attribute('discussionCount'),
|
||||
commentsCount: Model.attribute('commentsCount'),
|
||||
commentCount: Model.attribute('commentCount'),
|
||||
|
||||
canEdit: Model.attribute('canEdit'),
|
||||
canDelete: Model.attribute('canDelete'),
|
||||
|
|
|
@ -131,7 +131,7 @@ export default class UserPage extends Page {
|
|||
items.add('posts',
|
||||
LinkButton.component({
|
||||
href: app.route('user.posts', {username: user.username()}),
|
||||
children: [app.translator.trans('core.forum.user.posts_link'), <span className="Button-badge">{user.commentsCount()}</span>],
|
||||
children: [app.translator.trans('core.forum.user.posts_link'), <span className="Button-badge">{user.commentCount()}</span>],
|
||||
icon: 'far fa-comment'
|
||||
}),
|
||||
100
|
||||
|
|
|
@ -43,7 +43,7 @@ class UserSerializer extends BasicUserSerializer
|
|||
$attributes += [
|
||||
'joinTime' => $this->formatDate($user->joined_at),
|
||||
'discussionCount' => (int) $user->discussion_count,
|
||||
'commentsCount' => (int) $user->comment_count,
|
||||
'commentCount' => (int) $user->comment_count,
|
||||
'canEdit' => $canEdit,
|
||||
'canDelete' => $gate->allows('delete', $user),
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue
Block a user