2022-02-26 23:19:22 +01:00
|
|
|
<template>
|
2022-04-25 01:55:26 +02:00
|
|
|
<div class="w-full my-4">
|
2022-02-26 23:19:22 +01:00
|
|
|
<div class="w-full bg-primary px-6 py-1 flex items-center cursor-pointer" @click.stop="clickBar">
|
|
|
|
<p class="pr-4">{{ title }}</p>
|
|
|
|
<span class="bg-black-400 rounded-xl py-0.5 px-2 text-sm font-mono">{{ files.length }}</span>
|
|
|
|
<div class="flex-grow" />
|
|
|
|
<div class="cursor-pointer h-9 w-9 rounded-full hover:bg-black-400 flex justify-center items-center duration-500" :class="expand ? 'transform rotate-180' : ''">
|
|
|
|
<span class="material-icons text-3xl">expand_more</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<transition name="slide">
|
|
|
|
<div class="w-full" v-show="expand">
|
|
|
|
<table class="text-sm tracksTable">
|
2023-02-11 22:02:56 +01:00
|
|
|
<tr>
|
2022-11-08 01:27:17 +01:00
|
|
|
<th class="text-left">{{ $strings.LabelFilename }}</th>
|
|
|
|
<th class="text-left">{{ $strings.LabelSize }}</th>
|
|
|
|
<th class="text-left">{{ $strings.LabelType }}</th>
|
2022-02-26 23:19:22 +01:00
|
|
|
</tr>
|
|
|
|
<template v-for="file in files">
|
|
|
|
<tr :key="file.path">
|
2023-02-11 22:02:56 +01:00
|
|
|
<td class="pl-2">
|
2022-02-26 23:19:22 +01:00
|
|
|
{{ file.name }}
|
|
|
|
</td>
|
|
|
|
<td class="font-mono">
|
|
|
|
{{ $bytesPretty(file.size) }}
|
|
|
|
</td>
|
2023-02-11 22:02:56 +01:00
|
|
|
<td>
|
2022-02-26 23:19:22 +01:00
|
|
|
{{ file.filetype }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</template>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
title: String,
|
|
|
|
files: {
|
|
|
|
type: Array,
|
|
|
|
default: () => []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
expand: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
methods: {
|
|
|
|
clickBar() {
|
|
|
|
this.expand = !this.expand
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {}
|
|
|
|
}
|
|
|
|
</script>
|