1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-09-05 22:07:42 +00:00

choose leader view

This commit is contained in:
devfake
2015-06-25 19:07:52 +02:00
parent b460cf6cd7
commit 35a40b3624
6 changed files with 90 additions and 12 deletions

View File

@@ -10,13 +10,19 @@ module.exports = {
cards: [],
deck: [],
leaders: [],
leader: null,
allLeaders: [],
myLeaders: [],
factionFilter: 'northern_realm'
factionFilter: 'northern_realm',
modalLeader: false
}
},
components: {
showleaders: require('./show-leaders')
},
ready: function() {
this.initCards();
this.initDeck();
@@ -51,7 +57,7 @@ module.exports = {
this.cards = $.map(cards, (n) => {
if(n.type != 3) return n;
this.leaders.push(n);
this.allLeaders.push(n);
});
},
@@ -64,9 +70,12 @@ module.exports = {
}
},
// test
removeCard: function(el) {
showLeaders: function(currentLeader) {
this.myLeaders = $.map(this.allLeaders, (item) => {
if(item.faction == this.factionFilter) return item;
});
this.modalLeader = true;
}
}
};