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