From f66d4a482dd1ee119d3ab6d8d0a9a71e21680ac2 Mon Sep 17 00:00:00 2001 From: benya Date: Sat, 7 Feb 2026 23:43:45 +0300 Subject: [PATCH] Use single up/down button per project --- handlers/arcane.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handlers/arcane.py b/handlers/arcane.py index 572013b..c28c675 100644 --- a/handlers/arcane.py +++ b/handlers/arcane.py @@ -21,10 +21,12 @@ def _arcane_kb(page: int, total_pages: int, items: list[dict]) -> InlineKeyboard pid = p.get("id", "") if not pid: continue + status = p.get("status", "unknown") + action = "down" if status == "running" else "up" + action_text = "⏹" if action == "down" else "▶️" rows.append([ InlineKeyboardButton(text=f"🔄 {name}", callback_data=f"arcane:restart:{pid}"), - InlineKeyboardButton(text="▶️", callback_data=f"arcane:up:{pid}"), - InlineKeyboardButton(text="⏹", callback_data=f"arcane:down:{pid}"), + InlineKeyboardButton(text=action_text, callback_data=f"arcane:{action}:{pid}"), ]) nav = []