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

@@ -1,19 +1,4 @@
<script type="module">
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')
</script>
<script type="module" src="assets/js/components/menu-main.js"></script>
<div class="flex justify-between space-x-4 items-center relative" id="main-menu" v-scope @vue:mounted="mounted">
<div class="mr-8 hidden lg:inline-block flex-shrink-0">
@@ -28,14 +13,14 @@
<div class="menu-item hidden sm:flex items-center text-sm font-semibold space-x-2 rounded hover:bg-gray-850 py-2 px-4 cursor-not-allowed">
<span class="iconify inline text-2xl text-gray-700" data-icon="bi:people-fill"></span>
<a class="text-gray-600 leading-none hidden lg:inline-block">Team<br>
<span class="text-xxs">(coming soon)</span>
<span class="text-xxs whitespace-no-wrap">(coming soon)</span>
</a>
</div>
<div class="menu-item hidden sm:flex items-center text-sm font-semibold space-x-2 rounded hover:bg-gray-850 py-2 px-4 cursor-not-allowed">
<span class="iconify inline text-2xl text-gray-700" data-icon="fluent:data-bar-horizontal-24-filled"></span>
<a class="text-gray-600 leading-none hidden lg:inline-block">Leaderboard<br>
<span class="text-xxs">(coming soon)</span>
<span class="text-xxs whitespace-no-wrap">(coming soon)</span>
</a>
</div>