fix(gui): move Quit button to sidebar so it shows on every page
The footer placement was easy to miss (below all tool cards) and only rendered on the home page. Hook the button into hide_streamlit_chrome() so every page that hides default chrome — home + all 9 tool pages — gets the Quit button at the bottom of the sidebar without per-page edits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,6 @@ if str(_project_root) not in sys.path:
|
||||
from src.gui.components import (
|
||||
findings_count_for_tool,
|
||||
hide_streamlit_chrome,
|
||||
quit_button,
|
||||
upload_and_analyze_section,
|
||||
)
|
||||
|
||||
@@ -88,11 +87,7 @@ for row_start in range(0, len(TOOLS), 3):
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
st.divider()
|
||||
footer_left, footer_right = st.columns([4, 1])
|
||||
with footer_left:
|
||||
st.caption(
|
||||
"Runs locally. Your data never leaves this computer. "
|
||||
"| DataTools v3.0"
|
||||
)
|
||||
with footer_right:
|
||||
quit_button()
|
||||
|
||||
@@ -71,8 +71,16 @@ footer {
|
||||
|
||||
|
||||
def hide_streamlit_chrome() -> None:
|
||||
"""Inject CSS to hide Streamlit's default header, menu, and footer."""
|
||||
"""Inject CSS to hide Streamlit's default header, menu, and footer.
|
||||
|
||||
Also renders a Quit button at the bottom of the sidebar so every page
|
||||
that hides the default chrome still has a clean way to shut the
|
||||
server down.
|
||||
"""
|
||||
st.markdown(_HIDE_CHROME_CSS, unsafe_allow_html=True)
|
||||
with st.sidebar:
|
||||
st.markdown("---")
|
||||
quit_button(key="quit_app_button_sidebar")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user