mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-03-06 05:54:09 +00:00
fix: добавить пробелы в формат тарифов (1000 ГБ / 2 📱)
This commit is contained in:
@@ -363,7 +363,7 @@ def _format_core_summary(lang_code: str) -> str:
|
||||
else:
|
||||
traffic_mode = '⚙️ selectable'
|
||||
traffic_label = _format_traffic_label(traffic_limit, lang_code, short=True)
|
||||
return f'{base_price}, {device_limit}📱, {traffic_label}, {traffic_mode}'
|
||||
return f'{base_price}, {device_limit} 📱, {traffic_label}, {traffic_mode}'
|
||||
|
||||
|
||||
def _get_period_items(lang_code: str) -> list[PriceItem]:
|
||||
|
||||
@@ -4747,7 +4747,7 @@ async def admin_buy_tariff(callback: types.CallbackQuery, db_user: User, db: Asy
|
||||
traffic = '♾️' if tariff.traffic_limit_gb == 0 else f'{tariff.traffic_limit_gb} ГБ'
|
||||
prices = tariff.period_prices or {}
|
||||
min_price = min(prices.values()) if prices else 0
|
||||
text += f'<b>{tariff.name}</b> — {traffic}/{tariff.device_limit}📱 от {settings.format_price(min_price)}\n'
|
||||
text += f'<b>{tariff.name}</b> — {traffic} / {tariff.device_limit} 📱 от {settings.format_price(min_price)}\n'
|
||||
|
||||
keyboard = []
|
||||
for tariff in tariffs:
|
||||
|
||||
@@ -102,7 +102,7 @@ def format_tariffs_list_text(
|
||||
for tariff in tariffs:
|
||||
# Трафик компактно
|
||||
traffic_gb = tariff.traffic_limit_gb
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb}ГБ'
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb} ГБ'
|
||||
|
||||
# Цена
|
||||
is_daily = getattr(tariff, 'is_daily', False)
|
||||
@@ -127,8 +127,8 @@ def format_tariffs_list_text(
|
||||
discount_icon = '🔥'
|
||||
price_text = f'от {_format_price_kopeks(min_price, compact=True)}{discount_icon}'
|
||||
|
||||
# Компактный формат: Название — 250ГБ/10📱 от 179₽🔥
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic}/{tariff.device_limit}📱 {price_text}')
|
||||
# Компактный формат: Название — 250 ГБ / 10 📱 от 179₽🔥
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic} / {tariff.device_limit} 📱 {price_text}')
|
||||
|
||||
# Описание тарифа если есть
|
||||
if tariff.description:
|
||||
@@ -1830,7 +1830,7 @@ def format_tariff_switch_list_text(
|
||||
continue
|
||||
|
||||
traffic_gb = tariff.traffic_limit_gb
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb}ГБ'
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb} ГБ'
|
||||
|
||||
# Проверяем суточный ли тариф
|
||||
is_daily = getattr(tariff, 'is_daily', False)
|
||||
@@ -1854,7 +1854,7 @@ def format_tariff_switch_list_text(
|
||||
discount_icon = '🔥'
|
||||
price_text = f'от {_format_price_kopeks(min_price, compact=True)}{discount_icon}'
|
||||
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic}/{tariff.device_limit}📱 {price_text}')
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic} / {tariff.device_limit} 📱 {price_text}')
|
||||
|
||||
if tariff.description:
|
||||
lines.append(f'<i>{tariff.description}</i>')
|
||||
@@ -2635,7 +2635,7 @@ def format_instant_switch_list_text(
|
||||
continue
|
||||
|
||||
traffic_gb = tariff.traffic_limit_gb
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb}ГБ'
|
||||
traffic = '∞' if traffic_gb == 0 else f'{traffic_gb} ГБ'
|
||||
|
||||
# Рассчитываем стоимость переключения
|
||||
cost, is_upgrade = _calculate_instant_switch_cost(current_tariff, tariff, remaining_days, db_user)
|
||||
@@ -2645,7 +2645,7 @@ def format_instant_switch_list_text(
|
||||
else:
|
||||
cost_text = '⬇️ Бесплатно'
|
||||
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic}/{tariff.device_limit}📱 {cost_text}')
|
||||
lines.append(f'<b>{tariff.name}</b> — {traffic} / {tariff.device_limit} 📱 {cost_text}')
|
||||
|
||||
if tariff.description:
|
||||
lines.append(f'<i>{tariff.description}</i>')
|
||||
|
||||
Reference in New Issue
Block a user