@@ -97,10 +97,6 @@ const props = defineProps({
97
97
98
98
const isLoading = ref (false );
99
99
100
- const hasBillableRedirects = computed (() => {
101
- return !! (props .subscribed || props .endpoints .length > 1 );
102
- });
103
-
104
100
const copiedTimeout = ref <NodeJS .Timeout | null >(null );
105
101
106
102
const copyToClipboard = (text : string ) => {
@@ -141,7 +137,7 @@ const printMagicLink = () => {
141
137
const openTabs = ref ([" 1" ]);
142
138
143
139
const lineChartData = computed (() => {
144
- if (! hasBillableRedirects . value || ! props .endpoints .length ) {
140
+ if (! props . subscribed || ! props .endpoints .length ) {
145
141
return [];
146
142
}
147
143
// Each data item has a clicks_by_time_of_day array, we need to return it. We can flatten the array with flatMap
@@ -258,7 +254,7 @@ const QRDestinations = defineAsyncComponent(
258
254
params: { redirectId: props.redirectId },
259
255
}"
260
256
>{{
261
- hasBillableRedirects
257
+ subscribed
262
258
? $t("Add more free destinations")
263
259
: $t("Add more destinations to same code")
264
260
}}</base-button
@@ -308,7 +304,7 @@ const QRDestinations = defineAsyncComponent(
308
304
:clicksAllTime =" clicksAllTime"
309
305
:bestEndpoint =" bestEndpoint"
310
306
:isLoading =" isLoading || loading"
311
- :hasBillableRedirects =" hasBillableRedirects "
307
+ :hasBillableRedirects =" subscribed "
312
308
/>
313
309
</div >
314
310
@@ -326,7 +322,7 @@ const QRDestinations = defineAsyncComponent(
326
322
:title =" $t('Code design')"
327
323
:subtitle =" $t('Customise the look of your magic link')"
328
324
>
329
- <div :class =" { disabled: !hasBillableRedirects }" >
325
+ <div :class =" { disabled: !subscribed }" >
330
326
<div class =" two-column-grid mobile-grid" >
331
327
<div >
332
328
<label for =" darkColor" >{{ $t("Color") }}</label >
@@ -335,7 +331,7 @@ const QRDestinations = defineAsyncComponent(
335
331
type =" color"
336
332
v-model =" darkColor"
337
333
name =" darkColor"
338
- :disabled =" !hasBillableRedirects "
334
+ :disabled =" !subscribed "
339
335
/>
340
336
</div >
341
337
<div >
@@ -345,7 +341,7 @@ const QRDestinations = defineAsyncComponent(
345
341
type =" color"
346
342
v-model =" lightColor"
347
343
name =" lightColor"
348
- :disabled =" !hasBillableRedirects "
344
+ :disabled =" !subscribed "
349
345
/>
350
346
</div >
351
347
</div >
@@ -355,7 +351,7 @@ const QRDestinations = defineAsyncComponent(
355
351
name =" shape"
356
352
id =" shape"
357
353
v-model =" selectedShape"
358
- :disabled =" !hasBillableRedirects "
354
+ :disabled =" !subscribed "
359
355
>
360
356
<option value =" square" >{{ $t("Square") }}</option >
361
357
<option value =" rounded" >{{ $t("Rounded") }}</option >
@@ -366,7 +362,7 @@ const QRDestinations = defineAsyncComponent(
366
362
:redirectId =" redirectId"
367
363
:title =" $t('Enable custom designs')"
368
364
:submitText =" $t('Enable custom designs')"
369
- v-if =" !hasBillableRedirects "
365
+ v-if =" !subscribed "
370
366
>
371
367
<base-button class =" full-width no-margin" >
372
368
{{ $t("Enable custom designs") }}</base-button
@@ -387,14 +383,14 @@ const QRDestinations = defineAsyncComponent(
387
383
<hgroup >
388
384
<h3 >
389
385
{{
390
- hasBillableRedirects
386
+ subscribed
391
387
? $t("Unsubscribe Magic Link")
392
388
: $t("Subscribe Magic Link")
393
389
}}
394
390
</h3 >
395
391
<p >
396
392
{{
397
- hasBillableRedirects
393
+ subscribed
398
394
? $t(
399
395
"Remove advanced analytics, multiple destinations, and custom designs"
400
396
)
@@ -404,7 +400,7 @@ const QRDestinations = defineAsyncComponent(
404
400
}}
405
401
</p >
406
402
</hgroup >
407
- <template v-if =" hasBillableRedirects !== true " >
403
+ <template v-if =" subscribed !== true " >
408
404
<confirms-subscription-start
409
405
:redirectId =" redirectId"
410
406
:title =" $t('Subscribe')"
0 commit comments