This commit is contained in:
2025-03-13 22:08:06 +01:00
commit bab5571428
93 changed files with 4323 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<template>
<v-list-item
style="background-color: #434343"
@click.stop="downloadClicked"
:title="file.rel_name"
:subtitle="fs_format(file.size)"
>
<template v-slot:prepend>
<v-btn @click.stop="downloadClicked" :disabled="!is_download_finished" icon="mdi-download" color="green" variant="text"/>
<v-dialog v-if="file.is_stream_video" v-model="video_modal" width="75%" height="100%">
<template v-slot:activator="{ props }">
<v-btn v-bind="props" icon="mdi-play" variant="text"/>
</template>
<v-card>
<VideoPlayer class="text-center"/>
</v-card>
</v-dialog>
</template>
</v-list-item>
</template>
<script setup>
import {fs_format} from "@/plugins/utils.js";
import VideoPlayer from "@/components/utils/VideoPlayer.vue";
</script>
<script>
export default {
props: {
file: {
required: true,
type: Object,
},
is_download_finished: {
required: true,
type: Boolean,
}
},
data(){
return {
video_modal: false,
}
},
methods: {
downloadClicked(){
if(!this.is_download_finished) return;
let a = document.createElement("a");
a.href = this.file.download_url;
a.setAttribute("download", "download");
a.click();
}
}
}
</script>