From c32d41b47f9a332704e21319278beda99e3a4237 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 3 Apr 2024 21:24:57 -0700 Subject: [PATCH] refac: about --- backend/config.py | 6 +++++- src/lib/components/chat/Settings/About.svelte | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/config.py b/backend/config.py index b6c642a9e..39411d255 100644 --- a/backend/config.py +++ b/backend/config.py @@ -27,6 +27,7 @@ except ImportError: WEBUI_NAME = os.environ.get("WEBUI_NAME", "Open WebUI") WEBUI_FAVICON_URL = "https://openwebui.com/favicon.png" + shutil.copyfile("../build/favicon.png", "./static/favicon.png") #################################### @@ -149,6 +150,7 @@ log.setLevel(SRC_LOG_LEVELS["CONFIG"]) #################################### CUSTOM_NAME = os.environ.get("CUSTOM_NAME", "") + if CUSTOM_NAME: try: r = requests.get(f"https://api.openwebui.com/api/v1/custom/{CUSTOM_NAME}") @@ -171,7 +173,9 @@ if CUSTOM_NAME: except Exception as e: log.exception(e) pass - +else: + if WEBUI_NAME != "Open WebUI": + WEBUI_NAME += " (Open WebUI)" #################################### # DATA/FRONTEND BUILD DIR diff --git a/src/lib/components/chat/Settings/About.svelte b/src/lib/components/chat/Settings/About.svelte index 6014e9a9d..dad1f0ae6 100644 --- a/src/lib/components/chat/Settings/About.svelte +++ b/src/lib/components/chat/Settings/About.svelte @@ -130,7 +130,9 @@
- {$i18n.t('Created by')} + {#if !$WEBUI_NAME.includes('Open WebUI')} + {$WEBUI_NAME} - + {/if}{$i18n.t('Created by')}