2021-10-15 20:31:00 -05:00
|
|
|
<template>
|
|
|
|
<div class="w-full h-full overflow-y-auto overflow-x-hidden px-4 py-6">
|
2023-04-15 18:09:49 -05:00
|
|
|
<tables-library-files-table expanded :library-item="libraryItem" :is-missing="isMissing" in-modal />
|
2021-10-15 20:31:00 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2022-03-10 18:45:02 -06:00
|
|
|
libraryItem: {
|
2021-10-15 20:31:00 -05:00
|
|
|
type: Object,
|
|
|
|
default: () => {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
2021-11-17 19:19:24 -06:00
|
|
|
return {
|
2023-11-09 16:26:49 -06:00
|
|
|
tracks: []
|
2021-11-17 19:19:24 -06:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
2022-03-10 18:45:02 -06:00
|
|
|
libraryItem: {
|
2021-11-17 19:19:24 -06:00
|
|
|
immediate: true,
|
|
|
|
handler(newVal) {
|
|
|
|
if (newVal) this.init()
|
|
|
|
}
|
|
|
|
}
|
2021-10-15 20:31:00 -05:00
|
|
|
},
|
2021-11-17 19:19:24 -06:00
|
|
|
computed: {
|
2022-03-10 18:45:02 -06:00
|
|
|
media() {
|
|
|
|
return this.libraryItem.media || {}
|
2021-11-17 19:19:24 -06: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-10 18:45:02 -06:00
|
|
|
return this.libraryItem.isMissing
|
2021-11-17 19:19:24 -06:00
|
|
|
},
|
|
|
|
showDownload() {
|
|
|
|
return this.userCanDownload && !this.isMissing
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init() {
|
2022-03-10 18:45:02 -06:00
|
|
|
this.tracks = this.media.tracks || []
|
2021-11-17 19:19:24 -06:00
|
|
|
}
|
|
|
|
}
|
2021-10-15 20:31:00 -05:00
|
|
|
}
|
|
|
|
</script>
|