Files
sure/app/views/settings/billings/show.html.erb
Juan José Mata 7c5ddd674d Make branding configurable (#173)
* Remove orphan function

* Add centralized branding helpers and update locales

* Remove _plus and add (proper) brand

* No longer Sure, configurable

* Consistency with compose file naming

* Missed `product_name` mapping

* Fix brand/product name in mailers

* Product name in email reset flow

* Fix i18n errors/tests

* Fix password mailer brand/product name (again)

* Missed hardcoded `Sure` in onboarding goals

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* PR nitpick on documentation

* Missing interpolation key for invited UI

* Orphan assets

* New logos

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-22 19:14:03 +02:00

62 lines
2.2 KiB
Plaintext

<%= content_for :page_title, t(".page_title") %>
<%= settings_section title: t(".subscription_title"), subtitle: t(".subscription_subtitle") do %>
<div class="space-y-4">
<div class="p-3 shadow-border-xs bg-container rounded-lg flex justify-between items-center">
<div class="flex items-center gap-3">
<%= render DS::FilledIcon.new(
icon: "gem",
rounded: true,
size: "lg"
) %>
<div class="text-sm space-y-1">
<% if @family.has_active_subscription? %>
<p class="text-primary">
<span>You are currently subscribed to the <span class="font-medium"><%= @family.subscription.name %></span>.</span>
<% if @family.next_billing_date %>
<span>Your plan renews on <span class="font-medium"><%= @family.next_billing_date.strftime("%B %d, %Y") %></span>.</span>
<% end %>
</p>
<% elsif @family.trialing? %>
<p class="text-primary">
You are currently trialing <%= product_name %>
<span class="text-secondary">
(<%= @family.days_left_in_trial %> days remaining)
</span>
</p>
<% else %>
<p class="text-primary">You are currently <span class="font-medium">not subscribed</span></p>
<p class="text-secondary">Once you subscribe to <%= product_name %>, you'll see your billing settings here.</p>
<% end %>
</div>
</div>
<% if @family.has_active_subscription? %>
<%= render DS::Link.new(
text: "Manage",
icon: "external-link",
variant: "primary",
icon_position: "right",
href: subscription_path,
rel: "noopener"
) %>
<% else %>
<%= render DS::Link.new(
text: "Choose plan",
variant: "primary",
icon: "plus",
icon_position: "right",
href: upgrade_subscription_path(view: "upgrade"),
rel: "noopener") %>
<% end %>
</div>
<div class="flex items-center gap-2">
<%= image_tag "stripe-logo.svg", class: "w-5 h-5 shrink-0" %>
<p class="text-secondary text-sm">Billing via Stripe</p>
</div>
</div>
<% end %>