mirror of
https://github.com/exane/not-gwent-online
synced 2024-10-31 10:36:53 +00:00
25 lines
493 B
JavaScript
25 lines
493 B
JavaScript
module.exports = {
|
|
|
|
template: require('./../views/show-leaders.html'),
|
|
|
|
inherit: true,
|
|
|
|
methods: {
|
|
closeLeaders(e) {
|
|
if(e == 'close' || e.target.className == 'modal active' ) {
|
|
this.modalLeader = false;
|
|
}
|
|
},
|
|
|
|
chooseLeader(card) {
|
|
// todo: make own leader variable
|
|
for(var item in this.deck) {
|
|
if(this.deck[item].card.type == 3) {
|
|
this.deck.$set(item, {card});
|
|
}
|
|
}
|
|
|
|
this.closeLeaders('close');
|
|
}
|
|
}
|
|
}; |