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">
|
2023-04-16 01:09:49 +02:00
|
|
|
<tables-library-files-table expanded :library-item="libraryItem" :is-missing="isMissing" in-modal />
|
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 {
|
2023-11-09 23:26:49 +01:00
|
|
|
tracks: []
|
2021-11-18 02:19:24 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
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
|
|
|
},
|
|
|
|
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>
|