|
@@ -10,10 +10,12 @@
|
|
import Tags from '$lib/components/chat/Tags.svelte';
|
|
import Tags from '$lib/components/chat/Tags.svelte';
|
|
import Share from '$lib/components/icons/Share.svelte';
|
|
import Share from '$lib/components/icons/Share.svelte';
|
|
import ArchiveBox from '$lib/components/icons/ArchiveBox.svelte';
|
|
import ArchiveBox from '$lib/components/icons/ArchiveBox.svelte';
|
|
|
|
+ import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
export let shareHandler: Function;
|
|
export let shareHandler: Function;
|
|
|
|
+ export let cloneChatHandler: Function;
|
|
export let archiveChatHandler: Function;
|
|
export let archiveChatHandler: Function;
|
|
export let renameHandler: Function;
|
|
export let renameHandler: Function;
|
|
export let deleteHandler: Function;
|
|
export let deleteHandler: Function;
|
|
@@ -38,30 +40,30 @@
|
|
|
|
|
|
<div slot="content">
|
|
<div slot="content">
|
|
<DropdownMenu.Content
|
|
<DropdownMenu.Content
|
|
- class="w-full max-w-[160px] rounded-xl px-1 py-1.5 border border-gray-300/30 dark:border-gray-700/50 z-50 bg-white dark:bg-gray-850 dark:text-white shadow"
|
|
|
|
|
|
+ class="w-full max-w-[180px] rounded-xl px-1 py-1.5 border border-gray-300/30 dark:border-gray-700/50 z-50 bg-white dark:bg-gray-850 dark:text-white shadow"
|
|
sideOffset={-2}
|
|
sideOffset={-2}
|
|
side="bottom"
|
|
side="bottom"
|
|
align="start"
|
|
align="start"
|
|
transition={flyAndScale}
|
|
transition={flyAndScale}
|
|
>
|
|
>
|
|
<DropdownMenu.Item
|
|
<DropdownMenu.Item
|
|
- class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
|
|
|
|
+ class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
on:click={() => {
|
|
on:click={() => {
|
|
- shareHandler();
|
|
|
|
|
|
+ renameHandler();
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <Share />
|
|
|
|
- <div class="flex items-center">{$i18n.t('Share')}</div>
|
|
|
|
|
|
+ <Pencil strokeWidth="2" />
|
|
|
|
+ <div class="flex items-center">{$i18n.t('Rename')}</div>
|
|
</DropdownMenu.Item>
|
|
</DropdownMenu.Item>
|
|
|
|
|
|
<DropdownMenu.Item
|
|
<DropdownMenu.Item
|
|
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
on:click={() => {
|
|
on:click={() => {
|
|
- renameHandler();
|
|
|
|
|
|
+ cloneChatHandler();
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <Pencil strokeWidth="2" />
|
|
|
|
- <div class="flex items-center">{$i18n.t('Rename')}</div>
|
|
|
|
|
|
+ <DocumentDuplicate strokeWidth="2" />
|
|
|
|
+ <div class="flex items-center">{$i18n.t('Clone')}</div>
|
|
</DropdownMenu.Item>
|
|
</DropdownMenu.Item>
|
|
|
|
|
|
<DropdownMenu.Item
|
|
<DropdownMenu.Item
|
|
@@ -74,6 +76,16 @@
|
|
<div class="flex items-center">{$i18n.t('Archive')}</div>
|
|
<div class="flex items-center">{$i18n.t('Archive')}</div>
|
|
</DropdownMenu.Item>
|
|
</DropdownMenu.Item>
|
|
|
|
|
|
|
|
+ <DropdownMenu.Item
|
|
|
|
+ class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
|
|
+ on:click={() => {
|
|
|
|
+ shareHandler();
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <Share />
|
|
|
|
+ <div class="flex items-center">{$i18n.t('Share')}</div>
|
|
|
|
+ </DropdownMenu.Item>
|
|
|
|
+
|
|
<DropdownMenu.Item
|
|
<DropdownMenu.Item
|
|
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
class="flex gap-2 items-center px-3 py-2 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
on:click={() => {
|
|
on:click={() => {
|