mobile swipe support on tabs

This commit is contained in:
Daan 2020-09-16 08:41:46 +02:00
parent 970fdd3eb8
commit 1c8289df0e
3 changed files with 13 additions and 9 deletions

View file

@ -20,18 +20,19 @@
<perfect-scrollbar>
<v-tabs-items
v-model="tab"
touchless
:touch="updateTab(tab)"
:style="{ maxHeight: dialogHeight }"
>
<v-tab-item value="webui">
<WebUI :is-active="tab === 'webui'" />
<v-tab-item value="downloads">
<Downloads :is-active="tab === 'downloads'" />
</v-tab-item>
<v-tab-item value="bittorrent">
<BitTorrent :is-active="tab === 'bittorrent'" />
</v-tab-item>
<v-tab-item value="downloads">
<Downloads :is-active="tab === 'downloads'" />
<v-tab-item value="webui">
<WebUI :is-active="tab === 'webui'" />
</v-tab-item>
<v-tab-item value="vuetorrent">
<VueTorrent :is-active="tab === 'vuetorrent'" />
</v-tab-item>

View file

@ -23,19 +23,19 @@
<v-tab href="#content">Content</v-tab>
<v-tab href="#tagsAndCategories">Tags & Categories</v-tab>
</v-tabs>
<v-tabs-items v-model="tab" touchless>
<v-tabs-items v-model="tab" :touch="updateTab(tab)">
<v-tab-item value="info">
<info :is-active="tab === 'info'" :hash="hash" />
</v-tab-item>
<v-tab-item value="peers">
<Peers :is-active="tab === 'peers'" :hash="hash" />
</v-tab-item>
<v-tab-item value="trackers">
<Trackers
:is-active="tab === 'trackers'"
:hash="hash"
/>
</v-tab-item>
<v-tab-item value="peers">
<Peers :is-active="tab === 'peers'" :hash="hash" />
</v-tab-item>
<v-tab-item value="content">
<Content :is-active="tab === 'content'" :hash="hash" />
</v-tab-item>

View file

@ -15,6 +15,9 @@ export default {
methods: {
deleteModal() {
setTimeout(() => this.$store.commit('DELETE_MODAL', this.guid), 100)
},
updateTab(tab) {
this.tab = tab
}
},
beforeDestroy() {