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

@@ -0,0 +1,25 @@
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].type == 3) {
this.deck.$set(item, card);
}
}
this.closeLeaders('close');
}
}
};