#2010 Add party stats back in. Depends on habirpg-shared#939ce14 to wrap members

This commit is contained in:
Tyler Renelle 2014-01-06 23:00:16 -07:00
parent 20e659aa43
commit 154abcefbb
3 changed files with 11 additions and 9 deletions

View file

@ -65,10 +65,12 @@ angular.module('memberServices', ['ngResource']).
// and then for guild)
// and if not, fetch them
if (members[uid] && members[uid].items && members[uid].items.weapon) {
$rootScope.Shared.wrap(members[uid],false);
self.selectedMember = members[uid];
} else {
Member.get({uid: uid}, function(member){
self.populate(member); // lazy load for later
$rootScope.Shared.wrap(member,false);
self.selectedMember = members[member._id];
});
}

View file

@ -15,8 +15,7 @@ div(ng-controller='MemberModalCtrl')
li(ng-show='profile.auth.timestamps.loggedin') - Last logged in {{timestamp(profile.auth.timestamps.loggedin)}} -
h3 Stats
.label.label-info {{profile.stats.class}}
p.alert.alert-info Coming back soon!
//-include ../profiles/stats
include ../profiles/stats
.span6
include ../header/avatar
h3 Achievements

View file

@ -1,10 +1,3 @@
h4.stats-equipment Equipment
table.table.table-striped
tr(ng-repeat='(k,v) in user.items.gear.equipped', ng-init='piece=Content.gear.flat[v]', ng-show='piece')
td
strong {{piece.text}}: 
span(ng-repeat='stat in ["str","con","per","int"]', ng-show='piece[stat]') {{piece[stat]}} {{stat.toUpperCase()}} 
h4 Stats
table.table.table-striped
tr
@ -24,6 +17,14 @@ table.table.table-striped
strong Experience
| : {{profile.stats.exp | number:0}} / {{Shared.tnl(profile.stats.lvl)}}
h4.stats-equipment Equipment
table.table.table-striped
// FIXME this isn't refreshing properly. On first party modal, correct. Second party modal click gives the previous gear. It's always one behind.
tr(ng-repeat='(k,v) in profile.items.gear.equipped', ng-init='piece=Content.gear.flat[v]', ng-show='piece')
td
strong {{piece.text}}: 
span(ng-repeat='stat in ["str","con","per","int"]', ng-show='piece[stat]') {{piece[stat]}} {{stat.toUpperCase()}} 
h4 Attributes
table.table.table-striped
tr(ng-repeat='(k,v) in {str:"Strength",int:"Intelligence",con:"Constitution",per:"Perception"}')