diff --git a/finance_tracker/web/app.py b/finance_tracker/web/app.py index fced04f..b251b4c 100644 --- a/finance_tracker/web/app.py +++ b/finance_tracker/web/app.py @@ -12,6 +12,7 @@ """ import json import streamlit as st +import streamlit.components.v1 as st_components import os from finance_tracker.web.db import get_session, get_db_path, get_engine from finance_tracker.web.navigation import build_pages @@ -118,14 +119,18 @@ def render_db_manager(): st.rerun() # Animated arrow hinting at the sidebar toggle after 20 s of inactivity. - # Injected into document.body via JS so it survives Streamlit re-renders. + # Uses st_components.html (iframe) so the script actually executes — + # st.markdown strips """, unsafe_allow_html=True) +""", height=0) # Show documentation (needs no DB) so users aren't stranded on a blank page from finance_tracker.web.views.documentation import render as doc_render