mirror of
https://github.com/open-webui/open-webui
synced 2024-11-14 12:39:58 +00:00
42 lines
1.0 KiB
Svelte
42 lines
1.0 KiB
Svelte
<script lang="ts">
|
|
import { getContext } from 'svelte';
|
|
import Modal from '../common/Modal.svelte';
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
export let downloadChat: Function;
|
|
export let shareChat: Function;
|
|
|
|
export let show = false;
|
|
</script>
|
|
|
|
<Modal bind:show size="xs">
|
|
<div class="px-4 pt-4 pb-5 w-full flex flex-col justify-center">
|
|
<button
|
|
class=" self-center px-8 py-1.5 w-full rounded-full text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white"
|
|
type="button"
|
|
on:click={() => {
|
|
shareChat();
|
|
show = false;
|
|
}}
|
|
>
|
|
{$i18n.t('Share to OpenWebUI Community')}
|
|
</button>
|
|
|
|
<div class="flex justify-center space-x-1 mt-1.5">
|
|
<div class=" self-center text-gray-400 text-xs font-medium">{$i18n.t('or')}</div>
|
|
|
|
<button
|
|
class=" self-center rounded-full text-xs font-medium text-gray-700 dark:text-gray-500 underline"
|
|
type="button"
|
|
on:click={() => {
|
|
downloadChat();
|
|
show = false;
|
|
}}
|
|
>
|
|
{$i18n.t('Download as a File')}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|