diff --git a/client/components/modals/EditModal.vue b/client/components/modals/EditModal.vue index 441d115a..0079f457 100644 --- a/client/components/modals/EditModal.vue +++ b/client/components/modals/EditModal.vue @@ -6,10 +6,9 @@
-
Details
-
Cover
-
Match
-
Tracks
+
@@ -26,7 +25,34 @@ export default { selectedTab: 'details', processing: false, audiobook: null, - fetchOnShow: false + fetchOnShow: false, + tabs: [ + { + id: 'details', + title: 'Details', + component: 'modals-edit-tabs-details' + }, + { + id: 'cover', + title: 'Cover', + component: 'modals-edit-tabs-cover' + }, + { + id: 'match', + title: 'Match', + component: 'modals-edit-tabs-match' + }, + { + id: 'tracks', + title: 'Tracks', + component: 'modals-edit-tabs-tracks' + }, + { + id: 'download', + title: 'Download', + component: 'modals-edit-tabs-download' + } + ] } }, watch: { @@ -54,11 +80,8 @@ export default { } }, tabName() { - if (this.selectedTab === 'details') return 'modals-edit-tabs-details' - else if (this.selectedTab === 'cover') return 'modals-edit-tabs-cover' - else if (this.selectedTab === 'match') return 'modals-edit-tabs-match' - else if (this.selectedTab === 'tracks') return 'modals-edit-tabs-tracks' - return '' + var _tab = this.tabs.find((t) => t.id === this.selectedTab) + return _tab ? _tab.component : '' }, selectedAudiobook() { return this.$store.state.selectedAudiobook || {} diff --git a/client/components/modals/edit-tabs/Download.vue b/client/components/modals/edit-tabs/Download.vue new file mode 100644 index 00000000..50c0346a --- /dev/null +++ b/client/components/modals/edit-tabs/Download.vue @@ -0,0 +1,154 @@ + + + \ No newline at end of file diff --git a/client/components/ui/Btn.vue b/client/components/ui/Btn.vue index 501b13f7..734e0d76 100644 --- a/client/components/ui/Btn.vue +++ b/client/components/ui/Btn.vue @@ -1,5 +1,5 @@