diff --git a/backend/config.py b/backend/config.py index 4db04ea65..040a811ab 100644 --- a/backend/config.py +++ b/backend/config.py @@ -484,6 +484,19 @@ if CUSTOM_NAME: r.raw.decode_content = True shutil.copyfileobj(r.raw, f) + if "splash" in data: + url = ( + f"https://api.openwebui.com{data['splash']}" + if data["splash"][0] == "/" + else data["splash"] + ) + + r = requests.get(url, stream=True) + if r.status_code == 200: + with open(f"{STATIC_DIR}/splash.png", "wb") as f: + r.raw.decode_content = True + shutil.copyfileobj(r.raw, f) + WEBUI_NAME = data["name"] except Exception as e: log.exception(e) diff --git a/backend/static/splash.png b/backend/static/splash.png new file mode 100644 index 000000000..389196ca6 Binary files /dev/null and b/backend/static/splash.png differ diff --git a/src/app.html b/src/app.html index 8a650098d..a90859065 100644 --- a/src/app.html +++ b/src/app.html @@ -82,13 +82,13 @@ id="logo" style=" position: absolute; - width: 6rem; + width: auto; height: 6rem; top: 41%; left: 50%; margin-left: -3rem; " - src="/logo.svg" + src="/static/splash.png" /> <div @@ -107,8 +107,8 @@ > <img id="logo-her" - style="width: 13rem; height: 13rem" - src="/logo.svg" + style="width: auto; height: 13rem" + src="/static/splash.png" class="animate-pulse-fast" /> diff --git a/static/logo.svg b/static/logo.svg deleted file mode 100644 index ef638b340..000000000 --- a/static/logo.svg +++ /dev/null @@ -1,4 +0,0 @@ -<svg width="500" height="500" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg"> -<rect x="347.666" y="139" width="44.3349" height="221.675" fill="black"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M202.643 360.287C263.75 360.287 313.287 310.75 313.287 249.643C313.287 188.537 263.75 139 202.643 139C141.537 139 92 188.537 92 249.643C92 310.75 141.537 360.287 202.643 360.287ZM202.645 316.029C239.309 316.029 269.031 286.307 269.031 249.643C269.031 212.979 239.309 183.257 202.645 183.257C165.981 183.257 136.259 212.979 136.259 249.643C136.259 286.307 165.981 316.029 202.645 316.029Z" fill="black"/> -</svg> diff --git a/static/static/splash-dark.png b/static/static/splash-dark.png new file mode 100644 index 000000000..202c03f8e Binary files /dev/null and b/static/static/splash-dark.png differ diff --git a/static/static/splash.png b/static/static/splash.png new file mode 100644 index 000000000..389196ca6 Binary files /dev/null and b/static/static/splash.png differ