337 lines
8.1 KiB
Python
337 lines
8.1 KiB
Python
from aiogram.utils.keyboard import InlineKeyboardBuilder, ReplyKeyboardBuilder
|
||
from aiogram.types import InlineKeyboardButton, KeyboardButton
|
||
|
||
|
||
def main_keyboard():
|
||
"""
|
||
Главное меню (только визуал перетянут под твой стиль)
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(InlineKeyboardButton(
|
||
text="📜 Профиль", callback_data="profile"))
|
||
builder.row(InlineKeyboardButton(text="❔ FAQ ❔", callback_data="faq"))
|
||
# Оставляем URL как у Вовы, меняем только текст
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="ℹ️ О нас",
|
||
url="https://www.youtube.com/watch?v=Zirn-CKck-c"
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def balance_keyboard():
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🪙 Пополнить баланс",
|
||
callback_data="popup",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🧾 История транзакций",
|
||
callback_data="tranhist",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def ticket_list_keyboard(tickets):
|
||
builder = InlineKeyboardBuilder()
|
||
for ticket in tickets:
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text=f"Тикет: {ticket['subject']}",
|
||
callback_data=f"ticket_{ticket['id']}",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="main_sup",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def sup_keyboard():
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="📝 Создать запрос",
|
||
callback_data="make_ticket",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="📂 Мои запросы",
|
||
callback_data="my_tickets",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def ticket_keyboard():
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Отмена",
|
||
callback_data="cancel",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def buy_keyboard():
|
||
"""
|
||
Меню выбора тарифа.
|
||
Лейблы ближе к твоему стилю, но callback’и остаются старые.
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🐣 Lark (Basic)",
|
||
callback_data="subs",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🦅 Lark Pro",
|
||
callback_data="subs_pro",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="ℹ️ О тарифах",
|
||
url="https://t.me/proxylark/19",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def subhist_keyboard():
|
||
"""
|
||
Подписки — история/список
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def popup_keyboard():
|
||
"""
|
||
Пополнение: суммы как в твоём топап-меню.
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
for amount in [200, 300, 600, 1000]:
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text=f"{amount} ₽",
|
||
callback_data=f"popup:{amount}",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
|
||
def balance_keyboard():
|
||
"""
|
||
Баланс
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🪙 Пополнить баланс",
|
||
callback_data="popup",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🧾 История транзакций",
|
||
callback_data="tranhist",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def tarif_Lark_keyboard():
|
||
"""
|
||
Тариф Lark (Standart) — только подписи меняем.
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🐣 Lark 1 месяц",
|
||
callback_data="Lark:Standart:1",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🐣 Lark 6 месяцев",
|
||
callback_data="Lark:Standart:6",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🐣 Lark 12 месяцев",
|
||
callback_data="Lark:Standart:12",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="buy_subscription",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def tarif_Lark_pro_keyboard():
|
||
"""
|
||
Тариф Lark Pro
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🦅 Lark Pro 1 месяц",
|
||
callback_data="Lark:Pro:1",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🦅 Lark Pro 6 месяцев",
|
||
callback_data="Lark:Pro:6",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🦅 Lark Pro 12 месяцев",
|
||
callback_data="Lark:Pro:12",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="buy_subscription",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def guide_keyboard():
|
||
"""
|
||
Руководство по подключению
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="📱 iOS / Android",
|
||
callback_data="mob",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="💻 Windows / macOS",
|
||
callback_data="pc",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def faq_keyboard():
|
||
"""
|
||
FAQ
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="base",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def tranhist_keyboard():
|
||
"""
|
||
История транзакций
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Назад",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def tarif_confirm_keyboard(name, amount, classif):
|
||
"""
|
||
Подтверждение покупки тарифа
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="✅ Подтвердить",
|
||
callback_data=f"confirm:{name}_{classif}_{amount}",
|
||
)
|
||
)
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="🔙 Отменить",
|
||
callback_data="buy_subscription",
|
||
)
|
||
)
|
||
return builder.as_markup()
|
||
|
||
|
||
def confirm_popup_keyboard():
|
||
"""
|
||
Подтверждение пополнения — без «иди нахуй», мы же под босса господина ларк это красим....
|
||
"""
|
||
builder = InlineKeyboardBuilder()
|
||
builder.row(
|
||
InlineKeyboardButton(
|
||
text="✅ Готово, вернуться в профиль",
|
||
callback_data="profile",
|
||
)
|
||
)
|
||
return builder.as_markup()
|