1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: move vue components to separate js files

This commit is contained in:
Ferdinand Mütsch
2021-12-19 11:23:09 +01:00
parent ba54e7bb96
commit c217f8e664
14 changed files with 114 additions and 116 deletions

View File

@@ -0,0 +1,14 @@
PetiteVue.createApp({
$delimiters: ['${', '}'],
state: {
showDropdownResources: false,
showDropdownUser: false,
showApiKey: false
},
mounted() {
window.addEventListener('click', (e) => {
const skip = findParentAttribute(e.target, 'data-trigger-for')?.value
Object.keys(this.state).filter(k => k !== skip).forEach(k => this.state[k] = false)
})
}
}).mount('#main-menu')