mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: __event_call__ support
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
export let title = $i18n.t('Confirm your action');
|
||||
export let message = $i18n.t('This action cannot be undone. Do you wish to continue?');
|
||||
export let title = '';
|
||||
export let message = '';
|
||||
|
||||
export let cancelLabel = $i18n.t('Cancel');
|
||||
export let confirmLabel = $i18n.t('Confirm');
|
||||
@@ -58,11 +58,21 @@
|
||||
}}
|
||||
>
|
||||
<div class="px-[1.75rem] py-6">
|
||||
<div class=" text-lg font-semibold dark:text-gray-200 mb-2.5">{title}</div>
|
||||
<div class=" text-lg font-semibold dark:text-gray-200 mb-2.5">
|
||||
{#if title !== ''}
|
||||
{title}
|
||||
{:else}
|
||||
{$i18n.t('Confirm your action')}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<slot>
|
||||
<div class=" text-sm text-gray-500">
|
||||
{message}
|
||||
{#if message !== ''}
|
||||
{message}
|
||||
{:else}
|
||||
{$i18n.t('This action cannot be undone. Do you wish to continue?')}
|
||||
{/if}
|
||||
</div>
|
||||
</slot>
|
||||
|
||||
@@ -71,6 +81,7 @@
|
||||
class="bg-gray-100 hover:bg-gray-200 text-gray-800 dark:bg-gray-850 dark:hover:bg-gray-800 dark:text-white font-medium w-full py-2.5 rounded-lg transition"
|
||||
on:click={() => {
|
||||
show = false;
|
||||
dispatch('cancel');
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user