2021-10-16 03:31:00 +02:00
|
|
|
<template>
|
|
|
|
<div class="w-full h-full overflow-y-auto overflow-x-hidden px-4 py-6">
|
2022-04-13 15:26:43 +02:00
|
|
|
<tables-library-files-table expanded :files="libraryFiles" :library-item-id="libraryItem.id" :is-missing="isMissing" />
|
2021-10-16 03:31:00 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2022-03-11 01:45:02 +01:00
|
|
|
libraryItem: {
|
2021-10-16 03:31:00 +02:00
|
|
|
type: Object,
|
|
|
|
default: () => {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
2021-11-18 02:19:24 +01:00
|
|
|
return {
|
2022-03-11 01:45:02 +01:00
|
|
|
tracks: [],
|
2021-11-18 02:19:24 +01:00
|
|
|
showFullPath: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
2022-03-11 01:45:02 +01:00
|
|
|
libraryItem: {
|
2021-11-18 02:19:24 +01:00
|
|
|
immediate: true,
|
|
|
|
handler(newVal) {
|
|
|
|
if (newVal) this.init()
|
|
|
|
}
|
|
|
|
}
|
2021-10-16 03:31:00 +02:00
|
|
|
},
|
2021-11-18 02:19:24 +01:00
|
|
|
computed: {
|
2022-03-11 01:45:02 +01:00
|
|
|
media() {
|
|
|
|
return this.libraryItem.media || {}
|
2021-11-18 02:19:24 +01:00
|
|
|
},
|
2022-03-11 01:45:02 +01:00
|
|
|
libraryFiles() {
|
|
|
|
return this.libraryItem.libraryFiles || []
|
2021-11-18 02:19:24 +01:00
|
|
|
},
|
|
|
|
userToken() {
|
|
|
|
return this.$store.getters['user/getToken']
|
|
|
|
},
|
|
|
|
userCanUpdate() {
|
|
|
|
return this.$store.getters['user/getUserCanUpdate']
|
|
|
|
},
|
|
|
|
userCanDownload() {
|
|
|
|
return this.$store.getters['user/getUserCanDownload']
|
|
|
|
},
|
|
|
|
isMissing() {
|
2022-03-11 01:45:02 +01:00
|
|
|
return this.libraryItem.isMissing
|
2021-11-18 02:19:24 +01:00
|
|
|
},
|
|
|
|
showDownload() {
|
|
|
|
return this.userCanDownload && !this.isMissing
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init() {
|
2022-03-11 01:45:02 +01:00
|
|
|
this.tracks = this.media.tracks || []
|
2021-11-18 02:19:24 +01:00
|
|
|
}
|
|
|
|
}
|
2021-10-16 03:31:00 +02:00
|
|
|
}
|
|
|
|
</script>
|