2023-09-28 11:27:45 +02:00
|
|
|
<script setup>
|
|
|
|
const { notify } = useNotification()
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
modelValue: Boolean,
|
|
|
|
closable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
2024-11-07 16:12:07 +01:00
|
|
|
isFullHeight: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
2023-09-28 11:27:45 +02:00
|
|
|
})
|
|
|
|
|
2023-10-19 11:53:13 +02:00
|
|
|
const emit = defineEmits(['update:modelValue'])
|
2023-09-28 11:27:45 +02:00
|
|
|
|
|
|
|
const isActive = computed({
|
|
|
|
get() {
|
|
|
|
return props.modelValue
|
|
|
|
},
|
|
|
|
set(value) {
|
2023-10-19 11:53:13 +02:00
|
|
|
emit('update:modelValue', value)
|
2023-09-28 11:27:45 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
function closeModal(event) {
|
2023-11-10 13:42:42 +01:00
|
|
|
notify({ clean: true })
|
|
|
|
isActive.value = false
|
2023-09-28 11:27:45 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="modal modal-otp" v-bind:class="{ 'is-active': isActive }">
|
|
|
|
<div class="modal-background" @click.stop="closeModal"></div>
|
2024-11-07 16:12:07 +01:00
|
|
|
<div v-if="isFullHeight" class="modal-content modal-with-footer">
|
|
|
|
<div class="modal-slot p-4 has-text-centered">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else class="modal-content modal-with-footer">
|
2023-09-28 11:27:45 +02:00
|
|
|
<section class="section">
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="column is-three-quarters">
|
|
|
|
<div class="modal-slot box has-text-centered is-shadowless">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
2023-11-23 12:43:27 +01:00
|
|
|
<VueFooter v-if="props.closable" :showButtons="true" :internalFooterType="'modal'">
|
2023-11-03 13:20:40 +01:00
|
|
|
<ButtonBackCloseCancel action="close" :useLinkTag="false" @closed="closeModal" />
|
2023-11-23 12:43:27 +01:00
|
|
|
</VueFooter>
|
2023-09-28 11:27:45 +02:00
|
|
|
</div>
|
|
|
|
</template>
|