Add 1GB storage limit with self-host notice for SaaS
Limit free storage to 1GB on the SaaS version. When exceeded, card publishing, comment creation, and JSON card creation are blocked, and the card footer shows a "self-host Fizzy for unlimited storage" notice instead of the create buttons. A nearing-limit warning appears when usage exceeds 500MB. Uses the same SaaS engine patterns as the removed billing system: model concern on Account, controller concerns included via config.to_prepare, view partials in saas/ with Fizzy.saas? guards in the main app.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<%= messages_tag(card) do %>
|
||||
<% if card.published? %>
|
||||
<%= render partial: "cards/comments/comment", collection: card.comments.preloaded.chronologically, cached: true %>
|
||||
<%= render "cards/comments/new", card: card %>
|
||||
<% if Fizzy.saas? %>
|
||||
<%= render "cards/comments/saas/new", card: card %>
|
||||
<% else %>
|
||||
<%= render "cards/comments/new", card: card %>
|
||||
<% end %>
|
||||
|
||||
<%= render "cards/comments/watchers", card: card %>
|
||||
<% end %>
|
||||
|
||||
@@ -13,5 +13,7 @@
|
||||
<span>Create and add another</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render "cards/container/footer/saas/storage_limit_notice" if Fizzy.saas? %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -26,5 +26,9 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "cards/container/footer/create", card: card %>
|
||||
<% if Fizzy.saas? %>
|
||||
<%= render "cards/container/footer/saas/create", card: card %>
|
||||
<% else %>
|
||||
<%= render "cards/container/footer/create", card: card %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user