flotilla/src/app/components/ConfirmDelete.svelte

20 lines
531 B
Svelte
Raw Normal View History

2024-10-24 22:48:45 +00:00
<script lang="ts">
import Confirm from "@lib/components/Confirm.svelte"
import {publishDelete} from "@app/commands"
2024-10-31 19:24:40 +00:00
import {clearModals} from "@app/modal"
2024-10-24 22:48:45 +00:00
const {url, event} = $props()
2024-10-24 22:48:45 +00:00
const confirm = async () => {
await publishDelete({event, relays: [url]})
2024-10-29 20:20:59 +00:00
clearModals()
2024-10-24 22:48:45 +00:00
}
</script>
<Confirm
{confirm}
title="Delete Message"
subtitle="Are you sure you want to delete this message?"
message="This will send a request to delete this message. Be aware that not all relays may honor this request." />