Skip to content

Commit

Permalink
better on prem console sign up
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Jan 31, 2024
1 parent a582d39 commit 68196d6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
12 changes: 10 additions & 2 deletions app/views/devise/registrations/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<div class="max-w-lg mx-auto px-2">
<%= render 'devise/shared/select_server' if Docuseal.multitenant? %>
<h1 class="text-3xl font-bold text-center mt-8 mb-6">Create Free Account</h1>
<% if params[:redir].to_s.ends_with?('on_premise') %>
<h1 class="text-3xl font-bold text-center mt-8 mb-6">DocuSeal Console</h1>
<div class="alert my-4 text-sm">
Sign up in DocuSeal Console to upgrade.
On-premises app is completely standalone, Console is used only to manage your license.
</div>
<% else %>
<%= render 'devise/shared/select_server' if Docuseal.multitenant? %>
<h1 class="text-3xl font-bold text-center mt-8 mb-6">Create Free Account</h1>
<% end %>
<%= form_for(User.new, html: { class: 'space-y-6' }, url: new_registration_path, data: { turbo: params[:redir].blank? }, method: :get) do |f| %>
<% if params[:redir].present? %>
<%= hidden_field_tag :redir, params[:redir] %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_navbar_buttons.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= link_to Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CONSOLE_URL}/on_premise", class: 'hidden md:inline-flex btn btn-warning btn-sm', data: { prefetch: false } do %>
<%= link_to Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CLOUD_URL}/sign_up?#{{ redir: "#{Docuseal::CONSOLE_URL}/on_premise" }.to_query}", class: 'hidden md:inline-flex btn btn-warning btn-sm', data: { prefetch: false } do %>
Upgrade
<% end %>
<% if signed_in? && current_user != true_user %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_settings_nav.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<%= render 'shared/settings_nav_extra' %>
<% if !Docuseal.demo? && can?(:manage, EncryptedConfig) %>
<li>
<%= link_to Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CONSOLE_URL}/on_premise", class: 'text-base hover:bg-base-300', data: { prefetch: false } do %>
<%= link_to Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CLOUD_URL}/sign_up?#{{ redir: "#{Docuseal::CONSOLE_URL}/on_premise" }.to_query}", class: 'text-base hover:bg-base-300', data: { prefetch: false } do %>
Plans
<span class="badge badge-warning">New</span>
<% end %>
Expand Down
5 changes: 5 additions & 0 deletions lib/docuseal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ module Docuseal
else
'https://console.docuseal.co'
end
CLOUD_URL = if Rails.env.development?
'http://localhost:3000'
else
'https://docuseal.co'
end
CDN_URL = if Rails.env.development?
'http://localhost:3000'
elsif ENV['MULTITENANT'] == 'true'
Expand Down

0 comments on commit 68196d6

Please sign in to comment.