diff --git a/src/components/Signup.vue b/src/components/Signup.vue index ab7cc1bdb..8f2a43eae 100644 --- a/src/components/Signup.vue +++ b/src/components/Signup.vue @@ -50,20 +50,38 @@
+ + @@ -54,8 +72,10 @@ module.exports = { return { unit:"GiB", space:"", - proMb: 50*1024, - visionaryMb: 500*1024, + proMb: 100*1000, + visionaryMb: 500*1000, + pioneerMb: 2000*1000, + trailblazerMb: 4000*1000, gettingCard: false, paymentUrl:null, showCard:false, @@ -75,20 +95,41 @@ module.exports = { ]), isPaid() { - return this.quotaBytes/(1024*1024) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() > 0; + return this.quotaBytes/(1000*1000) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() > 0; }, isPro() { - return this.quotaBytes/(1024*1024) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.proMb; + return this.quotaBytes/(1000*1000) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.proMb; }, isVisionary() { - return this.quotaBytes/(1024*1024) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.visionaryMb; + return this.quotaBytes/(1000*1000) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.visionaryMb; }, - prorataText() { - if (!this.isPro) - return ""; - return " (pro rata for this month)"; + isPioneer() { + return this.quotaBytes/(1000*1000) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.pioneerMb; + }, + + isTrailBlazer() { + return this.quotaBytes/(1000*1000) > this.paymentProperties.freeMb() && this.paymentProperties.desiredMb() == this.trailblazerMb; + }, + + prorataTextVisionary() { + if (this.isPro) + return " (pro rata for this month)"; + else + return "" + }, + prorataTextPioneer() { + if (this.isPro || this.isVisionary) + return " (pro rata for this month)"; + else + return "" + }, + prorataTextTrailBlazer() { + if (this.isPro || this.isVisionary || this.isPioneer) + return " (pro rata for this month)"; + else + return "" }, upgradeTitle(){ return (this.isPaid) @@ -104,6 +145,16 @@ module.exports = { return (this.isVisionary) ? 'Your Current Plan' : 'Select Visionary (opens new tab)' + }, + pioneerButtonText(){ + return (this.isPioneer) + ? 'Your Current Plan' + : 'Select Pioneer (opens new tab)' + }, + trailblazerButtonText(){ + return (this.isTrailBlazer) + ? 'Your Current Plan' + : 'Select Trailblazer (opens new tab)' } }, @@ -159,7 +210,7 @@ module.exports = { }, updateCardDetails() { - this.updateCard(this.paymentProperties.desiredMb()*1024*1024) + this.updateCard(this.paymentProperties.desiredMb()*1000*1000) }, updateCard(desired) { diff --git a/src/components/modal/ModalSpace.vue b/src/components/modal/ModalSpace.vue index 99c9ef58c..bc7314a91 100644 --- a/src/components/modal/ModalSpace.vue +++ b/src/components/modal/ModalSpace.vue @@ -16,8 +16,8 @@ placeholder="New total space amount" > @@ -40,7 +40,7 @@ module.exports = { }, data() { return { - unit:"GiB", + unit:"GB", space:"", }; }, @@ -56,9 +56,9 @@ module.exports = { methods: { getRequestedBytes() { - if (this.unit == "GiB") - return this.space*1024*1024*1024; - return this.space*1024*1024; + if (this.unit == "GB") + return this.space*1000*1000*1000; + return this.space*1000*1000; }, validateSpace() { @@ -101,4 +101,4 @@ module.exports = { } - \ No newline at end of file + diff --git a/src/mixins/mixins.js b/src/mixins/mixins.js index 439e452e9..39f3ebb5f 100644 --- a/src/mixins/mixins.js +++ b/src/mixins/mixins.js @@ -10,14 +10,14 @@ module.exports = { convertBytesToHumanReadable(bytesAsString) { let bytes = Number(bytesAsString); - if (bytes < 1024) + if (bytes < 1000) return bytes + " Bytes"; - if (bytes < 1024 * 1024) - return this.roundToDisplay(bytes / 1024) + " KiB"; - if (bytes < 1024 * 1024 * 1024) - return this.roundToDisplay(bytes / 1024 / 1024) + " MiB"; - return this.roundToDisplay(bytes / 1024 / 1024 / 1024) + " GiB"; + if (bytes < 1000 * 1000) + return this.roundToDisplay(bytes / 1000) + " KB"; + if (bytes < 1000 * 1000 * 1000) + return this.roundToDisplay(bytes / 1000 / 1000) + " MB"; + return this.roundToDisplay(bytes / 1000 / 1000 / 1000) + " GB"; }, } -} \ No newline at end of file +} diff --git a/src/mixins/storage/index.js b/src/mixins/storage/index.js index 00f6d8e2d..a558fdf22 100644 --- a/src/mixins/storage/index.js +++ b/src/mixins/storage/index.js @@ -6,12 +6,12 @@ module.exports = { convertBytesToHumanReadable:function(bytesAsString) { let bytes = Number(bytesAsString); - if (bytes < 1024) + if (bytes < 1000) return bytes + " Bytes"; - if (bytes < 1024 * 1024) - return this.roundToDisplay(bytes / 1024) + " KiB"; - if (bytes < 1024 * 1024 * 1024) - return this.roundToDisplay(bytes / 1024 / 1024) + " MiB"; - return this.roundToDisplay(bytes / 1024 / 1024 / 1024) + " GiB"; + if (bytes < 1000 * 100) + return this.roundToDisplay(bytes / 1000) + " KB"; + if (bytes < 1000 * 1000 * 1000) + return this.roundToDisplay(bytes / 1000 / 1000) + " MB"; + return this.roundToDisplay(bytes / 1000 / 1000 / 1000) + " GB"; }, -} \ No newline at end of file +}