Commit 37b117a8 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix: styling

parent ab6346ea
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
{/if} {/if}
<div <div
class="prose chat-{message.role} w-full max-w-full dark:prose-invert whitespace-pre-line" class="prose chat-{message.role} w-full max-w-full dark:prose-invert prose-p:my-0 prose-img:my-0 whitespace-pre-line"
> >
<div> <div>
{#if (message?.statusHistory ?? [...(message?.status ? [message?.status] : [])]).length > 0} {#if (message?.statusHistory ?? [...(message?.status ? [message?.status] : [])]).length > 0}
......
...@@ -5,21 +5,26 @@ ...@@ -5,21 +5,26 @@
export let src = ''; export let src = '';
export let alt = ''; export let alt = '';
let _src = ''; export let className = '';
let _src = '';
$: _src = src.startsWith('/') ? `${WEBUI_BASE_URL}${src}` : src; $: _src = src.startsWith('/') ? `${WEBUI_BASE_URL}${src}` : src;
let showImagePreview = false; let showImagePreview = false;
</script> </script>
<div> <div class={className}>
<button <!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<img
on:click={() => { on:click={() => {
showImagePreview = true; showImagePreview = true;
}} }}
class=" w-fit" src={_src}
> {alt}
<img src={_src} {alt} class=" max-h-96 rounded-lg w-full" draggable="false" data-cy="image" /> class=" rounded-lg"
</button> draggable="false"
data-cy="image"
/>
</div> </div>
<ImagePreview bind:show={showImagePreview} src={_src} {alt} /> <ImagePreview bind:show={showImagePreview} src={_src} {alt} />
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment