All checks were successful
Auto Tag Develop / tag (push) Successful in 6s
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée - [x] TU/TI/TF OK - [ ] CHANGELOG modifié Co-authored-by: Matthieu <mtholot19@gmail.com> Reviewed-on: MALIO-DEV/Coltura#8 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
77 lines
2.1 KiB
Vue
77 lines
2.1 KiB
Vue
<template>
|
|
<Teleport to="body">
|
|
<Transition name="fade">
|
|
<div
|
|
v-if="modelValue"
|
|
class="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
|
|
@click.self="cancel"
|
|
>
|
|
<div class="w-full max-w-md rounded-lg bg-white p-6 shadow-xl">
|
|
<h3 class="text-lg font-semibold text-neutral-900">
|
|
{{ t('admin.sites.delete.title') }}
|
|
</h3>
|
|
<p class="mt-3 text-sm text-neutral-600">
|
|
{{ t('admin.sites.delete.message', { name: siteName }) }}
|
|
</p>
|
|
<div class="mt-6 flex justify-end gap-3">
|
|
<MalioButton
|
|
:label="t('common.cancel')"
|
|
variant="secondary"
|
|
@click="cancel"
|
|
/>
|
|
<MalioButton
|
|
:label="t('common.delete')"
|
|
variant="danger"
|
|
icon-name="mdi:delete-outline"
|
|
icon-position="left"
|
|
:disabled="loading"
|
|
@click="confirm"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Transition>
|
|
</Teleport>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const { t } = useI18n()
|
|
|
|
defineProps<{
|
|
modelValue: boolean
|
|
siteName: string
|
|
loading: boolean
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'update:modelValue': [value: boolean]
|
|
confirm: []
|
|
}>()
|
|
|
|
function cancel() {
|
|
emit('update:modelValue', false)
|
|
}
|
|
|
|
function confirm() {
|
|
emit('confirm')
|
|
}
|
|
|
|
function onKeydown(e: KeyboardEvent) {
|
|
if (e.key === 'Escape') cancel()
|
|
}
|
|
|
|
onMounted(() => document.addEventListener('keydown', onKeydown))
|
|
onUnmounted(() => document.removeEventListener('keydown', onKeydown))
|
|
</script>
|
|
|
|
<style scoped>
|
|
.fade-enter-active,
|
|
.fade-leave-active {
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
.fade-enter-from,
|
|
.fade-leave-to {
|
|
opacity: 0;
|
|
}
|
|
</style>
|