This commit is contained in:
@@ -1,17 +1,27 @@
|
||||
import streamlit as st
|
||||
from pandas.core.ops.docstrings import key
|
||||
from pandas.io.formats.style import Styler
|
||||
|
||||
import queries.crud as crud
|
||||
import themes as th
|
||||
|
||||
is_login_enabled = hasattr(st, 'user') and hasattr(st.user, 'is_logged_in')
|
||||
is_logged_in = is_login_enabled and st.user.is_logged_in
|
||||
|
||||
st.title("Settings")
|
||||
|
||||
if hasattr(st.session_state, 'user_name'):
|
||||
st.markdown(f"Currently logged in as **{st.session_state.user_name}**")
|
||||
|
||||
|
||||
st.header("Theme")
|
||||
themes = st.session_state.themes
|
||||
with st.container(horizontal=True, width="stretch"):
|
||||
for theme in ["light", "dark"]:
|
||||
if st.button(label=themes[theme]["button_face_label"],
|
||||
icon = themes[theme]["button_face_icon"],
|
||||
disabled = (theme == st.session_state.current_theme),
|
||||
width = "stretch"):
|
||||
th.change_theme(theme)
|
||||
st.rerun()
|
||||
|
||||
st.header("Colors")
|
||||
with st.container(key="settings-color-selector"):
|
||||
palettes = crud.get_color_palettes()
|
||||
|
||||
Reference in New Issue
Block a user