mirror of
https://github.com/exane/not-gwent-online
synced 2025-08-20 05:27:38 +00:00
redefine app structure
This commit is contained in:
site/client/app
48
site/client/app/modules/landing/components/landing.js
Normal file
48
site/client/app/modules/landing/components/landing.js
Normal file
@@ -0,0 +1,48 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/landing.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
modal: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
login: require('./login')
|
||||
},
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
openLogin: function() {
|
||||
this.modal = true;
|
||||
|
||||
setTimeout(function() {
|
||||
$('.login-username').focus();
|
||||
}, 300);
|
||||
},
|
||||
|
||||
closeLogin: function(e) {
|
||||
if(e.target.className == 'modal active') {
|
||||
this.modal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
11
site/client/app/modules/landing/components/login.js
Normal file
11
site/client/app/modules/landing/components/login.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/login.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
methods: {
|
||||
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user