mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-27 07:39:20 -05:00
33 lines
1.2 KiB
Svelte
33 lines
1.2 KiB
Svelte
<script lang="ts">
|
|
import { getContext } from 'svelte';
|
|
import Modal from '$lib/components/common/Modal.svelte';
|
|
import XMark from '$lib/components/icons/XMark.svelte';
|
|
import type { MachineTarget } from '$lib/apis/machines';
|
|
|
|
const i18n = getContext<any>('i18n');
|
|
|
|
/** Browses one instance's files: the machine, plus the chat or model it belongs to. */
|
|
export let target: MachineTarget;
|
|
export let label: string;
|
|
export let onClose: () => void;
|
|
</script>
|
|
|
|
<Modal size="lg" ariaLabel={$i18n.t('Files on {{name}}', { name: label })} onRequestClose={onClose}>
|
|
<div class="p-4 text-base-900 dark:text-base-100">
|
|
<div class="mb-3 flex items-center justify-between gap-2">
|
|
<h2 class="min-w-0 truncate text-sm font-medium" title={label}>{label}</h2>
|
|
<button
|
|
type="button"
|
|
aria-label={$i18n.t('Close')}
|
|
class="shrink-0 text-base-500 hover:text-base-900 dark:hover:text-base-100"
|
|
on:click={onClose}><XMark className="size-4" /></button
|
|
>
|
|
</div>
|
|
<div class="h-[70dvh] min-h-0">
|
|
{#await import('$lib/components/chat/FileNav.svelte') then { default: FileNav }}
|
|
<FileNav {target} manageFileRequests={false} showTerminalDock={false} />
|
|
{/await}
|
|
</div>
|
|
</div>
|
|
</Modal>
|