Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit b0e4311

Browse files
committed
Merge pull request #60 from appirio-tech/tom-cloak
Tom cloak
2 parents f0eef85 + 2840851 commit b0e4311

File tree

6 files changed

+33
-5
lines changed

6 files changed

+33
-5
lines changed

app/profile/develop/develop.controller.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
vm.domain = CONSTANTS.domain;
1414
vm.challenges = [];
1515
vm.profile = {};
16+
vm.loading = true;
1617

1718
activate();
1819

@@ -28,6 +29,9 @@
2829
vm.challenges = data;
2930
});
3031
});
32+
if (vm.altResolve) {
33+
vm.deferred.resolve(vm);
34+
}
3135
}
3236

3337
}

app/profile/develop/develop.jade

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.profile-develop-container
1+
.profile-develop-container(ng-hide='vm.loading', ng-cloak)
22
hr
33
h1.type Develop: {{vm.subTrack}}
44
hr
@@ -33,6 +33,9 @@
3333
challenge-tile(challenge="challenge", domain="vm.domain")
3434

3535
.stats(ng-show="vm.viewing == 'stats'")
36+
.graphs
37+
img(src="images/rating-graphs.png")
38+
3639
h2.detailed Detailed Stats
3740

3841
ul.vertical-stats

app/profile/profile.controller.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
vm.title = "Profile";
1313
vm.message = "Message"
1414
vm.profile = {};
15+
vm.loading = true;
1516
vm.userHandle = userHandle;
1617

1718
activate(vms);
@@ -42,12 +43,24 @@
4243
// until horizontal scroll is implemented
4344
vm.skills = skills.skills;
4445
vm.categories = ProfileService.getRanks(vm.stats);
46+
vm.loading = false;
4547
});
4648
});
4749
}
4850

49-
$scope.initProfile = function(vm) {
50-
vms.push(vm);
51+
$scope.initProfile = function(newVm) {
52+
if (!vm.stats) {
53+
vms.push(newVm);
54+
} else {
55+
newVm.profile = vm.profile;
56+
newVm.stats = vm.stats;
57+
newVm.numProjects = vm.numProjects;
58+
newVm.numWins = vm.numWins;
59+
newVm.skills = vm.skills;
60+
newVm.categories = vm.categories;
61+
newVm.altResolve = true;
62+
newVm.loading = false;
63+
}
5164
}
5265

5366
}

app/profile/profile.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.profile-header-container
1+
.profile-header-container(ng-hide="vm.loading", ng-cloak)
22
.left
33
profile-widget(profile="vm.profile", edit-profile-link="vm.showEditProfileLink")
44
.right
55
h4 member for {{vm.tenure}} years
66

7-
ui-view
7+
ui-view(ng-hide="vm.loading", ng-cloak)

assets/css/profile/develop.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
font-size: 18px;
77
}
88
.stats {
9+
.graphs {
10+
display: flex;
11+
flex-direction: row;
12+
justify-content: center;
13+
img {
14+
width: 700px;
15+
}
16+
}
917
h2.detailed {
1018
margin: 50px auto 25px auto;
1119
text-align: center;

assets/images/rating-graphs.png

103 KB
Loading

0 commit comments

Comments
 (0)