fix: refine home tariff actions
This commit is contained in:
@@ -1825,7 +1825,9 @@
|
||||
return t("wa_pay_full_subscription", {}, "Оплатить полную подписку");
|
||||
}
|
||||
if (trafficMode || selectedPlan?.sale_mode === "traffic_package") return t("wa_buy_traffic");
|
||||
return subscription.active ? t("wa_renew") : t("wa_pay_subscription");
|
||||
return subscription.active
|
||||
? t("wa_renew_subscription", {}, "Продлить подписку")
|
||||
: t("wa_pay_subscription");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -263,6 +263,12 @@ a {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.status-tariff-action {
|
||||
margin-top: 10px;
|
||||
min-height: 38px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.traffic-top,
|
||||
.total-card {
|
||||
display: flex;
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
CheckCircle2,
|
||||
ChevronsUpDown,
|
||||
CircleX,
|
||||
CreditCard,
|
||||
Database,
|
||||
Download,
|
||||
Gift,
|
||||
RefreshCw,
|
||||
Repeat2,
|
||||
} from "$components/ui/icons.js";
|
||||
|
||||
import BrandMark from "$lib/webapp/BrandMark.svelte";
|
||||
@@ -118,6 +119,16 @@
|
||||
? t("wa_until_date", { date: subscription.end_date_text })
|
||||
: subscription.remaining_text}
|
||||
</p>
|
||||
{#if canChangeTariff}
|
||||
<Button
|
||||
class="wide status-tariff-action"
|
||||
variant="secondary"
|
||||
onclick={openTariffChangeModal}
|
||||
>
|
||||
<Repeat2 size={17} />
|
||||
{t("wa_change_tariff")}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
@@ -271,18 +282,12 @@
|
||||
onclick={openPaymentModal}
|
||||
>
|
||||
{#if subscription.active}
|
||||
<RefreshCw size={18} />
|
||||
<CreditCard size={18} />
|
||||
{:else if trafficMode}
|
||||
<Database size={18} />
|
||||
{/if}
|
||||
{primaryPayActionLabel()}
|
||||
</Button>
|
||||
{#if canChangeTariff}
|
||||
<Button class="wide" variant="secondary" onclick={openTariffChangeModal}>
|
||||
<RefreshCw size={18} />
|
||||
{t("wa_change_tariff")}
|
||||
</Button>
|
||||
{/if}
|
||||
{#if regularTrafficTopupUnlocked}
|
||||
<Button class="wide" variant="secondary" onclick={openRegularTopupModal}>
|
||||
<Database size={18} />
|
||||
|
||||
@@ -679,6 +679,7 @@
|
||||
"wa_premium_left": "Left",
|
||||
"wa_premium_topup_balance": "Top-up balance",
|
||||
"wa_renew": "Renew",
|
||||
"wa_renew_subscription": "Renew subscription",
|
||||
"wa_pay_subscription": "Pay subscription",
|
||||
"wa_pay_full_subscription": "Pay full subscription",
|
||||
"wa_subscription_title": "Subscription",
|
||||
|
||||
@@ -679,6 +679,7 @@
|
||||
"wa_premium_left": "Осталось",
|
||||
"wa_premium_topup_balance": "Докупленный остаток",
|
||||
"wa_renew": "Продлить",
|
||||
"wa_renew_subscription": "Продлить подписку",
|
||||
"wa_pay_subscription": "Оплатить подписку",
|
||||
"wa_pay_full_subscription": "Оплатить полную подписку",
|
||||
"wa_subscription_title": "Подписка",
|
||||
|
||||
Reference in New Issue
Block a user