2025-02-21 11:57:59 -05:00
|
|
|
<%= content_for :page_title, t(".page_title") %>
|
2024-10-24 11:02:27 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= settings_section title: t(".subscription_title"), subtitle: t(".subscription_subtitle") do %>
|
|
|
|
<div class="space-y-4">
|
2025-04-11 09:28:00 -05:00
|
|
|
<div class="p-3 shadow-border-xs bg-container rounded-lg flex justify-between items-center">
|
2025-02-21 11:57:59 -05:00
|
|
|
<div class="flex items-center gap-3">
|
2025-05-01 16:47:14 -04:00
|
|
|
<%= render FilledIconComponent.new(
|
|
|
|
icon: "gem",
|
|
|
|
rounded: true,
|
|
|
|
size: "lg"
|
|
|
|
) %>
|
2024-10-24 11:02:27 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<div class="text-sm space-y-1">
|
2025-05-01 16:47:14 -04:00
|
|
|
<% if subscription_pending? %>
|
|
|
|
<p class="text-primary">
|
|
|
|
Your subscription is pending. You can still use Maybe+ while we process your subscription.
|
|
|
|
</p>
|
|
|
|
<% elsif @user.family.trialing? %>
|
|
|
|
<p class="text-primary">
|
|
|
|
You are currently trialing <span class="font-medium">Maybe+</span>
|
|
|
|
<span class="text-secondary">
|
|
|
|
(<%= @user.family.trial_remaining_days %> days remaining)
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<% elsif @user.family.subscribed? %>
|
2025-02-21 11:57:59 -05:00
|
|
|
<p class="text-primary">You are currently subscribed to <span class="font-medium">Maybe+</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 Maybe+, you'll see your billing settings here.</p>
|
2024-10-24 11:02:27 -04:00
|
|
|
<% end %>
|
2025-02-21 11:57:59 -05:00
|
|
|
</div>
|
2024-10-24 11:02:27 -04:00
|
|
|
</div>
|
|
|
|
|
2025-05-01 16:47:14 -04:00
|
|
|
<% if @user.family.subscribed? %>
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render LinkComponent.new(
|
|
|
|
text: "Manage",
|
|
|
|
icon: "external-link",
|
|
|
|
variant: "primary",
|
|
|
|
icon_position: "right",
|
|
|
|
href: subscription_path,
|
|
|
|
rel: "noopener"
|
|
|
|
) %>
|
2025-05-01 16:47:14 -04:00
|
|
|
<% elsif @user.family.trialing? && !subscription_pending? %>
|
2025-04-30 18:14:22 -04:00
|
|
|
<%= render LinkComponent.new(
|
2025-05-01 16:47:14 -04:00
|
|
|
text: "Choose plan",
|
2025-04-30 18:14:22 -04:00
|
|
|
variant: "primary",
|
2025-05-01 16:47:14 -04:00
|
|
|
icon: "plus",
|
2025-04-30 18:14:22 -04:00
|
|
|
icon_position: "right",
|
2025-05-01 16:47:14 -04:00
|
|
|
href: upgrade_subscription_path(view: "upgrade"),
|
2025-04-30 18:14:22 -04:00
|
|
|
rel: "noopener") %>
|
2025-02-21 11:57:59 -05:00
|
|
|
<% end %>
|
2024-10-24 11:02:27 -04:00
|
|
|
</div>
|
2024-10-08 14:37:47 -05:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<%= image_tag "stripe-logo.svg", class: "w-5 h-5 shrink-0" %>
|
2025-03-11 13:00:34 -05:00
|
|
|
<p class="text-secondary text-sm">Billing via Stripe</p>
|
2025-02-21 11:57:59 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|