1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00
* Change env SELF_HOSTING_ENABLED to SELF_HOSTED

* Initial Stripe implementation

* Fix portal link

* Use webhook signatures

* Migrated to new Stripe gem conventions

Also updated resource routing

* Added faraday-multipart gem to resolve middleware notice

* Merge fix

* Merge fix

* Temporary upgrade prompt for early access

* Lint fix

* i18n fixes

* Remove catch-all rescue

* Update .env.example
This commit is contained in:
Josh Pigford 2024-10-08 14:37:47 -05:00 committed by GitHub
parent 41dff228e8
commit 31f3ff6a16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 225 additions and 12 deletions

View file

@ -22,7 +22,9 @@
</div>
</header>
<% if @accounts.empty? %>
<% if !Current.family.subscribed? && !self_hosted? %>
<%= render "shared/subscribe_prompt" %>
<% elsif @accounts.empty? %>
<%= render "shared/no_account_empty_state" %>
<% else %>
<section class="flex gap-4">

View file

@ -26,6 +26,9 @@
<%= sidebar_link_to t(".self_hosting_label"), settings_hosting_path, icon: "database" %>
</li>
<% end %>
<li>
<%= sidebar_link_to t(".billing_label"), settings_billing_path, icon: "circle-dollar-sign" %>
</li>
<li>
<%= sidebar_link_to t(".accounts_label"), accounts_path, icon: "layers" %>
</li>

View file

@ -0,0 +1,16 @@
<% content_for :sidebar do %>
<%= render "settings/nav" %>
<% end %>
<div class="space-y-4">
<h1 class="text-gray-900 text-xl font-medium mb-4"><%= t(".page_title") %></h1>
<%= settings_section title: t(".subscription_title"), subtitle: t(".subscription_subtitle") do %>
<% if Current.family.stripe_plan_id.blank? %>
<%= link_to t(".subscribe_button"), new_subscription_path, class: "w-fit flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo: false } %>
<% else %>
<%= link_to t(".manage_subscription_button"), subscription_path, class: "w-fit flex text-white text-sm font-medium items-center gap-1 bg-gray-900 rounded-lg p-2", data: { turbo: false } %>
<% end %>
<% end %>
<%= settings_nav_footer %>
</div>

View file

@ -0,0 +1,16 @@
<div class="flex justify-center items-center h-[800px]">
<div class="text-center flex flex-col gap-4 items-center max-w-[300px]">
<%= lucide_icon "circle-fading-arrow-up", class: "w-8 h-8 text-green-500" %>
<div class="space-y-1 text-sm">
<p class="text-gray-900 font-medium"><%= t(".title") %></p>
<p class="text-gray-500"><%= t(".subtitle") %></p>
<p class="text-gray-400 text-xs"><%= t(".guarantee") %></p>
</div>
<%= link_to new_subscription_path, class: "btn btn--primary flex items-center gap-1" do %>
<%= lucide_icon("credit-card", class: "w-5 h-5") %>
<span><%= t(".subscribe") %></span>
<% end %>
</div>
</div>