Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
c2f4eab8
Commit
c2f4eab8
authored
Jul 08, 2024
by
Timothy J. Baek
Browse files
refac: splash screen
parent
47c76ab5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
backend/config.py
backend/config.py
+13
-0
backend/static/splash.png
backend/static/splash.png
+0
-0
src/app.html
src/app.html
+4
-4
static/logo.svg
static/logo.svg
+0
-4
static/static/splash-dark.png
static/static/splash-dark.png
+0
-0
static/static/splash.png
static/static/splash.png
+0
-0
No files found.
backend/config.py
View file @
c2f4eab8
...
@@ -484,6 +484,19 @@ if CUSTOM_NAME:
...
@@ -484,6 +484,19 @@ if CUSTOM_NAME:
r
.
raw
.
decode_content
=
True
r
.
raw
.
decode_content
=
True
shutil
.
copyfileobj
(
r
.
raw
,
f
)
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"
]
WEBUI_NAME
=
data
[
"name"
]
except
Exception
as
e
:
except
Exception
as
e
:
log
.
exception
(
e
)
log
.
exception
(
e
)
...
...
backend/static/splash.png
0 → 100644
View file @
c2f4eab8
5.12 KB
src/app.html
View file @
c2f4eab8
...
@@ -82,13 +82,13 @@
...
@@ -82,13 +82,13 @@
id=
"logo"
id=
"logo"
style=
"
style=
"
position: absolute;
position: absolute;
width:
6rem
;
width:
auto
;
height: 6rem;
height: 6rem;
top: 41%;
top: 41%;
left: 50%;
left: 50%;
margin-left: -3rem;
margin-left: -3rem;
"
"
src=
"/
logo.sv
g"
src=
"/
static/splash.pn
g"
/>
/>
<div
<div
...
@@ -107,8 +107,8 @@
...
@@ -107,8 +107,8 @@
>
>
<img
<img
id=
"logo-her"
id=
"logo-her"
style=
"width:
13rem
; height: 13rem"
style=
"width:
auto
; height: 13rem"
src=
"/
logo.sv
g"
src=
"/
static/splash.pn
g"
class=
"animate-pulse-fast"
class=
"animate-pulse-fast"
/>
/>
...
...
static/logo.svg
deleted
100644 → 0
View file @
47c76ab5
<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>
static/static/splash-dark.png
0 → 100644
View file @
c2f4eab8
5.29 KB
static/static/splash.png
0 → 100644
View file @
c2f4eab8
5.12 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment