♻️ time_slots: emoji заменены на текстовые метки [X]/[V]
- Эмодзи нестабильно передаются через файловые каналы, заменены на ASCII - menu.py: эмодзи заменены на [текст] для совместимости
This commit is contained in:
+7
-12
@@ -1,25 +1,20 @@
|
|||||||
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
|
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
|
||||||
|
|
||||||
# Главное меню
|
|
||||||
menu = ReplyKeyboardMarkup(
|
menu = ReplyKeyboardMarkup(
|
||||||
keyboard=[
|
keyboard=[
|
||||||
[KeyboardButton(text="📅 Записаться")],
|
[KeyboardButton(text="/start")],
|
||||||
[
|
[KeyboardButton(text="[services]")],
|
||||||
KeyboardButton(text="👤 Профиль"),
|
[KeyboardButton(text="[book]")],
|
||||||
KeyboardButton(text="📖 Мои записи")
|
[KeyboardButton(text="[mybookings]")],
|
||||||
],
|
[KeyboardButton(text="[contacts]")],
|
||||||
[
|
[KeyboardButton(text="[about]")],
|
||||||
KeyboardButton(text="ℹ️ О компании"),
|
|
||||||
KeyboardButton(text="📞 Контакты")
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
resize_keyboard=True
|
resize_keyboard=True
|
||||||
)
|
)
|
||||||
|
|
||||||
# Меню во время записи
|
|
||||||
cancel_menu = ReplyKeyboardMarkup(
|
cancel_menu = ReplyKeyboardMarkup(
|
||||||
keyboard=[
|
keyboard=[
|
||||||
[KeyboardButton(text="Отмена")]
|
[KeyboardButton(text="cancel")]
|
||||||
],
|
],
|
||||||
resize_keyboard=True
|
resize_keyboard=True
|
||||||
)
|
)
|
||||||
@@ -6,11 +6,12 @@ def get_time_keyboard(busy_times):
|
|||||||
buttons = []
|
buttons = []
|
||||||
row = []
|
row = []
|
||||||
for slot in TIME_SLOTS:
|
for slot in TIME_SLOTS:
|
||||||
if slot in busy_times:
|
busy = slot in busy_times
|
||||||
label = f❌ {slot}
|
if busy:
|
||||||
|
label = "[X] " + slot
|
||||||
else:
|
else:
|
||||||
label = f✅ {slot}
|
label = "[V] " + slot
|
||||||
row.append(InlineKeyboardButton(text=label, callback_data=ftime_{slot}))
|
row.append(InlineKeyboardButton(text=label, callback_data="time_" + slot))
|
||||||
if len(row) == 3:
|
if len(row) == 3:
|
||||||
buttons.append(row)
|
buttons.append(row)
|
||||||
row = []
|
row = []
|
||||||
|
|||||||
Reference in New Issue
Block a user