This commit is contained in:
Timothy Jaeryang Baek
2026-07-14 00:48:40 -04:00
parent 84e4d6ef82
commit f1584b5a37
46 changed files with 335 additions and 378 deletions
@@ -3,6 +3,7 @@
const dispatch = createEventDispatcher();
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Download from '$lib/components/icons/Download.svelte';
@@ -42,9 +43,7 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
{#if onExport}
<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 w-full"
@@ -66,6 +65,6 @@
<GarbageBin />
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -71,6 +71,7 @@
import FilesOverlay from '$lib/components/chat/MessageInput/FilesOverlay.svelte';
import DropdownOptions from '$lib/components/common/DropdownOptions.svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Checkbox from '$lib/components/common/Checkbox.svelte';
import AdjustmentsHorizontal from '$lib/components/icons/AdjustmentsHorizontal.svelte';
import Pagination from '$lib/components/common/Pagination.svelte';
@@ -1416,9 +1417,7 @@
</button>
<div slot="content">
<div
class="min-w-[180px] 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"
>
<DropdownMenu className="min-w-[180px]">
<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 w-full"
type="button"
@@ -1434,7 +1433,7 @@
/>
{$i18n.t('File content')}
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -3,6 +3,7 @@
const dispatch = createEventDispatcher();
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import ArrowUpCircle from '$lib/components/icons/ArrowUpCircle.svelte';
import BarsArrowUp from '$lib/components/icons/BarsArrowUp.svelte';
@@ -55,9 +56,7 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[200px] transition">
<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 w-full"
on:click={() => {
@@ -140,6 +139,6 @@
<ArrowUturnLeft strokeWidth="2" />
<div class="flex items-center">{$i18n.t('Reset')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -11,6 +11,7 @@
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
import Pencil from '$lib/components/icons/Pencil.svelte';
import Folder from '$lib/components/icons/Folder.svelte';
@@ -171,9 +172,7 @@
</button>
<div slot="content">
<div
class="min-w-[140px] rounded-2xl p-1 z-[9999999] bg-white dark:bg-gray-850 dark:text-white shadow-lg border border-gray-100 dark:border-gray-800"
>
<DropdownMenu className="min-w-[140px] z-[9999999]">
<button
type="button"
class="select-none flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition items-center gap-2 text-sm"
@@ -190,7 +189,7 @@
<GarbageBin className="size-3.5" />
{$i18n.t('Delete')}
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
</div>
@@ -15,6 +15,7 @@
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import DocumentPage from '$lib/components/icons/DocumentPage.svelte';
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
import Download from '$lib/components/icons/Download.svelte';
@@ -184,9 +185,7 @@
</button>
<div slot="content">
<div
class="min-w-[140px] rounded-2xl p-1 z-[9999999] bg-white dark:bg-gray-850 dark:text-white shadow-lg border border-gray-100 dark:border-gray-800"
>
<DropdownMenu className="min-w-[140px] z-[9999999]">
<button
type="button"
class="select-none flex rounded-xl py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition items-center gap-2 text-sm"
@@ -218,7 +217,7 @@
<GarbageBin className="size-3.5" />
{$i18n.t('Delete')}
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
</div>
+3 -4
View File
@@ -45,6 +45,7 @@
import Eye from '../icons/Eye.svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import ViewSelector from './common/ViewSelector.svelte';
import TagSelector from './common/TagSelector.svelte';
import Pagination from '../common/Pagination.svelte';
@@ -565,9 +566,7 @@
</Tooltip>
<div slot="content">
<div
class="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"
>
<DropdownMenu className="w-[170px] shadow-sm">
<button
class="select-none flex w-full 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"
type="button"
@@ -613,7 +612,7 @@
<EyeSlash className="size-4" />
<div class="flex items-center">{$i18n.t('Hide All')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
</div>
@@ -119,7 +119,7 @@
<div slot="content">
<div
class="z-[10000] text-black dark:text-white rounded-2xl shadow-lg border border-gray-200 dark:border-gray-800 flex flex-col bg-white dark:bg-gray-850 w-64 p-1"
class="z-[10000] text-black dark:text-white rounded-xl shadow-lg border border-gray-200 dark:border-gray-800 flex flex-col bg-white dark:bg-gray-850 w-64 p-0.5"
>
<div class=" flex w-full space-x-1.5 px-1.5 pb-0.5">
<div class="flex flex-1">
@@ -127,7 +127,7 @@
<Search className="size-3.5" />
</div>
<input
class=" w-full text-sm py-0.5 outline-hidden bg-transparent"
class="w-full text-[13px] py-0.5 outline-hidden bg-transparent"
bind:value={query}
on:input={handleSearchInput}
placeholder={$i18n.t('Search')}
@@ -143,7 +143,7 @@
{:else}
{#each items as item, i}
{#if i === 0 || item?.type !== items[i - 1]?.type}
<div class="px-1.5 text-xs text-gray-500 py-0.5">
<div class="px-1.5 text-[11px] text-gray-500 py-0.5">
{#if item?.type === 'note'}
{$i18n.t('Notes')}
{:else if item?.type === 'collection'}
@@ -155,7 +155,7 @@
{/if}
<div
class=" px-1.5 py-0.5 rounded-xl w-full text-left flex justify-between items-center text-sm hover:bg-gray-50 hover:dark:bg-gray-800 hover:dark:text-gray-100 selected-command-option-button"
class="h-[1.6875rem] px-2 rounded-xl w-full text-left flex justify-between items-center text-[13px] hover:bg-gray-50/60 hover:dark:bg-gray-800/60 hover:dark:text-gray-100 selected-command-option-button"
>
<button
class="w-full flex-1"
@@ -172,7 +172,7 @@
placement="top"
tippyOptions={{ zIndex: 100000 }}
>
<PageEdit className="size-4" />
<PageEdit className="size-3.5" />
</Tooltip>
{:else if item.type === 'collection'}
<Tooltip
@@ -180,7 +180,7 @@
placement="top"
tippyOptions={{ zIndex: 100000 }}
>
<Database className="size-4" />
<Database className="size-3.5" />
</Tooltip>
{:else if item.type === 'file'}
<Tooltip
@@ -188,7 +188,7 @@
placement="top"
tippyOptions={{ zIndex: 100000 }}
>
<DocumentPage className="size-4" />
<DocumentPage className="size-3.5" />
</Tooltip>
{/if}
@@ -197,7 +197,7 @@
placement="top-start"
tippyOptions={{ zIndex: 100000 }}
>
<div class="line-clamp-1 flex-1 text-sm text-left">
<div class="line-clamp-1 flex-1 text-[13px] text-left">
{decodeString(item?.name)}
</div>
</Tooltip>
@@ -2,6 +2,7 @@
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.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';
@@ -58,9 +59,7 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
{#if writeAccess}
<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 w-full"
@@ -214,6 +213,6 @@
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
{/if}
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -2,6 +2,7 @@
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
@@ -49,9 +50,7 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
{#if isProduction}
<Tooltip content={$i18n.t('Cannot delete the production version')} placement="top">
<div
@@ -73,6 +72,6 @@
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
{/if}
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -3,6 +3,7 @@
import { config, user } from '$lib/stores';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Share from '$lib/components/icons/Share.svelte';
@@ -34,11 +35,9 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
editHandler();
@@ -50,7 +49,7 @@
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
class="size-3.5"
>
<path
stroke-linecap="round"
@@ -64,53 +63,53 @@
{#if $config.features.enable_community_sharing}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
shareHandler();
}}
>
<Share />
<Share className="size-3.5" />
<div class="flex items-center">{$i18n.t('Share')}</div>
</button>
{/if}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
cloneHandler();
}}
>
<DocumentDuplicate />
<DocumentDuplicate className="size-3.5" />
<div class="flex items-center">{$i18n.t('Clone')}</div>
</button>
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.prompts_export}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
exportHandler();
}}
>
<Download />
<Download className="size-3.5" />
<div class="flex items-center">{$i18n.t('Export')}</div>
</button>
{/if}
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
<hr class="border-gray-50 dark:border-gray-850/30 mx-1 my-0.5" />
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
deleteHandler();
}}
>
<GarbageBin />
<GarbageBin className="size-3.5" />
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -2,6 +2,7 @@
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import GarbageBin from '$lib/components/icons/GarbageBin.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import DocumentDuplicate from '$lib/components/icons/DocumentDuplicate.svelte';
@@ -32,11 +33,9 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
on:click={() => {
editHandler();
}}
@@ -47,7 +46,7 @@
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
class="size-3.5"
>
<path
stroke-linecap="round"
@@ -60,38 +59,38 @@
</button>
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
on:click={() => {
cloneHandler();
}}
>
<DocumentDuplicate />
<DocumentDuplicate className="size-3.5" />
<div class="flex items-center">{$i18n.t('Clone')}</div>
</button>
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.skills_export}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
on:click={() => {
exportHandler();
}}
>
<Download />
<Download className="size-3.5" />
<div class="flex items-center">{$i18n.t('Export')}</div>
</button>
{/if}
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
<hr class="border-gray-50 dark:border-gray-850/30 mx-1 my-0.5" />
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
on:click={() => {
deleteHandler();
}}
>
<GarbageBin />
<GarbageBin className="size-3.5" />
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -2,6 +2,7 @@
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Pencil from '$lib/components/icons/Pencil.svelte';
import Link from '$lib/components/icons/Link.svelte';
@@ -30,9 +31,7 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[190px]">
<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"
on:click={async () => {
@@ -58,6 +57,6 @@
</div>
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -2,6 +2,7 @@
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.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';
@@ -35,11 +36,9 @@
</Tooltip>
<div slot="content">
<div
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"
>
<DropdownMenu className="min-w-[170px]">
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
editHandler();
@@ -51,7 +50,7 @@
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
class="size-3.5"
>
<path
stroke-linecap="round"
@@ -65,55 +64,55 @@
{#if $config.features.enable_community_sharing}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
shareHandler();
}}
>
<Share />
<Share className="size-3.5" />
<div class="flex items-center">{$i18n.t('Share')}</div>
</button>
{/if}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
cloneHandler();
}}
>
<DocumentDuplicate />
<DocumentDuplicate className="size-3.5" />
<div class="flex items-center">{$i18n.t('Clone')}</div>
</button>
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.tools_export}
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
exportHandler();
}}
>
<Download />
<Download className="size-3.5" />
<div class="flex items-center">{$i18n.t('Export')}</div>
</button>
{/if}
<hr class="border-gray-50 dark:border-gray-850/30 my-1" />
<hr class="border-gray-50 dark:border-gray-850/30 mx-1 my-0.5" />
<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 w-full"
class="select-none flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] cursor-pointer hover:bg-gray-50/60 dark:hover:bg-gray-800/60"
draggable="false"
on:click={() => {
deleteHandler();
}}
>
<GarbageBin />
<GarbageBin className="size-3.5" />
<div class="flex items-center">{$i18n.t('Delete')}</div>
</button>
</div>
</DropdownMenu>
</div>
</Dropdown>
@@ -8,6 +8,8 @@
export let show = false;
export let shareUsers = true;
export let allowGroups = true;
export let accessGrants: { principal_type: string; principal_id: string }[] = [];
export let onAdd = (payload: { userIds: string[]; groupIds: string[] }) => {};
let userIds: string[] = [];
@@ -55,9 +57,10 @@
<MemberSelector
bind:userIds
bind:groupIds
includeGroups={true}
includeGroups={allowGroups}
includeUsers={shareUsers}
includeSessionUser={true}
includeSessionUser={false}
{accessGrants}
/>
</div>
@@ -22,6 +22,7 @@
export let includeUsers = true;
export let pagination = false;
export let includeSessionUser = false;
export let accessGrants: { principal_type: string; principal_id: string }[] = [];
export let groupIds = [];
export let userIds = [];
@@ -247,7 +248,7 @@
<div>
{#each users as user, userIdx (user.id)}
{#if includeSessionUser || user?.id !== $_user?.id}
{#if !accessGrants.some((grant) => grant.principal_type === 'user' && grant.principal_id === user.id) && (includeSessionUser || user?.id !== $_user?.id)}
<button
class=" dark:border-gray-850 text-xs flex items-center justify-between w-full"
type="button"