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
4925a653
Commit
4925a653
authored
Jun 04, 2024
by
Timothy J. Baek
Browse files
fix: banner z index
parent
85484392
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
backend/apps/socket/main.py
backend/apps/socket/main.py
+14
-16
src/lib/components/common/Banner.svelte
src/lib/components/common/Banner.svelte
+1
-1
No files found.
backend/apps/socket/main.py
View file @
4925a653
...
...
@@ -15,22 +15,20 @@ async def connect(sid, environ, auth):
print
(
"connect "
,
sid
)
user
=
None
data
=
decode_token
(
auth
[
"token"
])
if
data
is
not
None
and
"id"
in
data
:
user
=
Users
.
get_user_by_id
(
data
[
"id"
])
if
user
:
USER_POOL
[
sid
]
=
{
"id"
:
user
.
id
,
"name"
:
user
.
name
,
"email"
:
user
.
email
,
"role"
:
user
.
role
,
}
print
(
f
"user
{
user
.
name
}
(
{
user
.
id
}
) connected with session ID
{
sid
}
"
)
else
:
print
(
"Authentication failed. Disconnecting."
)
await
sio
.
disconnect
(
sid
)
if
auth
and
"token"
in
auth
:
data
=
decode_token
(
auth
[
"token"
])
if
data
is
not
None
and
"id"
in
data
:
user
=
Users
.
get_user_by_id
(
data
[
"id"
])
if
user
:
USER_POOL
[
sid
]
=
{
"id"
:
user
.
id
,
"name"
:
user
.
name
,
"email"
:
user
.
email
,
"role"
:
user
.
role
,
}
print
(
f
"user
{
user
.
name
}
(
{
user
.
id
}
) connected with session ID
{
sid
}
"
)
@
sio
.
event
...
...
src/lib/components/common/Banner.svelte
View file @
4925a653
...
...
@@ -39,7 +39,7 @@
{#if !dismissed}
{#if mounted}
<div
class=" top-0 left-0 right-0 p-2 mx-4 px-3 flex justify-center items-center relative rounded-xl border border-gray-50 dark:border-gray-850 text-gray-800 dark:text-gary-100 bg-white dark:bg-gray-900 backdrop-blur-xl z-
4
0"
class=" top-0 left-0 right-0 p-2 mx-4 px-3 flex justify-center items-center relative rounded-xl border border-gray-50 dark:border-gray-850 text-gray-800 dark:text-gary-100 bg-white dark:bg-gray-900 backdrop-blur-xl z-
3
0"
transition:fade={{ delay: 100, duration: 300 }}
>
<div class=" flex flex-col md:flex-row md:items-center flex-1 text-sm w-fit gap-1.5">
...
...
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