mirror of
https://github.com/open-webui/open-webui
synced 2025-05-24 06:44:24 +00:00
Merge pull request #5436 from khanh-alice/fix-transparent-icons
fix: model transparent icons
This commit is contained in:
commit
40d7e5089d
@ -322,7 +322,7 @@
|
||||
>
|
||||
<div class=" self-start w-8 pt-0.5">
|
||||
<div
|
||||
class=" rounded-full bg-stone-700 {(model?.info?.meta?.hidden ?? false)
|
||||
class=" rounded-full object-cover {(model?.info?.meta?.hidden ?? false)
|
||||
? 'brightness-90 dark:brightness-50'
|
||||
: ''} "
|
||||
>
|
||||
|
@ -311,7 +311,7 @@
|
||||
ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight);
|
||||
|
||||
// Get the base64 representation of the compressed image
|
||||
const compressedSrc = canvas.toDataURL('image/jpeg');
|
||||
const compressedSrc = canvas.toDataURL();
|
||||
|
||||
// Display the compressed image
|
||||
info.meta.profile_image_url = compressedSrc;
|
||||
@ -323,7 +323,7 @@
|
||||
if (
|
||||
inputFiles &&
|
||||
inputFiles.length > 0 &&
|
||||
['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type'])
|
||||
['image/gif', 'image/webp', 'image/jpeg', 'image/png', 'image/svg+xml'].includes(inputFiles[0]['type'])
|
||||
) {
|
||||
reader.readAsDataURL(inputFiles[0]);
|
||||
} else {
|
||||
@ -368,7 +368,7 @@
|
||||
<button
|
||||
class=" {info.meta.profile_image_url
|
||||
? ''
|
||||
: 'p-4'} rounded-full dark:bg-gray-700 border border-dashed border-gray-200 flex items-center"
|
||||
: 'p-4'} rounded-full border border-dashed border-gray-200 flex items-center"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
filesInputElement.click();
|
||||
|
@ -238,7 +238,7 @@
|
||||
ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight);
|
||||
|
||||
// Get the base64 representation of the compressed image
|
||||
const compressedSrc = canvas.toDataURL('image/jpeg');
|
||||
const compressedSrc = canvas.toDataURL();
|
||||
|
||||
// Display the compressed image
|
||||
info.meta.profile_image_url = compressedSrc;
|
||||
@ -250,7 +250,7 @@
|
||||
if (
|
||||
inputFiles &&
|
||||
inputFiles.length > 0 &&
|
||||
['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type'])
|
||||
['image/gif', 'image/webp', 'image/jpeg', 'image/png', 'image/svg+xml'].includes(inputFiles[0]['type'])
|
||||
) {
|
||||
reader.readAsDataURL(inputFiles[0]);
|
||||
} else {
|
||||
@ -295,7 +295,7 @@
|
||||
<button
|
||||
class=" {info.meta.profile_image_url
|
||||
? ''
|
||||
: 'p-4'} rounded-full dark:bg-gray-700 border border-dashed border-gray-200 flex items-center"
|
||||
: 'p-4'} rounded-full border border-dashed border-gray-200 flex items-center"
|
||||
type="button"
|
||||
on:click={() => {
|
||||
filesInputElement.click();
|
||||
|
Loading…
Reference in New Issue
Block a user