2019-12-23 20:49:21 +00:00
|
|
|
<template>
|
|
|
|
<Modal @close="$emit('close')">
|
|
|
|
<template #body>
|
|
|
|
<img
|
|
|
|
class="img-fluid rounded mx-auto d-block mb-3 w-100"
|
2019-12-24 12:17:22 +00:00
|
|
|
:src="`${baseUrl}/1/images/${file}`"
|
2019-12-23 20:49:21 +00:00
|
|
|
alt="Image not available."
|
|
|
|
id="lightbox-image"
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
<template #buttons>
|
|
|
|
<button type="button" class="btn btn-secondary" @click="$emit('close')">Cancel</button>
|
|
|
|
</template>
|
|
|
|
</Modal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Modal from '@/components/Modal';
|
2019-12-24 12:17:22 +00:00
|
|
|
import config from '../config';
|
2019-12-23 20:49:21 +00:00
|
|
|
|
|
|
|
export default {
|
2023-11-27 00:14:52 +00:00
|
|
|
name: 'Lightbox',
|
|
|
|
components: {Modal},
|
|
|
|
props: ['file'],
|
|
|
|
data: () => ({
|
|
|
|
baseUrl: config.service.url,
|
|
|
|
}),
|
2019-12-23 20:49:21 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2023-11-27 00:14:52 +00:00
|
|
|
#lightbox-image {
|
2019-12-23 20:49:21 +00:00
|
|
|
max-height: 75vh;
|
|
|
|
object-fit: contain;
|
2023-11-27 00:14:52 +00:00
|
|
|
}
|
2019-12-23 20:49:21 +00:00
|
|
|
</style>
|