From 4c414b37a6e359e04549f31d9ba9ac37e3ce1fb8 Mon Sep 17 00:00:00 2001
From: th-kim0823
Date: Mon, 27 Apr 2026 20:10:59 +0900
Subject: [PATCH] =?UTF-8?q?feat:=20admin=20stage=20=EC=A7=84=ED=96=89=20se?=
=?UTF-8?q?ction=20(=EC=9D=B4=EC=A0=84/=EC=A7=81=EC=A0=91/=EB=8B=A4?=
=?UTF-8?q?=EC=9D=8C)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-Authored-By: Claude Sonnet 4.6
---
app.py | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/app.py b/app.py
index 946ca66..b140e1a 100644
--- a/app.py
+++ b/app.py
@@ -612,6 +612,40 @@ def render_admin():
except FileNotFoundError:
st.warning(f"νμΌ μμ: {DATA_PATH}")
+ st.divider()
+ st.subheader("π¬ Stage μ§ν")
+ cur = get_stage()
+ st.markdown(f"**νμ¬ stage:** `{cur}`")
+
+ stage_order = list(VALID_STAGES) # ("intro", "topics", "vote")
+ idx = stage_order.index(cur) if cur in stage_order else 0
+
+ sc1, sc2, sc3 = st.columns(3)
+ with sc1:
+ if st.button("β μ΄μ stage", disabled=(idx == 0)):
+ set_stage(stage_order[idx - 1])
+ st.rerun()
+ with sc2:
+ chosen = st.radio(
+ "μ§μ μ ν",
+ stage_order,
+ index=idx,
+ horizontal=True,
+ label_visibility="collapsed",
+ key="stage_radio",
+ )
+ if chosen != cur:
+ if st.button("μ μ©", key="stage_apply"):
+ set_stage(chosen)
+ st.rerun()
+ with sc3:
+ if st.button("λ€μ stage β", disabled=(idx == len(stage_order) - 1)):
+ set_stage(stage_order[idx + 1])
+ st.rerun()
+
+ if cur == "vote":
+ st.caption("βΉοΈ vote stage μ§μ
μ ν¬νκ° μλ open λ¨. λ§κ°μ μλ 'ν¬ν λ§κ°' λ²νΌμΌλ‘.")
+
voting_open = is_voting_open()
cur_label = "π’ ν¬ν μ§ν μ€" if voting_open else "π΄ ν¬ν λ§κ°λ¨"
st.markdown(f"### ν¬ν μν: {cur_label}")