Update Home.py
Browse files
Home.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
# ββ 1. CONFIG & ASSETS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 4 |
st.set_page_config(page_title="Wercore | App Generator", page_icon="π’", layout="wide")
|
|
@@ -39,7 +40,6 @@ if not st.session_state.get("authenticated", False):
|
|
| 39 |
st.title("π Wercore Portal")
|
| 40 |
st.info("Please log in to access the reporting engines.")
|
| 41 |
|
| 42 |
-
# Change "admin123" to whatever password you want your team to use
|
| 43 |
password = st.text_input("Master Password", type="password")
|
| 44 |
if st.button("Secure Login", type="primary", use_container_width=True):
|
| 45 |
if password == "admin123":
|
|
@@ -54,21 +54,28 @@ st.title("Wercore App Generator")
|
|
| 54 |
st.markdown("Select a reporting engine below to begin generating compliance documentation.")
|
| 55 |
st.markdown("---")
|
| 56 |
|
| 57 |
-
# ββ 4. NAVIGATION GRID ββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
col1, col2, col3 = st.columns(3)
|
| 59 |
|
| 60 |
with col1:
|
| 61 |
-
|
| 62 |
st.write("") # Spacer
|
| 63 |
-
|
| 64 |
|
| 65 |
with col2:
|
| 66 |
-
|
| 67 |
st.write("") # Spacer
|
| 68 |
-
|
| 69 |
|
| 70 |
with col3:
|
| 71 |
-
|
| 72 |
|
| 73 |
st.markdown("---")
|
| 74 |
st.caption("Β© 2026 Sterdil Labs")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import os
|
| 3 |
|
| 4 |
# ββ 1. CONFIG & ASSETS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 5 |
st.set_page_config(page_title="Wercore | App Generator", page_icon="π’", layout="wide")
|
|
|
|
| 40 |
st.title("π Wercore Portal")
|
| 41 |
st.info("Please log in to access the reporting engines.")
|
| 42 |
|
|
|
|
| 43 |
password = st.text_input("Master Password", type="password")
|
| 44 |
if st.button("Secure Login", type="primary", use_container_width=True):
|
| 45 |
if password == "admin123":
|
|
|
|
| 54 |
st.markdown("Select a reporting engine below to begin generating compliance documentation.")
|
| 55 |
st.markdown("---")
|
| 56 |
|
| 57 |
+
# ββ 4. NAVIGATION GRID (CRASH-PROOF) ββββββββββββββββββββββββββββββββββββββββββ
|
| 58 |
+
# This function stops the app from crashing if a file name is misspelled
|
| 59 |
+
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", "π§")
|
| 69 |
st.write("") # Spacer
|
| 70 |
+
safe_link("pages/4_Pipeline_Disinfection.py", "Pipeline Disinfection", "π°")
|
| 71 |
|
| 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")
|