Timothy Jaeryang Baek 2 mesiacov pred
rodič
commit
84289b9a8d
2 zmenil súbory, kde vykonal 28 pridanie a 12 odobranie
  1. 4 1
      backend/open_webui/main.py
  2. 24 11
      src/routes/auth/+page.svelte

+ 4 - 1
backend/open_webui/main.py

@@ -1657,7 +1657,10 @@ async def get_app_config(request: Request):
                         "metadata": {
                             "login_footer": app.state.LICENSE_METADATA.get(
                                 "login_footer", ""
-                            )
+                            ),
+                            "auth_logo_position": app.state.LICENSE_METADATA.get(
+                                "auth_logo_position", ""
+                            ),
                         }
                     }
                     if app.state.LICENSE_METADATA

+ 24 - 11
src/routes/auth/+page.svelte

@@ -206,6 +206,17 @@
 				{:else}
 					<div class="my-auto flex flex-col justify-center items-center">
 						<div class=" sm:max-w-md my-auto pb-10 w-full dark:text-gray-100">
+							{#if $config?.metadata?.auth_logo_position === 'center'}
+								<div class="flex justify-center mb-6">
+									<img
+										id="logo"
+										crossorigin="anonymous"
+										src="{WEBUI_BASE_URL}/static/favicon.png"
+										class="size-24 rounded-full"
+										alt=""
+									/>
+								</div>
+							{/if}
 							<form
 								class=" flex flex-col justify-center"
 								on:submit={(e) => {
@@ -529,18 +540,20 @@
 			</div>
 		</div>
 
-		<div class="fixed m-10 z-50">
-			<div class="flex space-x-2">
-				<div class=" self-center">
-					<img
-						id="logo"
-						crossorigin="anonymous"
-						src="{WEBUI_BASE_URL}/static/favicon.png"
-						class=" w-6 rounded-full"
-						alt=""
-					/>
+		{#if !$config?.metadata?.auth_logo_position}
+			<div class="fixed m-10 z-50">
+				<div class="flex space-x-2">
+					<div class=" self-center">
+						<img
+							id="logo"
+							crossorigin="anonymous"
+							src="{WEBUI_BASE_URL}/static/favicon.png"
+							class=" w-6 rounded-full"
+							alt=""
+						/>
+					</div>
 				</div>
 			</div>
-		</div>
+		{/if}
 	{/if}
 </div>