feat(follow): followers and following count number in user info page

This commit is contained in:
OldHawk
2018-01-04 15:32:40 +08:00
parent 3dc0b42407
commit 2d7ef9e48b
7 changed files with 107 additions and 9 deletions

View File

@@ -75,6 +75,28 @@
pageTitle: 'EDIT_SIGNATURE'
}
})
.state('follow', {
abstract: true,
url: '/follow',
template: '<ui-view/>',
data: {
roles: ['user', 'oper', 'admin']
}
})
.state('follow.followers', {
url: '/followers',
templateUrl: '/modules/users/client/views/follow/followers.client.view.html',
data: {
pageTitle: 'PAGETITLE.MY_FOLLOWERS'
}
})
.state('follow.following', {
url: '/following',
templateUrl: '/modules/users/client/views/follow/following.client.view.html',
data: {
pageTitle: 'PAGETITLE.MY_FOLLOWING'
}
})
.state('status', {
abstract: true,
url: '/status',

View File

@@ -21,7 +21,7 @@
<div class="row margin-bottom-30">
<div class="col-md-10 col-md-offset-1 admin-user-info">
<dl class="dl-horizontal">
<dl class="dl-horizontal dl-hover">
<dt class="h-line">{{ 'STATUS_FIELD.PICTURE' | translate}}</dt>
<dd class="h-line">
<img class="status-avatar" ng-src="{{vm.user.profileImageURL}}">
@@ -172,6 +172,14 @@
<li class="status-divider"></li>
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWERS' | translate}}</dt>
<dd class="h-line">{{ vm.user.followers.length }}</dd>
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWING' | translate}}</dt>
<dd class="h-line">{{ vm.user.following.length }}</dd>
<li class="status-divider"></li>
<div ng-if="vm.announce.privateTorrentCmsMode">
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}</dt>
<dd class="h-line">

View File

@@ -12,7 +12,7 @@
<a ui-sref="status.warning">{{'WARNING_DETAIL_LINK' | translate}}</a>
</div>
<dl class="dl-horizontal">
<dl class="dl-horizontal dl-hover">
<dt class="h-line">{{ 'STATUS_FIELD.PICTURE' | translate}}</dt>
<dd class="h-line">
<img class="status-avatar" ng-src="{{vm.user.profileImageURL}}">
@@ -64,7 +64,9 @@
<div class="pull-right"
ng-if="vm.user.status == 'idle'">
<button class="btn btn-default btn-xs" ng-click="vm.unIdle(); " style="cursor: pointer">{{ 'STATUS_FIELD.ACTIVE' | translate }}</button>
<button class="btn btn-default btn-xs" ng-click="vm.unIdle(); "
style="cursor: pointer">{{ 'STATUS_FIELD.ACTIVE' | translate }}
</button>
</div>
</dd>
@@ -124,8 +126,22 @@
<span class="client-item" ng-repeat="t in vm.user.client_agent">{{t}}</span>
</div>
</dd>
<li class="status-divider"></li>
</div>
<dt class="h-line">{{ 'STATUS_FIELD.MY_FOLLOWERS' | translate}}</dt>
<dd class="h-line">{{ vm.user.followers.length }}
<a class="pull-right" ui-sref="follow.followers" ng-if="vm.user.followers.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
</dd>
<dt class="h-line">{{ 'STATUS_FIELD.MY_FOLLOWING' | translate}}</dt>
<dd class="h-line">{{ vm.user.following.length }}
<a class="pull-right" ui-sref="follow.following" ng-if="vm.user.following.length>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
</dd>
<li class="status-divider"></li>
<div ng-if="vm.announce.privateTorrentCmsMode">
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}</dt>
<dd class="h-line">
@@ -166,9 +182,9 @@
<a class="pull-right" ui-sref="status.warning" ng-if="vm.user.hnr_warning>0">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
</dd>
</div>
</div>
<li class="status-divider"></li>
<li class="status-divider"></li>
</div>
<dt class="h-line">{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}</dt>
<dd class="h-line">{{ vm.user.topics }}</a></dd>

View File

@@ -28,7 +28,7 @@
<div class="row margin-bottom-30">
<div class="col-md-10 col-md-offset-1 admin-user-info">
<dl class="dl-horizontal">
<dl class="dl-horizontal dl-hover">
<dt class="h-line">{{ 'STATUS_FIELD.PICTURE' | translate}}</dt>
<dd class="h-line">
<img class="status-avatar" ng-src="{{vm.user.profileImageURL}}">
@@ -123,6 +123,14 @@
<li class="status-divider"></li>
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWERS' | translate}}</dt>
<dd class="h-line">{{ vm.user.followers.length }}</dd>
<dt class="h-line">{{ 'STATUS_FIELD.FOLLOWING' | translate}}</dt>
<dd class="h-line">{{ vm.user.following.length }}</dd>
<li class="status-divider"></li>
<div ng-if="vm.announce.privateTorrentCmsMode">
<dt class="h-line">{{ 'STATUS_FIELD.UPLOADED' | translate}}</dt>
<dd class="h-line">