Newer
Older
import BootstrapModal from "@/components/modals/BootstrapModal.vue";
import type { BucketOut } from "@/client/s3proxy";
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import dayjs from "dayjs";
import { filesize } from "filesize";
const props = defineProps<{
modalID: string;
bucket: BucketOut;
}>();
</script>
<template>
<bootstrap-modal
:modalID="modalID"
:static-backdrop="false"
modal-label="Bucket Detail Modal"
>
<template v-slot:header>
<h4>
Bucket Details <i>{{ props.bucket.name }}</i>
</h4>
</template>
<template v-slot:body>
<div class="container-fluid">
<table class="table table-hover table-sm table-borderless">
<tbody>
<tr>
<th scope="row" class="col-2">Name</th>
<td class="col-10">{{ props.bucket.name }}</td>
</tr>
<tr>
<th scope="row">Creation date</th>
<td>
{{
dayjs(props.bucket.created_at).format("YYYY-MM-DD HH:mm:ss")
}}
</td>
</tr>
<tr>
<th scope="row">Number of Objects</th>
<td>{{ props.bucket.num_objects }}</td>
</tr>
<tr>
<th scope="row">Size</th>
<td>{{ filesize(props.bucket.size) }}</td>
</tr>
<tr>
<th scope="row">Description</th>
<td class="text-break">{{ props.bucket.description }}</td>
</tr>
</tbody>
</table>
</div>
</template>
<template v-slot:footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Close
</button>
</template>
</bootstrap-modal>
</template>
<style scoped>
th {
font-weight: bold;
text-align: end;
}
</style>