refac
This commit is contained in:
1 parent
2978a03c68
commit
06e7aac219
2 files changed
+61
-60
No files matched your search
@@ -607,58 +607,72 @@
|
|||||||
<!-- LICENSE covers this Open WebUI fallback logo.
|
<!-- LICENSE covers this Open WebUI fallback logo.
|
||||||
Do not alter, remove, obscure, or replace it except as LICENSE permits:
|
Do not alter, remove, obscure, or replace it except as LICENSE permits:
|
||||||
https://docs.openwebui.com/license. -->
|
https://docs.openwebui.com/license. -->
|
||||||
<button
|
<div class="group relative size-12 shrink-0 md:size-14">
|
||||||
class="group relative flex size-12 shrink-0 items-center overflow-hidden rounded-xl md:size-14 {info
|
<button
|
||||||
.meta.profile_image_url !== `${WEBUI_BASE_URL}/static/favicon.png`
|
class="group relative flex size-full items-center overflow-hidden rounded-xl {info
|
||||||
? 'bg-transparent'
|
.meta.profile_image_url !== `${WEBUI_BASE_URL}/static/favicon.png`
|
||||||
: 'bg-gray-50 dark:bg-gray-850'} ring-1 ring-gray-200/70 transition hover:ring-gray-300 dark:ring-white/10 dark:hover:ring-white/20"
|
? 'bg-transparent'
|
||||||
type="button"
|
: 'bg-gray-50 dark:bg-gray-850'} ring-1 ring-gray-200/70 transition hover:ring-gray-300 dark:ring-white/10 dark:hover:ring-white/20"
|
||||||
aria-label={$i18n.t('Upload profile image')}
|
type="button"
|
||||||
on:click={() => {
|
aria-label={$i18n.t('Upload profile image')}
|
||||||
filesInputElement.click();
|
on:click={() => {
|
||||||
}}
|
filesInputElement.click();
|
||||||
>
|
}}
|
||||||
{#if info.meta.profile_image_url}
|
|
||||||
<img
|
|
||||||
src={info.meta.profile_image_url}
|
|
||||||
alt="model profile"
|
|
||||||
class="size-full object-cover"
|
|
||||||
/>
|
|
||||||
{:else}
|
|
||||||
<img
|
|
||||||
src="{WEBUI_BASE_URL}/static/favicon.png"
|
|
||||||
alt="model profile"
|
|
||||||
class="size-full object-cover"
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="absolute bottom-0 right-0 z-10 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100"
|
|
||||||
>
|
>
|
||||||
<div class="m-1">
|
{#if info.meta.profile_image_url}
|
||||||
<div
|
<img
|
||||||
class="rounded-full bg-gray-900 p-1 text-white shadow-sm transition dark:bg-white dark:text-black"
|
src={info.meta.profile_image_url}
|
||||||
>
|
alt="model profile"
|
||||||
<svg
|
class="size-full object-cover"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
/>
|
||||||
viewBox="0 0 16 16"
|
{:else}
|
||||||
fill="currentColor"
|
<img
|
||||||
class="size-3"
|
src="{WEBUI_BASE_URL}/static/favicon.png"
|
||||||
|
alt="model profile"
|
||||||
|
class="size-full object-cover"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="absolute bottom-0 right-0 z-10 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100"
|
||||||
|
>
|
||||||
|
<div class="m-1">
|
||||||
|
<div
|
||||||
|
class="rounded-full bg-gray-900 p-1 text-white shadow-sm transition dark:bg-white dark:text-black"
|
||||||
>
|
>
|
||||||
<path
|
<svg
|
||||||
fill-rule="evenodd"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
d="M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm10.5 5.707a.5.5 0 0 0-.146-.353l-1-1a.5.5 0 0 0-.708 0L9.354 9.646a.5.5 0 0 1-.708 0L6.354 7.354a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0-.146.353V12a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V9.707ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
|
viewBox="0 0 16 16"
|
||||||
clip-rule="evenodd"
|
fill="currentColor"
|
||||||
/>
|
class="size-3"
|
||||||
</svg>
|
>
|
||||||
|
<path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
d="M2 4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm10.5 5.707a.5.5 0 0 0-.146-.353l-1-1a.5.5 0 0 0-.708 0L9.354 9.646a.5.5 0 0 1-.708 0L6.354 7.354a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0-.146.353V12a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V9.707ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-white opacity-0 transition group-hover:opacity-20 dark:bg-black"
|
class="absolute inset-0 bg-white opacity-0 transition group-hover:opacity-20 dark:bg-black"
|
||||||
></div>
|
></div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{#if info.meta.profile_image_url && info.meta.profile_image_url !== `${WEBUI_BASE_URL}/static/favicon.png`}
|
||||||
|
<button
|
||||||
|
class="absolute left-1/2 top-full mt-1 -translate-x-1/2 text-[0.5rem] leading-none text-gray-400 opacity-0 transition group-hover:opacity-60 hover:text-gray-500 hover:opacity-100 group-focus-within:opacity-60 dark:text-gray-600 dark:hover:text-gray-400"
|
||||||
|
on:click={() => {
|
||||||
|
info.meta.profile_image_url = `${WEBUI_BASE_URL}/static/favicon.png`;
|
||||||
|
}}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{$i18n.t('Reset')}</button
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<div class="flex min-w-0 items-center gap-2">
|
<div class="flex min-w-0 items-center gap-2">
|
||||||
@@ -687,18 +701,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex w-full -mt-1">
|
|
||||||
<button
|
|
||||||
class="px-2 py-1 text-gray-500 rounded-lg text-xs"
|
|
||||||
on:click={() => {
|
|
||||||
info.meta.profile_image_url = `${WEBUI_BASE_URL}/static/favicon.png`;
|
|
||||||
}}
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
{$i18n.t('Reset Image')}</button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{#if preset}
|
{#if preset}
|
||||||
<div>
|
<div>
|
||||||
<div class="mb-1 text-xs text-gray-400 dark:text-gray-600">
|
<div class="mb-1 text-xs text-gray-400 dark:text-gray-600">
|
||||||
|
|||||||
@@ -2224,7 +2224,6 @@
|
|||||||
"Reset all permissions to their initial configuration values": "",
|
"Reset all permissions to their initial configuration values": "",
|
||||||
"Reset Defaults": "",
|
"Reset Defaults": "",
|
||||||
"Reset group permissions to match the current default user permissions": "",
|
"Reset group permissions to match the current default user permissions": "",
|
||||||
"Reset Image": "",
|
|
||||||
"Reset knowledge base?": "",
|
"Reset knowledge base?": "",
|
||||||
"Reset persisted files": "",
|
"Reset persisted files": "",
|
||||||
"Reset to Defaults": "",
|
"Reset to Defaults": "",
|
||||||
|
|||||||
Reference in new issue
Block a user