2021-10-23 03:08:02 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-10-28 20:27:53 +02:00
|
|
|
<app-settings-content :header-text="$strings.HeaderLibraries">
|
|
|
|
<template #header-items>
|
|
|
|
<ui-tooltip :text="$strings.LabelClickForMoreInfo" class="inline-flex ml-2">
|
|
|
|
<a href="https://www.audiobookshelf.org/guides/library_creation" target="_blank" class="inline-flex">
|
|
|
|
<span class="material-icons text-xl w-5 text-gray-200">help_outline</span>
|
|
|
|
</a>
|
|
|
|
</ui-tooltip>
|
|
|
|
|
|
|
|
<div class="flex-grow" />
|
|
|
|
|
|
|
|
<ui-btn color="primary" small @click="setShowLibraryModal()">{{ $strings.ButtonAddLibrary }}</ui-btn>
|
|
|
|
</template>
|
|
|
|
<tables-library-libraries-table @showLibraryModal="setShowLibraryModal" class="pt-2" />
|
2022-11-26 06:08:54 +01:00
|
|
|
</app-settings-content>
|
2022-05-15 00:23:22 +02:00
|
|
|
<modals-libraries-edit-modal v-model="showLibraryModal" :library="selectedLibrary" />
|
2021-10-23 03:08:02 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2023-06-16 00:41:27 +02:00
|
|
|
asyncData({ store, redirect }) {
|
|
|
|
if (!store.getters['user/getIsAdminOrUp']) {
|
|
|
|
redirect('/')
|
|
|
|
}
|
|
|
|
},
|
2021-10-23 03:08:02 +02:00
|
|
|
data() {
|
2022-05-15 00:23:22 +02:00
|
|
|
return {
|
|
|
|
showLibraryModal: false,
|
|
|
|
selectedLibrary: null
|
|
|
|
}
|
2021-10-23 03:08:02 +02:00
|
|
|
},
|
|
|
|
computed: {},
|
2022-05-15 00:23:22 +02:00
|
|
|
methods: {
|
|
|
|
setShowLibraryModal(selectedLibrary) {
|
|
|
|
this.selectedLibrary = selectedLibrary
|
|
|
|
this.showLibraryModal = true
|
|
|
|
}
|
|
|
|
},
|
2021-10-23 03:08:02 +02:00
|
|
|
mounted() {}
|
|
|
|
}
|
|
|
|
</script>
|