feat: update admin panel keyboard structure and registration button logic

- Updated admin panel keyboard to match admin_panel.py handlers
- Changed registration button logic: show only for unregistered non-admins
- Added missing methods to IBotController interface
- Updated get_main_keyboard to accept is_registered parameter
- Simplified admin panel structure with proper callback routing
- Removed test callback button from production UI
- Created ADMIN_PANEL_STRUCTURE.md and ADMIN_PANEL_TESTING.md documentation
This commit is contained in:
2025-11-17 07:50:08 +09:00
parent 0dc0ae8111
commit 0fdf01d1c7
8 changed files with 582 additions and 33 deletions

View File

@@ -134,6 +134,26 @@ class IBotController(ABC):
async def handle_admin_panel(self, callback):
"""Обработать admin panel"""
pass
@abstractmethod
async def handle_lottery_management(self, callback):
"""Обработать управление розыгрышами"""
pass
@abstractmethod
async def handle_conduct_lottery_admin(self, callback):
"""Обработать выбор розыгрыша для проведения"""
pass
@abstractmethod
async def handle_active_lotteries(self, callback):
"""Обработать показ активных розыгрышей"""
pass
@abstractmethod
async def handle_conduct_lottery(self, callback):
"""Обработать проведение конкретного розыгрыша"""
pass
class IMessageFormatter(ABC):
@@ -154,7 +174,7 @@ class IKeyboardBuilder(ABC):
"""Интерфейс создания клавиатур"""
@abstractmethod
def get_main_keyboard(self, is_admin: bool):
def get_main_keyboard(self, is_admin: bool, is_registered: bool = False):
"""Получить главную клавиатуру"""
pass