Skip to content

Commit 1bf12ed

Browse files
committed
Fix overflow with very long file/directory names
1 parent ddcdab0 commit 1bf12ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/src/lib/components/files/DirectorySelect.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
let { placeholder = "Select Directory", directory = $bindable<DirectoryEntry | undefined>(undefined) }: Props = $props();
1111
</script>
1212

13-
<DirectoryInput class="flex items-center gap-2 rounded-md border btn-ghost px-2 py-1" bind:directory>
13+
<DirectoryInput class="flex max-w-full items-center gap-2 rounded-md border btn-ghost px-2 py-1" bind:directory>
1414
{#snippet children({ directory })}
1515
<span class="iconify size-4 shrink-0 text-em-disabled octicon--file-directory-16"></span>
1616
{#if directory}
17-
{directory.fileName}
17+
<span class="truncate">{directory.fileName}</span>
1818
{:else}
1919
<span class="font-light">{placeholder}</span>
2020
{/if}

web/src/lib/components/files/SingleFileInput.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
const inputId = `${uid}-input`;
3030
</script>
3131

32-
<label id={labelId} for={inputId} class="relative flex w-fit items-center gap-2 rounded-md border btn-ghost px-2 py-1 has-focus-visible:outline-2">
32+
<label id={labelId} for={inputId} class="relative flex w-fit max-w-full items-center gap-2 rounded-md border btn-ghost px-2 py-1 has-focus-visible:outline-2">
3333
<span class="iconify size-4 shrink-0 text-em-disabled octicon--file-16"></span>
3434
{#if file}
35-
{file.name}
35+
<span class="truncate">{file.name}</span>
3636
{:else}
3737
<span class="font-light">{label}</span>
3838
{/if}

0 commit comments

Comments
 (0)