Skip to content

Commit

Permalink
Merge pull request #59 from milistu/chat-ui
Browse files Browse the repository at this point in the history
Fix light/dark logo switch.
  • Loading branch information
milistu authored Jun 11, 2024
2 parents 2dd0d79 + 0f84af0 commit 91aead4
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@
config = load_config()

# Determine the theme and set the appropriate logo
theme = st_theme()["base"]
print(f"orginal theme: {theme}")
if theme == "dark":
logo_url = LOGO_TEXT_DARK_URL
print(theme)
print("changed logo: ", logo_url)
else:
logo_url = LOGO_TEXT_LIGHT_URL
print(theme)
print("changed logo: ", logo_url)
theme_data = st_theme()
st.session_state.theme = (
theme_data["base"] if theme_data is not None else "default_theme"
)
logo_url = (
LOGO_TEXT_DARK_URL if st.session_state.theme == "dark" else LOGO_TEXT_LIGHT_URL
)

# Display the logo and set up the sidebar with useful information and links.
st.logo(logo_url, icon_image=LOGO_URL)
Expand Down

0 comments on commit 91aead4

Please sign in to comment.