2021-10-22 20:08:02 -05:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-10-28 13:27:53 -05: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">
|
2024-07-08 16:36:37 +00:00
|
|
|
<span class="material-symbols text-xl w-5 text-gray-200">help_outline</span>
|
2023-10-28 13:27:53 -05:00
|
|
|
</a>
|
|
|
|
</ui-tooltip>
|
|
|
|
|
2025-03-16 16:41:37 +02:00
|
|
|
<div class="grow" />
|
2023-10-28 13:27:53 -05:00
|
|
|
|
2025-03-16 16:41:37 +02:00
|
|
|
<ui-btn color="bg-primary" small @click="setShowLibraryModal()">{{ $strings.ButtonAddLibrary }}</ui-btn>
|
2023-10-28 13:27:53 -05:00
|
|
|
</template>
|
|
|
|
<tables-library-libraries-table @showLibraryModal="setShowLibraryModal" class="pt-2" />
|
2022-11-25 21:08:54 -08:00
|
|
|
</app-settings-content>
|
2022-05-14 17:23:22 -05:00
|
|
|
<modals-libraries-edit-modal v-model="showLibraryModal" :library="selectedLibrary" />
|
2021-10-22 20:08:02 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2023-06-15 17:41:27 -05:00
|
|
|
asyncData({ store, redirect }) {
|
|
|
|
if (!store.getters['user/getIsAdminOrUp']) {
|
|
|
|
redirect('/')
|
|
|
|
}
|
|
|
|
},
|
2021-10-22 20:08:02 -05:00
|
|
|
data() {
|
2022-05-14 17:23:22 -05:00
|
|
|
return {
|
|
|
|
showLibraryModal: false,
|
|
|
|
selectedLibrary: null
|
|
|
|
}
|
2021-10-22 20:08:02 -05:00
|
|
|
},
|
|
|
|
computed: {},
|
2022-05-14 17:23:22 -05:00
|
|
|
methods: {
|
|
|
|
setShowLibraryModal(selectedLibrary) {
|
|
|
|
this.selectedLibrary = selectedLibrary
|
|
|
|
this.showLibraryModal = true
|
|
|
|
}
|
|
|
|
},
|
2021-10-22 20:08:02 -05:00
|
|
|
mounted() {}
|
|
|
|
}
|
2025-03-16 16:41:37 +02:00
|
|
|
</script>
|