2015-06-22 09:57:22 +00:00
|
|
|
module.exports = {
|
|
|
|
|
2015-06-23 08:36:29 +00:00
|
|
|
template: require('./../views/landing.html'),
|
2015-06-22 09:57:22 +00:00
|
|
|
|
|
|
|
inherit: true,
|
|
|
|
|
2015-06-23 07:44:14 +00:00
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
modal: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
components: {
|
2015-06-23 12:32:26 +00:00
|
|
|
login: require('./../../session/components/login'),
|
|
|
|
register: require('./../../session/components/register')
|
2015-06-23 07:44:14 +00:00
|
|
|
},
|
|
|
|
|
2015-06-22 09:57:22 +00: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 07:44:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
openLogin: function() {
|
|
|
|
this.modal = true;
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
$('.login-username').focus();
|
2015-06-23 08:16:52 +00:00
|
|
|
}, 300);
|
|
|
|
},
|
|
|
|
|
|
|
|
closeLogin: function(e) {
|
2015-06-23 08:22:35 +00:00
|
|
|
if(e.target.className == 'modal active') {
|
2015-06-23 08:16:52 +00:00
|
|
|
this.modal = false;
|
|
|
|
}
|
2015-06-22 09:57:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|