This commit is contained in:
Timothy Jaeryang Baek committed 2026-10-09 17:19:10 +04:00
1 parent db1ca1afab
commit b3ce7de8d3
12 files changed
+199 -7

No files matched your search

@@ -1,4 +1,5 @@
<script lang="ts">
import LockClosed from '$lib/components/icons/LockClosed.svelte';
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
@@ -11,13 +12,14 @@
import Download from '$lib/components/icons/Download.svelte';
import { config, user } from '$lib/stores';
const i18n = getContext('i18n');
const i18n = getContext<typeof import('$lib/i18n').default>('i18n');
export let editHandler: Function;
export let shareHandler: Function;
export let cloneHandler: Function;
export let exportHandler: Function;
export let deleteHandler: Function;
export let accessHandler: (() => void) | null = null;
export let onClose: Function;
export let show = false;
@@ -67,6 +69,19 @@
<div class="flex items-center">{$i18n.t('Edit')}</div>
</button>
{#if accessHandler}
<button
type="button"
class="select-none flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] hover:text-gray-900 dark:hover:text-gray-100"
on:click={() => {
accessHandler?.();
closeMenu();
}}
>
<LockClosed className="size-3.5" />
<div class="flex items-center">{$i18n.t('Access')}</div>
</button>
{/if}
{#if $config.features.enable_community_sharing}
<button