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:
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user