mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 06:42:47 +00:00
enh: model editor reset image
This commit is contained in:
parent
c465a37597
commit
e67fdce727
@ -317,6 +317,7 @@
|
||||
info.meta.profile_image_url = compressedSrc;
|
||||
|
||||
inputFiles = null;
|
||||
filesInputElement.value = '';
|
||||
};
|
||||
};
|
||||
|
||||
@ -345,7 +346,7 @@
|
||||
<div class="self-center md:self-start flex justify-center my-2 flex-shrink-0">
|
||||
<div class="self-center">
|
||||
<button
|
||||
class="rounded-2xl flex flex-shrink-0 items-center {info.meta.profile_image_url !==
|
||||
class="rounded-xl flex flex-shrink-0 items-center {info.meta.profile_image_url !==
|
||||
'/static/favicon.png'
|
||||
? 'bg-transparent'
|
||||
: 'bg-white'} shadow-xl group relative"
|
||||
@ -358,13 +359,13 @@
|
||||
<img
|
||||
src={info.meta.profile_image_url}
|
||||
alt="model profile"
|
||||
class="rounded-lg size-72 md:size-60 object-cover shrink-0"
|
||||
class="rounded-xl size-72 md:size-60 object-cover shrink-0"
|
||||
/>
|
||||
{:else}
|
||||
<img
|
||||
src="/static/favicon.png"
|
||||
alt="model profile"
|
||||
class=" rounded-lg size-72 md:size-60 object-cover shrink-0"
|
||||
class=" rounded-xl size-72 md:size-60 object-cover shrink-0"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@ -393,6 +394,18 @@
|
||||
class="absolute top-0 bottom-0 left-0 right-0 bg-white dark:bg-black rounded-lg opacity-0 group-hover:opacity-20 transition"
|
||||
></div>
|
||||
</button>
|
||||
|
||||
<div class="flex w-full mt-1 justify-end">
|
||||
<button
|
||||
class="px-2 py-1 text-gray-500 rounded-lg text-xs"
|
||||
on:click={() => {
|
||||
info.meta.profile_image_url = '/static/favicon.png';
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
Reset Image</button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user