mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-06-20 18:12:19 +02:00
fix(users): first sign in, level show error
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
vm.authentication = Authentication;
|
||||
vm.isCollapsed = false;
|
||||
vm.menu = menuService.getMenu('topbar');
|
||||
vm.scoreLevelData = ScoreLevelService.getScoreLevelJson(vm.user.score);
|
||||
vm.scoreLevelData = vm.user ? ScoreLevelService.getScoreLevelJson(vm.user.score) : undefined;
|
||||
|
||||
$scope.$on('$stateChangeSuccess', stateChangeSuccess);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
function link(scope, element, attrs) {
|
||||
scope.$watch(attrs.scoreLevel, function (level) {
|
||||
var l = 'L' + level;
|
||||
var l = 'L' + (level ? level : 0);
|
||||
l = '<kbd>' + l + '</kbd>';
|
||||
|
||||
element.addClass('score-level');
|
||||
|
||||
@@ -179,7 +179,7 @@ body {
|
||||
|
||||
.menu-score {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
right: 10px;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
.controller('ScoreController', ScoreController);
|
||||
|
||||
ScoreController.$inject = ['$scope', '$state', '$translate', '$timeout', 'Authentication', '$window', 'ScoreLevelService', 'getStorageLangService',
|
||||
'MeanTorrentConfig'];
|
||||
'MeanTorrentConfig'];
|
||||
|
||||
function ScoreController($scope, $state, $translate, $timeout, Authentication, $window, ScoreLevelService, getStorageLangService, MeanTorrentConfig) {
|
||||
var vm = this;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
1. User score level calculation formula is: `sqrt(score number / 500)`.
|
||||
1. Level`1` score is: `500`.
|
||||
1. Level`2` score is: `200`.
|
||||
1. Level`2` score is: `2000`.
|
||||
1. Level`3` score is: `4500`.
|
||||
1. Level`4` score is: `8000`.
|
||||
1. Level`x` score is: `x * x * 500`.
|
||||
|
||||
Reference in New Issue
Block a user