mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 00:08:37 +01:00
new selfhosted version
This commit is contained in:
20
dashboard/components/dialog/DangerGeneric.vue
Normal file
20
dashboard/components/dialog/DangerGeneric.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
const emits = defineEmits<{ (event: 'confirm', data?: any): void }>();
|
||||
const props = defineProps<{ data: { label: string, confirm?: string, back?: string, metadata?: any } }>();
|
||||
const { close } = useDialog();
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div>
|
||||
{{ data.label }}
|
||||
</div>
|
||||
<div class="flex justify-end gap-2">
|
||||
<Button variant="secondary" @click="close()"> {{ data.back ?? 'Back' }}</Button>
|
||||
<Button variant="destructive" @click="emits('confirm', data.metadata)"> {{ data.confirm ?? 'Delete' }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user