refac
This commit is contained in:
@@ -1,38 +1,27 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
import { getContext, createEventDispatcher } from 'svelte';
|
||||||
|
|
||||||
import fileSaver from 'file-saver';
|
|
||||||
const { saveAs } = fileSaver;
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import GarbageBin from '$lib/components/icons/GarbageBin.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 Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import Download from '$lib/components/icons/Download.svelte';
|
|
||||||
|
|
||||||
let show = false;
|
let show = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Dropdown bind:show on:change={(e) => {}}>
|
<Dropdown bind:show>
|
||||||
<Tooltip content={$i18n.t('More')}>
|
<Tooltip content={$i18n.t('More')}>
|
||||||
<slot />
|
<slot />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[150px] rounded-xl p-1 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[150px] rounded-xl p-1 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
dispatch('delete');
|
dispatch('delete');
|
||||||
show = false;
|
show = false;
|
||||||
@@ -40,7 +29,7 @@
|
|||||||
>
|
>
|
||||||
<GarbageBin strokeWidth="2" />
|
<GarbageBin strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -340,7 +340,7 @@
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class=" px-2 py-1.5 rounded-xl bg-black text-white dark:bg-white dark:text-black transition font-medium text-sm flex items-center"
|
class="cursor-pointer px-2 py-1.5 rounded-xl bg-black text-white dark:bg-white dark:text-black transition font-medium text-sm flex items-center"
|
||||||
>
|
>
|
||||||
<Plus className="size-3" strokeWidth="2.5" />
|
<Plus className="size-3" strokeWidth="2.5" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
|
|
||||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import Share from '$lib/components/icons/Share.svelte';
|
|
||||||
import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
|
||||||
import Download from '$lib/components/icons/Download.svelte';
|
|
||||||
import Switch from '$lib/components/common/Switch.svelte';
|
|
||||||
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
|
|
||||||
import Github from '$lib/components/icons/Github.svelte';
|
|
||||||
import Plus from '$lib/components/icons/Plus.svelte';
|
|
||||||
import Pencil from '$lib/components/icons/Pencil.svelte';
|
import Pencil from '$lib/components/icons/Pencil.svelte';
|
||||||
import PencilSolid from '$lib/components/icons/PencilSolid.svelte';
|
|
||||||
import Link from '$lib/components/icons/Link.svelte';
|
import Link from '$lib/components/icons/Link.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
@@ -29,8 +18,9 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
sideOffset={6}
|
||||||
if (e.detail === false) {
|
onOpenChange={(state) => {
|
||||||
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -40,12 +30,8 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[190px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[190px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={6}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
@@ -72,6 +58,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
|
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
|
||||||
</button>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
@@ -30,8 +28,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -41,12 +39,8 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[180px] rounded-xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-sm"
|
class="min-w-[180px] rounded-xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-sm"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
{#if ['filter', 'action'].includes(func.type)}
|
{#if ['filter', 'action'].includes(func.type)}
|
||||||
<div
|
<div
|
||||||
@@ -54,7 +48,6 @@
|
|||||||
>
|
>
|
||||||
<div class="flex gap-2 items-center">
|
<div class="flex gap-2 items-center">
|
||||||
<GlobeAlt />
|
<GlobeAlt />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Global')}</div>
|
<div class="flex items-center">{$i18n.t('Global')}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -66,8 +59,8 @@
|
|||||||
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
editHandler();
|
editHandler();
|
||||||
}}
|
}}
|
||||||
@@ -88,51 +81,49 @@
|
|||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
shareHandler();
|
shareHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Share />
|
<Share />
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
cloneHandler();
|
cloneHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DocumentDuplicate />
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
exportHandler();
|
exportHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
deleteHandler();
|
deleteHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin strokeWidth="2" />
|
<GarbageBin strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
@@ -37,8 +35,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -48,14 +46,10 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-sm"
|
class="min-w-[170px] rounded-xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-sm"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
hideHandler();
|
hideHandler();
|
||||||
@@ -105,9 +99,9 @@
|
|||||||
{$i18n.t('Hide Model')}
|
{$i18n.t('Hide Model')}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
pinModelHandler(model?.id);
|
pinModelHandler(model?.id);
|
||||||
@@ -126,9 +120,9 @@
|
|||||||
{$i18n.t('Keep in Sidebar')}
|
{$i18n.t('Keep in Sidebar')}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
copyLinkHandler();
|
copyLinkHandler();
|
||||||
@@ -137,10 +131,10 @@
|
|||||||
<Link />
|
<Link />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
{#if model?.is_active ?? true}
|
{#if model?.is_active ?? true}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
cloneHandler();
|
cloneHandler();
|
||||||
@@ -149,10 +143,10 @@
|
|||||||
<DocumentDuplicate />
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm font-medium cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
exportHandler();
|
exportHandler();
|
||||||
@@ -161,7 +155,7 @@
|
|||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -41,10 +41,15 @@
|
|||||||
/** Svelte action: captures the first child element as the trigger reference */
|
/** Svelte action: captures the first child element as the trigger reference */
|
||||||
function trigger(node) {
|
function trigger(node) {
|
||||||
triggerEl = node.firstElementChild || node;
|
triggerEl = node.firstElementChild || node;
|
||||||
node.addEventListener('click', toggleOpen);
|
function handleClick(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
toggleOpen();
|
||||||
|
}
|
||||||
|
node.addEventListener('click', handleClick);
|
||||||
return {
|
return {
|
||||||
destroy() {
|
destroy() {
|
||||||
node.removeEventListener('click', toggleOpen);
|
node.removeEventListener('click', handleClick);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -77,10 +82,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (align === 'end') {
|
if (align === 'end') {
|
||||||
contentEl.style.right = `${window.innerWidth - rect.right}px`;
|
let right = window.innerWidth - rect.right;
|
||||||
|
// Shift if overflowing left edge
|
||||||
|
const contentWidth = contentEl.offsetWidth || 0;
|
||||||
|
if (right + contentWidth > window.innerWidth) {
|
||||||
|
right = window.innerWidth - contentWidth - 16;
|
||||||
|
}
|
||||||
|
contentEl.style.right = `${Math.max(16, right)}px`;
|
||||||
contentEl.style.left = 'auto';
|
contentEl.style.left = 'auto';
|
||||||
} else {
|
} else {
|
||||||
contentEl.style.left = `${rect.left}px`;
|
let left = rect.left;
|
||||||
|
// Shift if overflowing right edge
|
||||||
|
const contentWidth = contentEl.offsetWidth || 0;
|
||||||
|
if (left + contentWidth + 16 > window.innerWidth) {
|
||||||
|
left = window.innerWidth - contentWidth - 16;
|
||||||
|
}
|
||||||
|
contentEl.style.left = `${Math.max(16, left)}px`;
|
||||||
contentEl.style.right = 'auto';
|
contentEl.style.right = 'auto';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,6 +113,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// React to external show changes (e.g. bind:show toggled by parent component)
|
||||||
|
$: if (show) {
|
||||||
|
tick().then(() => {
|
||||||
|
positionContent();
|
||||||
|
setTimeout(positionContent, 50);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleWindowClick(event) {
|
function handleWindowClick(event) {
|
||||||
if (!show || !closeOnOutsideClick) return;
|
if (!show || !closeOnOutsideClick) return;
|
||||||
if (triggerEl?.contains(event.target)) return;
|
if (triggerEl?.contains(event.target)) return;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
import { getContext, createEventDispatcher } from 'svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
@@ -24,8 +22,9 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
{align}
|
||||||
if (e.detail === false) {
|
onOpenChange={(state) => {
|
||||||
|
if (state === false) {
|
||||||
dispatch('close');
|
dispatch('close');
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -42,55 +41,50 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
{align}
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onCreateSub();
|
onCreateSub();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Folder />
|
<Folder />
|
||||||
<div class="flex items-center">{$i18n.t('Create Folder')}</div>
|
<div class="flex items-center">{$i18n.t('Create Folder')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onEdit();
|
onEdit();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Pencil />
|
<Pencil />
|
||||||
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onExport();
|
onExport();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm select-none cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onDelete();
|
onDelete();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,19 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
import { getContext, createEventDispatcher } from 'svelte';
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import GarbageBin from '$lib/components/icons/GarbageBin.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 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 Download from '$lib/components/icons/Download.svelte';
|
import Download from '$lib/components/icons/Download.svelte';
|
||||||
import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte';
|
|
||||||
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
|
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
@@ -26,12 +18,12 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
align="end"
|
||||||
if (e.detail === false) {
|
onOpenChange={(state) => {
|
||||||
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
align="end"
|
|
||||||
>
|
>
|
||||||
<Tooltip content={$i18n.t('More')}>
|
<Tooltip content={$i18n.t('More')}>
|
||||||
<slot
|
<slot
|
||||||
@@ -50,33 +42,30 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
side="bottom"
|
|
||||||
align="end"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
{#if onExport}
|
{#if onExport}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onExport();
|
onExport();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
dispatch('delete');
|
dispatch('delete');
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
import { getContext, createEventDispatcher } from 'svelte';
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
@@ -24,8 +22,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -53,32 +51,28 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[200px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg transition"
|
class="min-w-[200px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg transition"
|
||||||
sideOffset={4}
|
|
||||||
side="bottom"
|
|
||||||
align="end"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onUpload({ type: 'files' });
|
onUpload({ type: 'files' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ArrowUpCircle strokeWidth="2" />
|
<ArrowUpCircle strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Upload files')}</div>
|
<div class="flex items-center">{$i18n.t('Upload files')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onUpload({ type: 'directory' });
|
onUpload({ type: 'directory' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FolderOpen strokeWidth="2" />
|
<FolderOpen strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Upload directory')}</div>
|
<div class="flex items-center">{$i18n.t('Upload directory')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={$i18n.t(
|
content={$i18n.t(
|
||||||
@@ -86,36 +80,36 @@
|
|||||||
)}
|
)}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onSync();
|
onSync();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ArrowPath strokeWidth="2" />
|
<ArrowPath strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Sync directory')}</div>
|
<div class="flex items-center">{$i18n.t('Sync directory')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onUpload({ type: 'web' });
|
onUpload({ type: 'web' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GlobeAlt strokeWidth="2" />
|
<GlobeAlt strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Add webpage')}</div>
|
<div class="flex items-center">{$i18n.t('Add webpage')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onUpload({ type: 'text' });
|
onUpload({ type: 'text' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<BarsArrowUp strokeWidth="2" />
|
<BarsArrowUp strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Add text content')}</div>
|
<div class="flex items-center">{$i18n.t('Add text content')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
@@ -42,8 +40,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -60,27 +58,23 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
{#if writeAccess}
|
{#if writeAccess}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
editHandler();
|
editHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Pencil />
|
<Pencil />
|
||||||
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if writeAccess}
|
{#if writeAccess}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
hideHandler();
|
hideHandler();
|
||||||
@@ -130,10 +124,10 @@
|
|||||||
{$i18n.t('Hide Model')}
|
{$i18n.t('Hide Model')}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
pinModelHandler(model?.id);
|
pinModelHandler(model?.id);
|
||||||
@@ -152,10 +146,10 @@
|
|||||||
{$i18n.t('Keep in Sidebar')}
|
{$i18n.t('Keep in Sidebar')}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
{#if writeAccess}
|
{#if writeAccess}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
cloneHandler();
|
cloneHandler();
|
||||||
@@ -164,14 +158,14 @@
|
|||||||
<DocumentDuplicate />
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if writeAccess}
|
{#if writeAccess}
|
||||||
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
copyLinkHandler();
|
copyLinkHandler();
|
||||||
@@ -180,10 +174,10 @@
|
|||||||
<Link />
|
<Link />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
<div class="flex items-center">{$i18n.t('Copy Link')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
{#if writeAccess && ($currentUser?.role === 'admin' || $currentUser?.permissions?.workspace?.models_export)}
|
{#if writeAccess && ($currentUser?.role === 'admin' || $currentUser?.permissions?.workspace?.models_export)}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
exportHandler();
|
exportHandler();
|
||||||
@@ -192,11 +186,11 @@
|
|||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if writeAccess && $config?.features.enable_community_sharing}
|
{#if writeAccess && $config?.features.enable_community_sharing}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
shareHandler();
|
shareHandler();
|
||||||
@@ -204,13 +198,13 @@
|
|||||||
>
|
>
|
||||||
<Share />
|
<Share />
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if writeAccess}
|
{#if writeAccess}
|
||||||
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
<hr class="border-gray-50/30 dark:border-gray-800/30 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
deleteHandler();
|
deleteHandler();
|
||||||
@@ -218,8 +212,8 @@
|
|||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
import { getContext } from 'svelte';
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||||
@@ -33,8 +31,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -51,12 +49,8 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="end"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
{#if isProduction}
|
{#if isProduction}
|
||||||
<Tooltip content={$i18n.t('Cannot delete the production version')} placement="top">
|
<Tooltip content={$i18n.t('Cannot delete the production version')} placement="top">
|
||||||
@@ -68,8 +62,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{:else}
|
{:else}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
show = false;
|
show = false;
|
||||||
showDeleteConfirmDialog = true;
|
showDeleteConfirmDialog = true;
|
||||||
@@ -77,8 +71,8 @@
|
|||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
import { config, user } from '$lib/stores';
|
import { config, user } from '$lib/stores';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import GarbageBin from '$lib/components/icons/GarbageBin.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 Tooltip from '$lib/components/common/Tooltip.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 DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
||||||
import Download from '$lib/components/icons/Download.svelte';
|
import Download from '$lib/components/icons/Download.svelte';
|
||||||
|
|
||||||
@@ -27,8 +22,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -38,60 +33,54 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl p-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
{#if $config.features.enable_community_sharing}
|
{#if $config.features.enable_community_sharing}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
shareHandler();
|
shareHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Share />
|
<Share />
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
cloneHandler();
|
cloneHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DocumentDuplicate />
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.prompts_export}
|
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.prompts_export}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
exportHandler();
|
exportHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
deleteHandler();
|
deleteHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
@@ -23,8 +21,8 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
onOpenChange={(state) => {
|
||||||
if (e.detail === false) {
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -34,15 +32,11 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[170px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={-2}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
editHandler();
|
editHandler();
|
||||||
}}
|
}}
|
||||||
@@ -63,43 +57,41 @@
|
|||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
<div class="flex items-center">{$i18n.t('Edit')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
cloneHandler();
|
cloneHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DocumentDuplicate />
|
<DocumentDuplicate />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
<div class="flex items-center">{$i18n.t('Clone')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
|
|
||||||
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills}
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
exportHandler();
|
exportHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download />
|
<Download />
|
||||||
|
|
||||||
<div class="flex items-center">{$i18n.t('Export')}</div>
|
<div class="flex items-center">{$i18n.t('Export')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
|
||||||
|
|
||||||
<DropdownMenu.Item
|
<button
|
||||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl"
|
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
deleteHandler();
|
deleteHandler();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</DropdownMenu.Item>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class=" px-2 py-1.5 rounded-xl bg-black text-white dark:bg-white dark:text-black transition font-medium text-sm flex items-center"
|
class="cursor-pointer px-2 py-1.5 rounded-xl bg-black text-white dark:bg-white dark:text-black transition font-medium text-sm flex items-center"
|
||||||
>
|
>
|
||||||
<Plus className="size-3" strokeWidth="2.5" />
|
<Plus className="size-3" strokeWidth="2.5" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { DropdownMenu } from 'bits-ui';
|
|
||||||
import { flyAndScale } from '$lib/utils/transitions';
|
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
|
|
||||||
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
import Dropdown from '$lib/components/common/Dropdown.svelte';
|
||||||
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
|
|
||||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import Share from '$lib/components/icons/Share.svelte';
|
|
||||||
import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
|
|
||||||
import Download from '$lib/components/icons/Download.svelte';
|
|
||||||
import Switch from '$lib/components/common/Switch.svelte';
|
|
||||||
import GlobeAlt from '$lib/components/icons/GlobeAlt.svelte';
|
|
||||||
import Github from '$lib/components/icons/Github.svelte';
|
|
||||||
import Plus from '$lib/components/icons/Plus.svelte';
|
|
||||||
import Pencil from '$lib/components/icons/Pencil.svelte';
|
import Pencil from '$lib/components/icons/Pencil.svelte';
|
||||||
import PencilSolid from '$lib/components/icons/PencilSolid.svelte';
|
|
||||||
import Link from '$lib/components/icons/Link.svelte';
|
import Link from '$lib/components/icons/Link.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
@@ -29,8 +18,9 @@
|
|||||||
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
bind:show
|
bind:show
|
||||||
on:change={(e) => {
|
sideOffset={6}
|
||||||
if (e.detail === false) {
|
onOpenChange={(state) => {
|
||||||
|
if (state === false) {
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -40,12 +30,8 @@
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu.Content
|
<div
|
||||||
class="w-full max-w-[190px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
class="min-w-[190px] rounded-2xl px-1 py-1 border border-gray-100 dark:border-gray-800 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg"
|
||||||
sideOffset={6}
|
|
||||||
side="bottom"
|
|
||||||
align="start"
|
|
||||||
transition={flyAndScale}
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
class="flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||||
@@ -72,6 +58,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
|
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
|
||||||
</button>
|
</button>
|
||||||
</DropdownMenu.Content>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|||||||
Reference in New Issue
Block a user