adata-ui 2.1.15 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useUrls } from '#adata-ui/composables/useUrls'
3
3
  import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
4
+ import { PAGES } from '#adata-ui/shared/constans/pages'
4
5
 
5
6
  const props = defineProps<{
6
7
  code: string
@@ -11,12 +12,12 @@ const emit = defineEmits<{
11
12
  (e: 'closeBanner'): void
12
13
  }>()
13
14
 
15
+ const { landing } = useUrls()
14
16
  const { $toast } = useNuxtApp()
15
17
 
16
18
  const { t, locale } = useI18n()
17
19
  const accessToken = useCookie('accessToken')
18
20
 
19
- const { topUpSidePanel } = usePayment()
20
21
  const { commonAuth } = useAppConfig()
21
22
 
22
23
  const userApiURL = commonAuth.userApiURL
@@ -66,16 +67,7 @@ async function updateUserRate() {
66
67
  }
67
68
 
68
69
  function onBuy() {
69
- const balance = props.balance ?? 0
70
-
71
- const requiredAmount = ['regular_usage_adata', 'overpayment_adata'].includes(props.code) ? 100000 : 10000
72
-
73
- if (balance >= requiredAmount) {
74
- updateUserRate()
75
- return
76
- }
77
-
78
- topUpSidePanel.value = true
70
+ navigateToLocalizedPage({locale, projectUrl: landing, path: PAGES.tariffs, target: '_blank'})
79
71
  }
80
72
  </script>
81
73
 
package/lang/en.ts CHANGED
@@ -798,22 +798,19 @@ const EnLocale: RuLocale = {
798
798
  },
799
799
  upsell: {
800
800
  active_usage_basic: {
801
- title: 'Active use of the service',
802
- description: 'You make 10+ requests per day.\n' +
803
- '{highlight} suited for this volume.',
804
- highlight: 'A monthly subscription is better',
801
+ title: "You are an active user",
802
+ description: 'With your current request volume, it would be more cost-effective to {highlight}.',
803
+ highlight: 'switch to a monthly plan',
805
804
  },
806
805
  regular_usage_basic: {
807
- title: 'The one-time plan has become unprofitable',
808
- description: 'You have been using the 2,000 plan for 5 consecutive days.\n' +
809
- '{highlight} for regular requests.',
810
- highlight: 'A monthly subscription is more cost-effective',
806
+ title: "You are an active user",
807
+ description: "With your current request volume, it would be more cost-effective to {highlight}.",
808
+ highlight: 'switch to a monthly plan',
811
809
  },
812
810
  overpayment_basic: {
813
- title: 'You are paying more than you could',
814
- description: 'You have used the 2,000 plan more than 5 times in a month.\n' +
815
- '{highlight}',
816
- highlight: 'A monthly subscription is more cost-effective.',
811
+ title: "You are an active user",
812
+ description: "With your current request volume, it would be more cost-effective to {highlight}.",
813
+ highlight: 'switch to a monthly plan',
817
814
  },
818
815
  regular_usage_adata: {
819
816
  title: 'Active service usage',
package/lang/kk.ts CHANGED
@@ -799,22 +799,19 @@ const KkLocale: RuLocale = {
799
799
  },
800
800
  upsell: {
801
801
  active_usage_basic: {
802
- title: 'Қызметті белсенді пайдалану',
803
- description: 'Сіз күніне 10+ сұрау жасайсыз.\n' +
804
- 'Мұндай көлем үшін {highlight}.',
805
- highlight: 'айлық жазылым тиімдірек',
802
+ title: "Сіз белсенді пайдаланушысыз",
803
+ description: "Қазіргі сұрау көлемімен {highlight} тиімдірек болады.",
804
+ highlight: 'айлық тарифке ауысу',
806
805
  },
807
806
  regular_usage_basic: {
808
- title: 'Бір реттік тариф тиімсіз бола бастады',
809
- description: 'Сіз 2 000 тарифін қатарынан 5 күн қолданып жүрсіз.\n' +
810
- 'Тұрақты сұраулар үшін {highlight}.',
811
- highlight: 'айлық жазылым тиімдірек',
807
+ title: "Сіз белсенді пайдаланушысыз",
808
+ description: "Қазіргі сұрау көлемімен {highlight} тиімдірек болады.",
809
+ highlight: 'айлық тарифке ауысу',
812
810
  },
813
811
  overpayment_basic: {
814
- title: 'Сіз мүмкін болғаннан көп төлеп жүрсіз',
815
- description: 'Сіз 2 000 тарифін ай ішінде 5 реттен көп қолдандыңыз.\n' +
816
- 'highlight',
817
- highlight: 'Айлық тарифке жазылу тиімдірек.',
812
+ title: "Сіз белсенді пайдаланушысыз",
813
+ description: "Қазіргі сұрау көлемімен {highlight} тиімдірек болады.",
814
+ highlight: 'айлық тарифке ауысу',
818
815
  },
819
816
  regular_usage_adata: {
820
817
  title: 'Қызметті белсенді пайдалану',
package/lang/ru.ts CHANGED
@@ -803,22 +803,19 @@ const RuLocale = {
803
803
  },
804
804
  upsell: {
805
805
  active_usage_basic: {
806
- title: 'Активное использование сервиса',
807
- description: 'Вы выполняете 10+ запросов в сутки.\n' +
808
- '{highlight} подходит для такого объёма.',
809
- highlight: 'Подписка на месяц лучше',
806
+ title: 'Вы активный пользователь',
807
+ description: 'При текущем объёме запросов вам будет выгоднее {highlight}.',
808
+ highlight: 'перейти на месячный тариф',
810
809
  },
811
810
  regular_usage_basic: {
812
- title: 'Разовый тариф стал невыгодным',
813
- description: 'Вы используете тариф 2 000 5 дней подряд.\n' +
814
- '{highlight} при регулярных запросах.',
815
- highlight: 'Подписка на месяц выгоднее',
811
+ title: 'Вы активный пользователь',
812
+ description: 'При текущем объёме запросов вам будет выгоднее {highlight}.',
813
+ highlight: 'перейти на месячный тариф',
816
814
  },
817
815
  overpayment_basic: {
818
- title: 'Вы платите больше, чем могли бы',
819
- description: 'Вы использовали тариф 2 000 больше 5 раз за месяц.\n' +
820
- '{highlight}',
821
- highlight: 'Подписка на месячный тариф выгоднее.',
816
+ title: 'Вы активный пользователь',
817
+ description: 'При текущем объёме запросов вам будет выгоднее {highlight}.',
818
+ highlight: 'перейти на месячный тариф.',
822
819
  },
823
820
  regular_usage_adata: {
824
821
  title: 'Активное использование сервиса',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.1.15",
4
+ "version": "2.1.16",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",