refac
This commit is contained in:
1 parent
d38c953608
commit
5ab0ea8b8c
2 files changed
+24
-24
No files matched your search
@@ -30,27 +30,27 @@
|
|||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu className="min-w-[170px] font-primary">
|
<DropdownMenu className="min-w-[170px] font-primary">
|
||||||
<button
|
<button
|
||||||
class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] hover:bg-gray-50/60 dark:hover:bg-gray-800/60 transition"
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
onEdit();
|
onEdit();
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class=" self-center mr-2">
|
<div class="self-center">
|
||||||
<Sparkles className="size-4" strokeWidth="2" />
|
<Sparkles className="size-3.5" strokeWidth="2" />
|
||||||
</div>
|
</div>
|
||||||
<div class=" self-center truncate">{$i18n.t('Enhance')}</div>
|
<div class=" self-center truncate">{$i18n.t('Enhance')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
|
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[13px] hover:bg-gray-50/60 dark:hover:bg-gray-800/60 transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
onChat();
|
onChat();
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class=" self-center mr-2">
|
<div class="self-center">
|
||||||
<ChatBubbleOval className="size-4" strokeWidth="2" />
|
<ChatBubbleOval className="size-3.5" strokeWidth="2" />
|
||||||
</div>
|
</div>
|
||||||
<div class=" self-center truncate">{$i18n.t('Chat')}</div>
|
<div class=" self-center truncate">{$i18n.t('Chat')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -40,17 +40,17 @@
|
|||||||
|
|
||||||
<div slot="content">
|
<div slot="content">
|
||||||
<DropdownMenu className="min-w-[180px]">
|
<DropdownMenu className="min-w-[180px]">
|
||||||
<DropdownSub>
|
<DropdownSub contentClass="select-none z-50">
|
||||||
<button
|
<button
|
||||||
slot="trigger"
|
slot="trigger"
|
||||||
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 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"
|
||||||
>
|
>
|
||||||
<Download strokeWidth="2" />
|
<Download className="size-3.5" strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Download')}</div>
|
<div class="flex items-center">{$i18n.t('Download')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onDownload('txt');
|
onDownload('txt');
|
||||||
}}
|
}}
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onDownload('md');
|
onDownload('md');
|
||||||
}}
|
}}
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onDownload('pdf');
|
onDownload('pdf');
|
||||||
}}
|
}}
|
||||||
@@ -78,35 +78,35 @@
|
|||||||
</DropdownSub>
|
</DropdownSub>
|
||||||
|
|
||||||
{#if onCopyLink || onCopyToClipboard}
|
{#if onCopyLink || onCopyToClipboard}
|
||||||
<DropdownSub>
|
<DropdownSub contentClass="select-none z-50">
|
||||||
<button
|
<button
|
||||||
slot="trigger"
|
slot="trigger"
|
||||||
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 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"
|
||||||
>
|
>
|
||||||
<Share strokeWidth="2" />
|
<Share className="size-3.5" strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Share')}</div>
|
<div class="flex items-center">{$i18n.t('Share')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if onCopyLink}
|
{#if onCopyLink}
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onCopyLink();
|
onCopyLink();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Link />
|
<Link className="size-3.5" />
|
||||||
<div class="flex items-center">{$i18n.t('Copy link')}</div>
|
<div class="flex items-center">{$i18n.t('Copy link')}</div>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if onCopyToClipboard}
|
{#if onCopyToClipboard}
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onCopyToClipboard();
|
onCopyToClipboard();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DocumentDuplicate strokeWidth="2" />
|
<DocumentDuplicate className="size-3.5" strokeWidth="2" />
|
||||||
<div class="flex items-center">{$i18n.t('Copy to clipboard')}</div>
|
<div class="flex items-center">{$i18n.t('Copy to clipboard')}</div>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -115,29 +115,29 @@
|
|||||||
|
|
||||||
{#if onPin}
|
{#if onPin}
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onPin();
|
onPin();
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if isPinned}
|
{#if isPinned}
|
||||||
<PinSlash />
|
<PinSlash className="size-3.5" />
|
||||||
<div class="flex items-center">{$i18n.t('Unpin')}</div>
|
<div class="flex items-center">{$i18n.t('Unpin')}</div>
|
||||||
{:else}
|
{:else}
|
||||||
<Pin />
|
<Pin className="size-3.5" />
|
||||||
<div class="flex items-center">{$i18n.t('Pin to Sidebar')}</div>
|
<div class="flex items-center">{$i18n.t('Pin to Sidebar')}</div>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<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={() => {
|
on:click={() => {
|
||||||
onDelete();
|
onDelete();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GarbageBin />
|
<GarbageBin className="size-3.5" />
|
||||||
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
<div class="flex items-center">{$i18n.t('Delete')}</div>
|
||||||
</button>
|
</button>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|||||||
Reference in new issue
Block a user