From 8569eb17d024f47041d5ed3932c78c944a20dde5 Mon Sep 17 00:00:00 2001 From: Jess Robinson Date: Wed, 4 Sep 2024 09:57:04 +0000 Subject: [PATCH 1/2] fix(upgrades): Make upgrades tables independent of product lists --- .../account-upgrades.component.html | 420 +++--------------- .../account-upgrades.component.scss | 6 +- .../account-app/account-upgrades.component.ts | 30 +- 3 files changed, 77 insertions(+), 379 deletions(-) diff --git a/src/app/account-app/account-upgrades.component.html b/src/app/account-app/account-upgrades.component.html index ada4bd3dd..4ec0f2c4d 100644 --- a/src/app/account-app/account-upgrades.component.html +++ b/src/app/account-app/account-upgrades.component.html @@ -77,102 +77,35 @@

One extra year for free!



-
+
+
- - - {{ subs_regular[7].name.replace('Runbox', '') }} - - -

Your current subscription

-
- -
-

An affordable plan if you don't need a lot of email or file storage.

-
    -
  • {{ subs_regular[7].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB email storage space
  • -
  • {{ subs_regular[7].quotas.File.quota / 1024 / 1024 / 1024 }} GB file storage space
  • -
  • {{ subs_regular[7].quotas.VirtualDomain.quota }} email domain names
  • -
  • {{ subs_regular[7].quotas.Alias.quota }} aliases @runbox domains
  • -
  • Unlimited aliases on your domains
  • -
-
- Save {{ subs_regular[1].currency.replace("USD","$") }}{{ subs_regular[1].price * 3 - subs_regular[7].price | number: '1.2-2' }} in total -
- compared to 3 * Mini 1-year -
- -

- Current usage: {{ (us.current / 1024 / 1024 / 1024) | number:'1.2-2' }} GB of {{ (us.quota / 1024 / 1024 / 1024) | number:'1.2-2' }} GB - {{ us.current }} of {{ us.quota }} -

-
-
- Your usage is too great for this plan: -
    -
  • - {{ (oq.current / 1024 / 1024 / 1024) | number:'1.2-2' }} GB {{ oq.quota }} used, while {{ (oq.allowed / 1024 / 1024 / 1024) | number:'1.2-2' }} GB - {{ oq.current }} {{ oq.quota }} used, while {{ oq.allowed }} - are available -
  • -
-
-
 {{ subs_regular[1].currency.replace("USD","$") }}{{ subs_regular[1].price * 3 | number: '1.2-2' }} 
- - - - - - -
- Price per year: {{ subs_regular[7].currency.replace("USD","$") || "$" }} {{ subs_regular[7].price / 3 | number:'1.2-2' }}
- Annual price per GB: {{ subs_regular[7].currency.replace("USD","$") || "$" }} {{ subs_regular[7].price / 3 / ((subs_regular[7].quotas.Disk.quota + subs_regular[7].quotas.File.quota) / 1024 / 1024 / 1024) | number:'1.2-2' }} -
- -
- - - - - - {{ subs_regular[8].name.replace('Runbox', '') }} + + + {{ plan.name.replace('Runbox', '') }}

Your current subscription

-

Our recommended plan with plenty of email and file storage, suitable for most people.

-
    -
  • {{ subs_regular[8].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB email storage space
  • -
  • {{ subs_regular[8].quotas.File.quota / 1024 / 1024 / 1024 }} GB file storage space
  • -
  • {{ subs_regular[8].quotas.VirtualDomain.quota }} email domain names
  • -
  • {{ subs_regular[8].quotas.Alias.quota }} aliases @runbox domains
  • +

    An affordable plan if you don't need a lot of email or file storage.

    +

    Our recommended plan with plenty of email and file storage, suitable for most people.

    +

    A solid plan built to last, perfect for professionals and businesses.

    +
      +
    • {{ plan.quotas.Disk.quota / 1024 / 1024 / 1024 }} GB email storage space
    • +
    • {{ plan.quotas.File.quota / 1024 / 1024 / 1024 }} GB file storage space
    • +
    • {{ plan.quotas.VirtualDomain.quota }} email domain names
    • +
    • {{ plan.quotas.Alias.quota }} aliases @runbox domains
    • Unlimited aliases on your domains
    - Save {{ subs_regular[2].currency.replace("USD","$") }}{{ subs_regular[2].price * 3 - subs_regular[8].price | number: '1.2-2' }} in total + Save {{ orig_three_plans[i].currency.replace("USD","$") }}{{ orig_three_plans[i].price * 3 - plan.price | number: '1.2-2' }} in total
    - compared to 3 * Medium 1-year + compared to 3 * {{ orig_three_plans[i].subtype | titlecase }} 1-year

@@ -190,23 +123,23 @@

-
 {{ subs_regular[2].currency.replace("USD","$") }}{{ subs_regular[2].price * 3 | number: '1.2-2' }} 
+
 {{ orig_three_plans[i].currency.replace("USD","$") }}{{ orig_three_plans[i].price * 3 | number: '1.2-2' }} 
- - - - -

- Price per year: {{ subs_regular[9].currency.replace("USD","$") || "$" }} {{ subs_regular[9].price / 3 | number:'1.2-2' }}
- Annual price per GB: {{ subs_regular[9].currency.replace("USD","$") || "$" }} {{ subs_regular[9].price / 3 / ((subs_regular[9].quotas.Disk.quota + subs_regular[9].quotas.File.quota) / 1024 / 1024 / 1024) | number:'1.2-2' }} -

- - - +
+
+
+
+

Note that upgrading or downgrading your main account will take effect right away, and the additional subscription time added to your current subscription. You are currently using {{ (q_usage.Disk.usage / 1024 / 1024 / 1024) | number:'1.2-2' }} GB email storage space, {{ (q_usage.File.usage / 1024 / 1024 / 1024) | number:'1.2-2' }} GB file storage space, and {{q_usage.VirtualDomain.usage}} email domains.

@@ -309,166 +173,51 @@

- - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - - - - - - - -
Runbox Plans{{ subs_regular[0].name.replace('Runbox', '') }}{{ subs_regular[1].name.replace('Runbox', '') }}{{ subs_regular[2].name.replace('Runbox', '') }}{{ subs_regular[3].name.replace('Runbox', '') }}{{ subs_regular[4].name.replace('Runbox', '') }}{{ subs_regular[5].name.replace('Runbox', '') }}{{ plan.name.replace('Runbox', '') }}
Email storage{{ subs_regular[0].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[1].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[2].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[3].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[4].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[5].quotas.Disk.quota / 1024 / 1024 / 1024 }} GB{{ plan.quotas.Disk.quota / 1024 / 1024 / 1024 }} GB
File storage{{ subs_regular[0].quotas.File.quota / 1024 / 1024 }} MB{{ subs_regular[1].quotas.File.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[2].quotas.File.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[3].quotas.File.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[4].quotas.File.quota / 1024 / 1024 / 1024 }} GB{{ subs_regular[5].quotas.File.quota / 1024 / 1024 / 1024 }} GB{{ plan.quotas.File.quota / 1024 / 1024 }} MB
Email domains{{ subs_regular[0].quotas.VirtualDomain.quota }}{{ subs_regular[1].quotas.VirtualDomain.quota }}{{ subs_regular[2].quotas.VirtualDomain.quota }}{{ subs_regular[3].quotas.VirtualDomain.quota }}{{ subs_regular[4].quotas.VirtualDomain.quota }}{{ subs_regular[5].quotas.VirtualDomain.quota }}{{ plan.quotas.VirtualDomain.quota }}
Email aliases @runbox100100100100100100100
Email aliases on own domainUnlimitedUnlimitedUnlimitedUnlimitedUnlimitedUnlimitedUnlimited
Email message size100 MB100 MB100 MB100 MB100 MB100 MB100 MB
Incoming messages (daily){{ subs_regular[0].quotas.Msg.quota }}{{ subs_regular[1].quotas.Msg.quota }}{{ subs_regular[2].quotas.Msg.quota }}{{ subs_regular[3].quotas.Msg.quota }}{{ subs_regular[4].quotas.Msg.quota }}{{ subs_regular[5].quotas.Msg.quota }}{{ plan.quotas.Msg.quota }}
Outgoing messages (daily){{ subs_regular[0].quotas.Sent.quota }}{{ subs_regular[1].quotas.Sent.quota }}{{ subs_regular[2].quotas.Sent.quota }}{{ subs_regular[3].quotas.Sent.quota }}{{ subs_regular[4].quotas.Sent.quota }}{{ subs_regular[5].quotas.Sent.quota }}{{ plan.quotas.Sent.quota }}
Price for 1 year -
- {{ subs_regular[0].currency.replace("USD","$") }}{{ subs_regular[0].price }} Your current {{ p.type }} -
-
- -
-
-
- {{ subs_regular[1].currency.replace("USD","$") }}{{ subs_regular[1].price }} Your current {{ p.type }} -
-
- -
-
+
- {{ subs_regular[2].currency.replace("USD","$") }}{{ subs_regular[2].price }} Your current {{ p.type }} + {{ plan.currency.replace("USD","$") }}{{ plan.price }} Your current {{ p.type }}
-
-
-
- {{ subs_regular[3].currency.replace("USD","$") }}{{ subs_regular[3].price }} Your current {{ p.type }} -
-
- -
-
-
- {{ subs_regular[4].currency.replace("USD","$") }}{{ subs_regular[4].price }} Your current {{ p.type }} -
-
- -
-
-
- {{ subs_regular[5].currency.replace("USD","$") }}{{ subs_regular[5].price }} Your current {{ p.type }} -
-
- @@ -477,93 +226,24 @@

Price for 3 years -
 {{ subs_regular[0].currency.replace("USD","$") }}{{ subs_regular[0].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[6].currency.replace("USD","$") }}{{ subs_regular[6].price }}
- -
- Save {{ subs_regular[0].currency.replace("USD","$") }}{{ subs_regular[0].price * 3 - subs_regular[6].price | number: '1.2-2' }} -
-
-
 {{ subs_regular[1].currency.replace("USD","$") }}{{ subs_regular[1].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[7].currency.replace("USD","$") }}{{ subs_regular[7].price }}
- -
- Save {{ subs_regular[1].currency.replace("USD","$") }}{{ subs_regular[1].price * 3 - subs_regular[7].price | number: '1.2-2' }} -
-
-
 {{ subs_regular[2].currency.replace("USD","$") }}{{ subs_regular[2].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[8].currency.replace("USD","$") }}{{ subs_regular[8].price }}
+
+
 {{ plan.currency.replace("USD","$") }}{{ plan.price * 3 | number: '1.2-2' }} 
+
{{ subs_three[i].currency.replace("USD","$") }}{{ subs_three[i].price }}
- Save {{ subs_regular[2].currency.replace("USD","$") }}{{ subs_regular[2].price * 3 - subs_regular[8].price | number: '1.2-2' }} -
-
-
 {{ subs_regular[3].currency.replace("USD","$") }}{{ subs_regular[3].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[9].currency.replace("USD","$") }}{{ subs_regular[9].price }}
- -
- Save {{ subs_regular[3].currency.replace("USD","$") }}{{ subs_regular[3].price * 3 - subs_regular[9].price | number: '1.2-2' }} -
-
-
 {{ subs_regular[4].currency.replace("USD","$") }}{{ subs_regular[4].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[10].currency.replace("USD","$") }}{{ subs_regular[10].price }}
- -
- Save {{ subs_regular[4].currency.replace("USD","$") }}{{ subs_regular[4].price * 3 - subs_regular[10].price | number: '1.2-2' }} -
-
-
 {{ subs_regular[5].currency.replace("USD","$") }}{{ subs_regular[5].price * 3 | number: '1.2-2' }} 
-
{{ subs_regular[11].currency.replace("USD","$") }}{{ subs_regular[11].price }}
- -
- Save {{ subs_regular[5].currency.replace("USD","$") }}{{ subs_regular[5].price * 3 - subs_regular[11].price | number: '1.2-2' }} + Save {{ plan.currency.replace("USD","$") }}{{ plan.price * 3 - subs_three[i].price | number: '1.2-2' }}

+