mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 11:38:24 +00:00
#2010 Add party stats back in. Depends on habirpg-shared#939ce14 to wrap members
This commit is contained in:
parent
20e659aa43
commit
154abcefbb
3 changed files with 11 additions and 9 deletions
|
|
@ -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];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"}')
|
||||
|
|
|
|||
Loading…
Reference in a new issue