From 950d026f1e36c56142802241e5c98000e408e309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 12 Feb 2022 23:23:04 +0100 Subject: [PATCH] [ui] pass editable/detail states down to BlobPreview --- webui/src/components/BrowseColumn.svelte | 1 + webui/src/components/Inspect.svelte | 3 ++- webui/src/components/display/BlobPreview.svelte | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/webui/src/components/BrowseColumn.svelte b/webui/src/components/BrowseColumn.svelte index 38a2ccc..5c014c0 100644 --- a/webui/src/components/BrowseColumn.svelte +++ b/webui/src/components/BrowseColumn.svelte @@ -52,6 +52,7 @@ {address} editable={editable || false} {index} + {detail} --preview-height={detail ? "50vh" : "20em"} on:resolved /> diff --git a/webui/src/components/Inspect.svelte b/webui/src/components/Inspect.svelte index 7dd58af..c3e6d36 100644 --- a/webui/src/components/Inspect.svelte +++ b/webui/src/components/Inspect.svelte @@ -16,6 +16,7 @@ export let address: string; export let index: number | undefined; + export let detail: boolean; export let editable = false; let indexStore = writable(index); @@ -201,7 +202,7 @@ {/if} - + {#if !$error} {#if Boolean($allTypeEntries)} diff --git a/webui/src/components/display/BlobPreview.svelte b/webui/src/components/display/BlobPreview.svelte index af12289..c97c9cd 100644 --- a/webui/src/components/display/BlobPreview.svelte +++ b/webui/src/components/display/BlobPreview.svelte @@ -4,7 +4,10 @@ import ImageViewer from "./blobs/ImageViewer.svelte"; import ModelViewer from "./blobs/ModelViewer.svelte"; import TextViewer from "./blobs/TextViewer.svelte"; + export let address: string; + export let editable: boolean; + export let detail: boolean; $: ({ entity, entityInfo } = useEntity(address)); @@ -70,7 +73,7 @@ {/if} {#if image}
- +
{/if} {#if pdf}