1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-02-24 06:40:31 +00:00

49 lines
894 B
JavaScript
Raw Normal View History

2015-06-22 11:57:22 +02:00
module.exports = {
2015-06-23 10:36:29 +02:00
template: require('./../views/landing.html'),
2015-06-22 11:57:22 +02:00
inherit: true,
2015-06-23 09:44:14 +02:00
data: function() {
return {
modal: false
}
},
components: {
2015-06-23 14:32:26 +02:00
login: require('./../../session/components/login'),
register: require('./../../session/components/register')
2015-06-23 09:44:14 +02:00
},
2015-06-22 11:57:22 +02:00
ready: function() {
setTimeout(function() {
$('.container-form-landing').addClass('active')
}, 300);
},
methods: {
asGuest: function() {
// set localstorage for guest
$('.icon-guest-load').show();
setTimeout(function() {
window.location.href = './lobby';
}, 500);
2015-06-23 09:44:14 +02:00
},
openLogin: function() {
this.modal = true;
setTimeout(function() {
$('.login-username').focus();
2015-06-23 10:16:52 +02:00
}, 300);
},
closeLogin: function(e) {
2015-06-23 10:22:35 +02:00
if(e.target.className == 'modal active') {
2015-06-23 10:16:52 +02:00
this.modal = false;
}
2015-06-22 11:57:22 +02:00
}
}
};