feat(users): show scoreLevel on account detail view

This commit is contained in:
OldHawk
2017-06-12 10:40:34 +08:00
parent ca29a73b19
commit d64a7a1fdb
3 changed files with 11 additions and 3 deletions

View File

@@ -160,6 +160,13 @@ body {
}
}
.score-level {
color: #FF6600;
> kbd {
background-color: #FF6600;
}
}
.vip-flag {
color: #FF6600;
> kbd {

View File

@@ -5,11 +5,12 @@
.module('users')
.controller('StatusController', StatusController);
StatusController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', '$window'];
StatusController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', '$window', 'ScoreLevelService'];
function StatusController($scope, $state, $translate, $timeout, Authentication, $window) {
function StatusController($scope, $state, $translate, $timeout, Authentication, $window, ScoreLevelService) {
var vm = this;
vm.user = Authentication.user;
vm.scoreLevelData = ScoreLevelService.getScoreLevelJson(vm.user.score);
/**
* If user is not signed in then redirect back home

View File

@@ -34,7 +34,7 @@
<dt class="h-line">{{ 'STATUS_FIELD.SCORE' | translate}}</dt>
<dd class="h-line">
<span class="text-score">{{ vm.user.score }}</span> <a ui-sref="score.detail">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
<span class="text-score">{{ vm.user.score }}</span> <span score-level="{{vm.scoreLevelData.currLevel}}"></span> <a ui-sref="score.detail">{{ 'STATUS_FIELD.DETAIL' | translate }}</a>
</dd>
<div class="margin-top-10">