<% if Current.account.exceeding_storage_limit? %> You’ve run out of storage <% elsif Current.account.nearing_plan_storage_limit? %> You’ve used <%= storage_to_human_size(Current.account.billed_bytes_used) %> of storage <% else %> Thank you for buying Fizzy <% end %>

<% if Current.account.nearing_plan_storage_limit? || Current.account.exceeding_storage_limit? %>

The <%= Current.account.plan.name %> plan includes <%= storage_to_human_size(Plan.paid.storage_limit) %>. Upgrade to get <%= storage_to_human_size(Plan.paid_with_extra_storage.storage_limit) %> extra storage for <%= format_currency(Plan.paid_with_extra_storage.price - Plan.paid.price) %>/month more.

<%= button_to "Upgrade to #{Plan.paid_with_extra_storage.name} for #{ number_to_currency(Plan.paid_with_extra_storage.price, strip_insignificant_zeros: true) }/month", account_subscription_upgrade_path, class: "btn settings-subscription__button txt-medium", form: { data: { turbo: false } } %> <% end %> <% if Current.account.subscription %> <%= render "account/settings/subscription", subscription: Current.account.subscription %> <% end %>