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}")