forked from open-webui/open-webui
Merge pull request #254 from ollama-webui/fix-drag-and-drop-overlay
fix: file drag and drop overlay
This commit is contained in:
commit
8cd93a4e1e
2 changed files with 18 additions and 4 deletions
|
@ -132,13 +132,13 @@
|
|||
|
||||
{#if dragged}
|
||||
<div
|
||||
class="absolute w-full h-full flex z-50 touch-none pointer-events-none"
|
||||
class="fixed w-full h-full flex z-50 touch-none pointer-events-none"
|
||||
id="dropzone"
|
||||
role="region"
|
||||
aria-label="Drag and Drop Container"
|
||||
>
|
||||
<div class="absolute rounded-xl w-full h-full backdrop-blur bg-gray-800/40 flex justify-center">
|
||||
<div class="m-auto pt-48 flex flex-col justify-center">
|
||||
<div class="m-auto pt-64 flex flex-col justify-center">
|
||||
<div class="max-w-md">
|
||||
<div class=" text-center text-6xl mb-3">🏞️</div>
|
||||
<div class="text-center dark:text-white text-2xl font-semibold z-50">Add Images</div>
|
||||
|
|
|
@ -362,9 +362,19 @@
|
|||
<div class="m-auto text-center max-w-md pb-56 px-2">
|
||||
<div class="flex justify-center mt-8">
|
||||
{#if selectedModelfile && selectedModelfile.imageUrl}
|
||||
<img src={selectedModelfile?.imageUrl} class=" w-20 mb-2 rounded-full" />
|
||||
<img
|
||||
src={selectedModelfile?.imageUrl}
|
||||
alt="modelfile"
|
||||
class=" w-20 mb-2 rounded-full"
|
||||
draggable="false"
|
||||
/>
|
||||
{:else}
|
||||
<img src="/ollama.png" class=" w-16 invert-[10%] dark:invert-[100%] rounded-full" />
|
||||
<img
|
||||
src="/ollama.png"
|
||||
class=" w-16 invert-[10%] dark:invert-[100%] rounded-full"
|
||||
alt="ollama"
|
||||
draggable="false"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
<div class=" mt-2 text-2xl text-gray-800 dark:text-gray-100 font-semibold">
|
||||
|
@ -401,12 +411,14 @@
|
|||
src="{$settings.gravatarUrl ? $settings.gravatarUrl : '/user'}.png"
|
||||
class=" max-w-[28px] object-cover rounded-full"
|
||||
alt="User profile"
|
||||
draggable="false"
|
||||
/>
|
||||
{:else}
|
||||
<img
|
||||
src={$user ? $user.profile_image_url : '/user.png'}
|
||||
class=" max-w-[28px] object-cover rounded-full"
|
||||
alt="User profile"
|
||||
draggable="false"
|
||||
/>
|
||||
{/if}
|
||||
{:else if selectedModelfile}
|
||||
|
@ -414,12 +426,14 @@
|
|||
src={selectedModelfile?.imageUrl ?? '/favicon.png'}
|
||||
class=" max-w-[28px] object-cover rounded-full"
|
||||
alt="Ollama profile"
|
||||
draggable="false"
|
||||
/>
|
||||
{:else}
|
||||
<img
|
||||
src="/favicon.png"
|
||||
class=" max-w-[28px] object-cover rounded-full"
|
||||
alt="Ollama profile"
|
||||
draggable="false"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue