This commit is contained in:
Timothy Jaeryang Baek
2026-08-25 09:59:07 -04:00
parent eadce55e34
commit aa3d569610

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { toast } from 'svelte-sonner'; import { toast } from 'svelte-sonner';
import { getContext, tick, onDestroy } from 'svelte'; import { getContext, tick, onDestroy } from 'svelte';
import { formatFileSize } from '$lib/utils'; import { copyToClipboard, formatFileSize } from '$lib/utils';
import type { FileEntry } from '$lib/apis/terminal'; import type { FileEntry } from '$lib/apis/terminal';
import Dropdown from '$lib/components/common/Dropdown.svelte'; import Dropdown from '$lib/components/common/Dropdown.svelte';
@@ -402,12 +402,12 @@
<button <button
type="button" type="button"
class="select-none flex h-7 w-full items-center gap-2 rounded-lg px-2 text-xs hover:bg-gray-50/40 dark:hover:bg-white/4 transition" class="select-none flex h-7 w-full items-center gap-2 rounded-lg px-2 text-xs hover:bg-gray-50/40 dark:hover:bg-white/4 transition"
on:click={(e) => { on:click={async (e) => {
e.stopPropagation(); e.stopPropagation();
menuOpen = false; menuOpen = false;
navigator.clipboard.writeText(entryPath).then(() => { if (await copyToClipboard(entryPath)) {
toast.success($i18n.t('Path copied')); toast.success($i18n.t('Path copied'));
}); }
}} }}
> >
<Icon name="copy" size={12} strokeWidth={1.4} /> <Icon name="copy" size={12} strokeWidth={1.4} />