mirror of
https://github.com/open-webui/open-webui
synced 2025-01-17 00:08:36 +00:00
ff9fdc2f88
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Integration Test / Run Cypress Integration Tests (push) Waiting to run
Integration Test / Run Migration Tests (push) Waiting to run
27 lines
606 B
Svelte
27 lines
606 B
Svelte
<script lang="ts">
|
|
import { WEBUI_BASE_URL } from '$lib/constants';
|
|
import ImagePreview from './ImagePreview.svelte';
|
|
|
|
export let src = '';
|
|
export let alt = '';
|
|
|
|
export let className = ' w-full';
|
|
export let imageClassName = 'rounded-lg';
|
|
|
|
let _src = '';
|
|
$: _src = src.startsWith('/') ? `${WEBUI_BASE_URL}${src}` : src;
|
|
|
|
let showImagePreview = false;
|
|
</script>
|
|
|
|
<button
|
|
class={className}
|
|
on:click={() => {
|
|
showImagePreview = true;
|
|
}}
|
|
>
|
|
<img src={_src} {alt} class={imageClassName} draggable="false" data-cy="image" />
|
|
</button>
|
|
|
|
<ImagePreview bind:show={showImagePreview} src={_src} {alt} />
|