rawshal commited on
Commit
bb61be2
Β·
verified Β·
1 Parent(s): 080b63d

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +12 -6
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 create `{file_path}` to activate this button.")
64
 
65
- col1, col2, col3 = st.columns(3)
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
- safe_link("pages/5_Site_Survey_Report.py", "Site Survey", "πŸ“‹")
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")