Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ st.set_page_config(
|
|
| 24 |
# =========================================================
|
| 25 |
# PASSWORD GATE
|
| 26 |
# =========================================================
|
| 27 |
-
APP_PASSWORD =
|
| 28 |
|
| 29 |
if "authed" not in st.session_state:
|
| 30 |
st.session_state.authed = False
|
|
@@ -51,19 +51,25 @@ if not st.session_state.authed:
|
|
| 51 |
)
|
| 52 |
|
| 53 |
st.markdown('<div class="login-title">IGPA Legislation Explorer</div>', unsafe_allow_html=True)
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
unsafe_allow_html=True,
|
| 57 |
)
|
| 58 |
|
| 59 |
_, center_col, _ = st.columns([1, 1.2, 1])
|
| 60 |
|
| 61 |
with center_col:
|
| 62 |
-
pw = st.text_input("
|
| 63 |
if st.button("Enter", use_container_width=True):
|
| 64 |
if not APP_PASSWORD:
|
| 65 |
st.error("Server misconfigured: APP_PASSWORD not set in Space secrets.")
|
| 66 |
-
elif pw == APP_PASSWORD:
|
| 67 |
st.session_state.authed = True
|
| 68 |
st.rerun()
|
| 69 |
else:
|
|
|
|
| 24 |
# =========================================================
|
| 25 |
# PASSWORD GATE
|
| 26 |
# =========================================================
|
| 27 |
+
APP_PASSWORD = "bills"
|
| 28 |
|
| 29 |
if "authed" not in st.session_state:
|
| 30 |
st.session_state.authed = False
|
|
|
|
| 51 |
)
|
| 52 |
|
| 53 |
st.markdown('<div class="login-title">IGPA Legislation Explorer</div>', unsafe_allow_html=True)
|
| 54 |
+
st.markdown(
|
| 55 |
+
"""
|
| 56 |
+
<div class="login-subtitle">
|
| 57 |
+
🔐 Quick riddle to enter:<br><br>
|
| 58 |
+
<b>“What do lawmakers pass to create laws?”</b><br><br>
|
| 59 |
+
<span style="opacity:0.8;">Answer format: all lowercase, one word</span>
|
| 60 |
+
</div>
|
| 61 |
+
""",
|
| 62 |
unsafe_allow_html=True,
|
| 63 |
)
|
| 64 |
|
| 65 |
_, center_col, _ = st.columns([1, 1.2, 1])
|
| 66 |
|
| 67 |
with center_col:
|
| 68 |
+
pw = st.text_input("Your answer", type="password")
|
| 69 |
if st.button("Enter", use_container_width=True):
|
| 70 |
if not APP_PASSWORD:
|
| 71 |
st.error("Server misconfigured: APP_PASSWORD not set in Space secrets.")
|
| 72 |
+
elif pw.strip().lower() == APP_PASSWORD:
|
| 73 |
st.session_state.authed = True
|
| 74 |
st.rerun()
|
| 75 |
else:
|