|
@@ -5,18 +5,11 @@
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
|
|
- import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
|
|
|
- import Pencil from '$lib/components/icons/Pencil.svelte';
|
|
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
|
|
- import Tags from '$lib/components/chat/Tags.svelte';
|
|
|
- import Share from '$lib/components/icons/Share.svelte';
|
|
|
- import ArchiveBox from '$lib/components/icons/ArchiveBox.svelte';
|
|
|
- import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
|
|
- import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
|
|
|
import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte';
|
|
|
- import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
|
|
|
import BarsArrowUp from '$lib/components/icons/BarsArrowUp.svelte';
|
|
|
import FolderOpen from '$lib/components/icons/FolderOpen.svelte';
|
|
|
+ import ArrowPath from '$lib/components/icons/ArrowPath.svelte';
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
|
@@ -83,6 +76,23 @@
|
|
|
<div class="flex items-center">{$i18n.t('Upload directory')}</div>
|
|
|
</DropdownMenu.Item>
|
|
|
|
|
|
+ <Tooltip
|
|
|
+ content={$i18n.t(
|
|
|
+ 'This option will delete all existing files in the collection and replace them with newly uploaded files.'
|
|
|
+ )}
|
|
|
+ className="w-full"
|
|
|
+ >
|
|
|
+ <DropdownMenu.Item
|
|
|
+ class="flex gap-2 items-center px-3 py-2 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
|
+ on:click={() => {
|
|
|
+ dispatch('sync', { type: 'directory' });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <ArrowPath strokeWidth="2" />
|
|
|
+ <div class="flex items-center">{$i18n.t('Sync directory')}</div>
|
|
|
+ </DropdownMenu.Item>
|
|
|
+ </Tooltip>
|
|
|
+
|
|
|
<DropdownMenu.Item
|
|
|
class="flex gap-2 items-center px-3 py-2 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
|
|
on:click={() => {
|