Skip to content

Commit 68c52f9

Browse files
committed
Add pricing slider
1 parent 4ce8431 commit 68c52f9

File tree

1 file changed

+55
-8
lines changed

1 file changed

+55
-8
lines changed

web/pages/index.vue

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,26 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
668668
</div>
669669
</v-col>
670670
</v-row>
671+
<v-row>
672+
<v-col cols="12">
673+
<v-slider
674+
v-model="pricing"
675+
:tick-labels="
676+
$vuetify.breakpoint.lgAndUp ? pricingLabelsFull : pricingLabels
677+
"
678+
:max="4"
679+
step="1"
680+
thumb-label="always"
681+
thumb-size="32"
682+
tick-size="4"
683+
tick
684+
>
685+
<template v-slot:thumb-label>
686+
{{ pricingLabels[pricing] }}
687+
</template>
688+
</v-slider>
689+
</v-col>
690+
</v-row>
671691
<v-row>
672692
<v-col cols="12" lg="4">
673693
<v-card elevation="4" color="#121212">
@@ -760,23 +780,28 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
760780
</v-card>
761781
</v-col>
762782
<v-col cols="12" lg="4">
763-
<v-card elevation="4" color="#121212">
783+
<v-card color="#121212" border outlined>
764784
<v-card-text>
765-
<h1 class="text-center text-h3 text--primary">Ultra</h1>
785+
<h1 class="text-center text-h3 text--primary">
786+
{{ pricingLabels[pricing] }} Plan
787+
</h1>
766788
<p class="subtitle-1 text-center">
767-
Send and receive up to 10,000 SMS messages like a power user.
789+
Send and receive up to {{ planMessages }} SMS messages like a
790+
power user.
768791
</p>
769792
<p v-if="!yearlyPricing" class="text-center text--primary">
770-
<span class="text-h3">$20</span>/month
793+
<span class="text-h3">${{ planMonthlyPrice }}</span
794+
>/month
771795
</p>
772796
<p v-else class="text-center text--primary">
773-
<span class="text-h3">$200</span>/year
797+
<span class="text-h3">${{ planYearlyPrice }}</span
798+
>/year
774799
</p>
775800
<p v-if="!yearlyPricing" class="text-center mt-n3">
776-
or <b>$200</b> per year
801+
or <b>${{ planYearlyPrice }}</b> per year
777802
</p>
778803
<p v-else class="text-center mt-n3">
779-
or <b>$16.66</b> per month
804+
or <b>${{ planYearlyMonthlyPrice }}</b> per month
780805
</p>
781806
<v-btn block color="default" :to="{ name: 'login' }" large
782807
>Try For Free</v-btn
@@ -785,7 +810,8 @@ Console.WriteLine(await response.Content.ReadAsStringAsync());
785810
<v-icon color="primary" class="mt-n1" left>{{
786811
mdiCheckCircle
787812
}}</v-icon
788-
>Send or receive up to <b>10,000</b> SMS/month
813+
>Send or receive up to
814+
<b>{{ pricingLabels[pricing] }}</b> SMS/month
789815
</p>
790816
<p class="subtitle-1 mt-n4">
791817
<v-icon color="primary" class="mt-n1" left>
@@ -1067,8 +1093,29 @@ export default Vue.extend({
10671093
selectedTab: 'javascript',
10681094
yearlyPricing: false,
10691095
faqPanel: null,
1096+
pricing: 0,
1097+
pricingLabels: ['10K', '20K', '50K', '100K', '200K'],
1098+
pricingLabelsFull: ['10,000', '20,000', '50,000', '100,000', '200,000'],
10701099
}
10711100
},
1101+
computed: {
1102+
planMessages() {
1103+
const plan = this.pricingLabels[this.pricing]
1104+
return plan.replace('K', ',000')
1105+
},
1106+
planMonthlyPrice() {
1107+
const prices = [20, 35, 89, 175, 350]
1108+
return prices[this.pricing]
1109+
},
1110+
planYearlyPrice() {
1111+
const prices = [200, 350, 1068, 2100, 4200]
1112+
return prices[this.pricing]
1113+
},
1114+
planYearlyMonthlyPrice() {
1115+
const prices = [16.66, 29.16, 89, 175, 350]
1116+
return prices[this.pricing]
1117+
},
1118+
},
10721119
})
10731120
</script>
10741121

0 commit comments

Comments
 (0)