diff --git a/src/lib/components/layout/SearchModal.svelte b/src/lib/components/layout/SearchModal.svelte index 1f625a1b7c..eea26842ec 100644 --- a/src/lib/components/layout/SearchModal.svelte +++ b/src/lib/components/layout/SearchModal.svelte @@ -4,7 +4,9 @@ import { toast } from 'svelte-sonner'; import { settings } from '$lib/stores'; import DropdownMenu from '$lib/components/common/DropdownMenu.svelte'; - import SettingsSelect from '$lib/components/common/SettingsSelect.svelte'; + import DropdownSub from '$lib/components/common/DropdownSub.svelte'; + import Check from '$lib/components/icons/Check.svelte'; + import ChevronRight from '$lib/components/icons/ChevronRight.svelte'; import Spinner from '$lib/components/common/Spinner.svelte'; import Loader from '$lib/components/common/Loader.svelte'; import { @@ -277,7 +279,9 @@ class="{quietButton} !h-[1.375rem] bg-gray-50/60 dark:bg-gray-800/40" on:click={() => (sharing = 'all')} aria-label={$i18n.t('Remove sharing filter')} - >{$i18n.t(sharing === 'mine' ? 'Created by you' : 'Shared with you')}{$i18n.t(sharing === 'mine' ? 'Created by you' : 'Shared with you')}{/if} {#if scope} + {#each [{ value: 'all', label: 'All' }, { value: 'mine', label: 'Created by you' }, { value: 'shared', label: 'Shared with you' }] as option} + - - + {$i18n.t(option.label)} + {#if sharing === option.value}{/if} + + {/each} + + + + + {#each [{ kind: 'folder', label: 'Folders' }, { kind: 'channel', label: 'Channels' }] as group} + {#if scopes.some((item) => item.kind === group.kind)} +
+ {$i18n.t(group.label)} +
+ {#each scopes.filter((item) => item.kind === group.kind) as item} + + {/each} + {/if} + {/each} +
+ {#if kind !== 'all' || sharing !== 'all' || scope} +
+ + {/if} + {/if}