Update Home.py
Browse files
Home.py
CHANGED
|
@@ -35,6 +35,14 @@ st.logo("WERCORE logo.png")
|
|
| 35 |
|
| 36 |
# ββ 2. LOGIN SYSTEM βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 37 |
if not st.session_state.get("authenticated", False):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
col1, col2, col3 = st.columns([1, 2, 1])
|
| 39 |
with col2:
|
| 40 |
st.title("π Wercore Portal")
|
|
@@ -60,9 +68,9 @@ def safe_link(file_path, label, icon):
|
|
| 60 |
if os.path.exists(file_path):
|
| 61 |
st.page_link(file_path, label=label, icon=icon)
|
| 62 |
else:
|
| 63 |
-
st.warning(f"β οΈ **Missing File:** Please
|
| 64 |
|
| 65 |
-
col1, col2
|
| 66 |
|
| 67 |
with col1:
|
| 68 |
safe_link("pages/1_Water_Tank_Report.py", "Water Tank Disinfection", "π§")
|
|
@@ -72,10 +80,8 @@ with col1:
|
|
| 72 |
with col2:
|
| 73 |
safe_link("pages/2_Pest_Control_Report.py", "Pest Control Report", "πͺ³")
|
| 74 |
st.write("") # Spacer
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
with col3:
|
| 78 |
-
safe_link("pages/3_Termite_Control.py", "Termite Control", "π")
|
| 79 |
|
| 80 |
st.markdown("---")
|
| 81 |
st.caption("Β© 2026 Sterdil Labs")
|
|
|
|
| 35 |
|
| 36 |
# ββ 2. LOGIN SYSTEM βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 37 |
if not st.session_state.get("authenticated", False):
|
| 38 |
+
# CRITICAL FIX: Hide the sidebar and its toggle button entirely until logged in
|
| 39 |
+
st.markdown("""
|
| 40 |
+
<style>
|
| 41 |
+
[data-testid="stSidebar"] { display: none !important; }
|
| 42 |
+
[data-testid="collapsedControl"] { display: none !important; }
|
| 43 |
+
</style>
|
| 44 |
+
""", unsafe_allow_html=True)
|
| 45 |
+
|
| 46 |
col1, col2, col3 = st.columns([1, 2, 1])
|
| 47 |
with col2:
|
| 48 |
st.title("π Wercore Portal")
|
|
|
|
| 68 |
if os.path.exists(file_path):
|
| 69 |
st.page_link(file_path, label=label, icon=icon)
|
| 70 |
else:
|
| 71 |
+
st.warning(f"β οΈ **Missing File:** Please ensure `{file_path}` exists.")
|
| 72 |
|
| 73 |
+
col1, col2 = st.columns(2)
|
| 74 |
|
| 75 |
with col1:
|
| 76 |
safe_link("pages/1_Water_Tank_Report.py", "Water Tank Disinfection", "π§")
|
|
|
|
| 80 |
with col2:
|
| 81 |
safe_link("pages/2_Pest_Control_Report.py", "Pest Control Report", "πͺ³")
|
| 82 |
st.write("") # Spacer
|
| 83 |
+
# Updated to the correct exact filename you provided
|
| 84 |
+
safe_link("pages/3_Termite_Control_Report.py", "Termite Control Report", "π")
|
|
|
|
|
|
|
| 85 |
|
| 86 |
st.markdown("---")
|
| 87 |
st.caption("Β© 2026 Sterdil Labs")
|