mirror of
https://github.com/exane/not-gwent-online
synced 2025-09-02 14:07:31 +00:00
redefine app structure
This commit is contained in:
19
site/client/app/modules/inner/components/chat.js
Normal file
19
site/client/app/modules/inner/components/chat.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/chat.html'),
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
message: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
submitChat: function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
console.log(this.message);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
22
site/client/app/modules/inner/components/inner.js
Normal file
22
site/client/app/modules/inner/components/inner.js
Normal file
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/inner.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
modal: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
searchmatch: require('./search-match'),
|
||||
navigation: require('./navigation'),
|
||||
chat: require('./chat'),
|
||||
|
||||
lobby: require('./../../lobby/components/lobby'),
|
||||
deckBuilder: require('./../../deck-builder/components/deck-builder'),
|
||||
}
|
||||
|
||||
};
|
25
site/client/app/modules/inner/components/navigation.js
Normal file
25
site/client/app/modules/inner/components/navigation.js
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('../views/navigation.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
// todo: work with slug filter
|
||||
navigation: [
|
||||
{ name: 'Lobby', route: '/lobby' },
|
||||
{ name: 'Deck Builder', route: '/deck-builder' },
|
||||
{ name: 'Highscore', route: '/highscore' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
searchMatch: function() {
|
||||
this.modal = true;
|
||||
// trigger match functions
|
||||
}
|
||||
}
|
||||
|
||||
};
|
14
site/client/app/modules/inner/components/search-match.js
Normal file
14
site/client/app/modules/inner/components/search-match.js
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
|
||||
template: require('./../views/search-match.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
methods: {
|
||||
cancelMatch: function() {
|
||||
this.modal = false;
|
||||
// trigger match functions
|
||||
}
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user