UI: карточки подписок и выбор тарифов
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from aiogram.types import InlineKeyboardButton
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder, ReplyKeyboardBuilder
|
||||
from aiogram.types import InlineKeyboardButton, KeyboardButton
|
||||
|
||||
@@ -121,11 +123,136 @@ def buy_keyboard():
|
||||
return builder.as_markup()
|
||||
|
||||
|
||||
def subhist_keyboard():
|
||||
def tarif_Lark_keyboard():
|
||||
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():
|
||||
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 tarif_Lark_family_keyboard():
|
||||
builder = InlineKeyboardBuilder()
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="👨👩👧 Lark Family 1 месяц",
|
||||
callback_data="Lark:Family:1",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="👨👩👧 Lark Family 6 месяцев",
|
||||
callback_data="Lark:Family:6",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="👨👩👧 Lark Family 12 месяцев",
|
||||
callback_data="Lark:Family:12",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="🔙 Назад",
|
||||
callback_data="buy_subscription",
|
||||
)
|
||||
)
|
||||
return builder.as_markup()
|
||||
|
||||
|
||||
def subscriptions_card_keyboard(sub_id: str, index: int, total: int):
|
||||
"""
|
||||
Подписки — история/список
|
||||
Карточка подписки:
|
||||
- навигация ⬅️/➡️
|
||||
- 'Конфиг' / 'Продлить'
|
||||
- 'Новая' / 'Назад'
|
||||
"""
|
||||
builder = InlineKeyboardBuilder()
|
||||
|
||||
nav = []
|
||||
if index > 0:
|
||||
nav.append(
|
||||
InlineKeyboardButton(
|
||||
text="⬅️",
|
||||
callback_data=f"sub_prev:{index-1}",
|
||||
)
|
||||
)
|
||||
if index < total - 1:
|
||||
nav.append(
|
||||
InlineKeyboardButton(
|
||||
text="➡️",
|
||||
callback_data=f"sub_next:{index+1}",
|
||||
)
|
||||
)
|
||||
if nav:
|
||||
builder.row(*nav)
|
||||
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="🔑 Конфиг",
|
||||
callback_data=f"sub_cfg:{sub_id}",
|
||||
),
|
||||
InlineKeyboardButton(
|
||||
text="🔁 Продлить",
|
||||
callback_data=f"sub_renew:{sub_id}",
|
||||
),
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="➕ Новая",
|
||||
callback_data="buy_subscription",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="🔙 Назад",
|
||||
@@ -135,34 +262,18 @@ def subhist_keyboard():
|
||||
return builder.as_markup()
|
||||
|
||||
|
||||
def payment_methods_keyboard(amount: int):
|
||||
"""
|
||||
Способы оплаты для выбранной суммы.
|
||||
ЛаркинсКоины убрал нахер
|
||||
"""
|
||||
def tarif_confirm_keyboard(name: str, amount: int, classif: str):
|
||||
builder = InlineKeyboardBuilder()
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="⭐ Telegram Stars",
|
||||
callback_data=f"method_stars_{amount}",
|
||||
text="✅ Подтвердить",
|
||||
callback_data=f"confirm:{name}_{classif}_{amount}",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="💵 YooKassa",
|
||||
callback_data=f"method_ykassa_{amount}",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="🪙 CryptoBot",
|
||||
callback_data=f"method_crypto_{amount}",
|
||||
)
|
||||
)
|
||||
builder.row(
|
||||
InlineKeyboardButton(
|
||||
text="🔙 Назад",
|
||||
callback_data="popup",
|
||||
text="🔙 Отменить",
|
||||
callback_data="buy_subscription",
|
||||
)
|
||||
)
|
||||
return builder.as_markup()
|
||||
@@ -340,7 +451,8 @@ def tarif_confirm_keyboard(name, amount, classif):
|
||||
|
||||
def confirm_popup_keyboard():
|
||||
"""
|
||||
Подтверждение пополнения — без «иди нахуй», мы же под босса господина ларк это красим....
|
||||
аааааааааааааааааааааа
|
||||
|
||||
"""
|
||||
builder = InlineKeyboardBuilder()
|
||||
builder.row(
|
||||
|
||||
Reference in New Issue
Block a user