enh: user role update confirm dialog

This commit is contained in:
Timothy Jaeryang Baek
2025-05-05 16:10:36 +04:00
parent 457a0f318a
commit 26e9cd0b4b
2 changed files with 35 additions and 8 deletions
@@ -1,10 +1,13 @@
<script lang="ts">
import DOMPurify from 'dompurify';
import { onMount, getContext, createEventDispatcher } from 'svelte';
const i18n = getContext('i18n');
const dispatch = createEventDispatcher();
import { fade } from 'svelte/transition';
import { flyAndScale } from '$lib/utils/transitions';
import { marked } from 'marked';
export let title = '';
export let message = '';
@@ -90,7 +93,8 @@
<slot>
<div class=" text-sm text-gray-500 flex-1">
{#if message !== ''}
{message}
{@const html = DOMPurify.sanitize(marked.parse(message))}
{@html html}
{:else}
{$i18n.t('This action cannot be undone. Do you wish to continue?')}
{/if}