style storage settings
This commit is contained in:
@@ -50,3 +50,7 @@ button[disabled] .enabled {
|
||||
.base-checkbox {
|
||||
@apply checkbox rounded bg-white checkbox-sm no-animation;
|
||||
}
|
||||
|
||||
.base-radio {
|
||||
@apply radio bg-white radio-sm;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="flex space-x-8">
|
||||
<div class="flex">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="mt-4 w-full">
|
||||
<div class="max-w-xl mx-auto">
|
||||
<h1 class="text-3xl font-bold text-left mb-4">Email Settings</h1>
|
||||
<h1 class="text-4xl font-bold mb-4">Email SMTP</h1>
|
||||
<p>
|
||||
Configure your to send emails (TODO)
|
||||
</p>
|
||||
<% value = @encrypted_config.value || {} %>
|
||||
<%= form_for @encrypted_config, url: settings_email_index_path, method: :post, html: { autocomplete: 'off', class: 'space-y-4' } do |f| %>
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
@@ -32,14 +35,14 @@
|
||||
<%= ff.email_field :from_email, value: value['from_email'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex justify-end">
|
||||
<div class="form-control">
|
||||
<div>
|
||||
<div class="form-control mt-8">
|
||||
<%= f.button button_title, class: 'base-button' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-2 w-52"></div>
|
||||
<div class="px-2 w-52 flex-none"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= form_for '', url: settings_esign_index_path, method: :post do |f| %>
|
||||
<file-dropzone data-name="verify_attachments">
|
||||
<label for="file">
|
||||
<input id="attachment_uuid" name="attachment_uuid" class="hidden" data-target="file-dropzone.valueField" type="text">
|
||||
<input id="attachment_uuid" name="attachment_uuid" class="hidden" data-target="file-dropzone.valueField" type="text" autocomplete="off">
|
||||
<input id="file" class="hidden" data-action="change:file-dropzone#onSelectFiles" data-target="file-dropzone.input" type="file">
|
||||
LCick to upload
|
||||
</label>
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
<turbo-frame id="modal"></turbo-frame>
|
||||
<%= render 'shared/navbar' %>
|
||||
<% if flash.present? %>
|
||||
<div id="flash" class="max-w-xl mx-auto px-2">
|
||||
<div class="alert shadow-lg">
|
||||
<div class="flex w-full justify-between">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<span class="w-full"><%= flash[:notice] || flash[:alert] %></span>
|
||||
<a href="#" onclick="[event.preventDefault(), window.flash.remove()]">×</a>
|
||||
<div id="flash" class="absolute top-0 w-full">
|
||||
<div class="max-w-xl mx-auto mt-1.5">
|
||||
<div class="alert shadow-lg py-3">
|
||||
<div class="flex w-full justify-between">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<span class="w-full"><%= flash[:notice] || flash[:alert] %></span>
|
||||
<a href="#" onclick="[event.preventDefault(), window.flash.remove()]">×</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="max-w-6xl mx-auto px-2 py-2 flex items-center justify-between">
|
||||
<div class="max-w-6xl mx-auto px-2 py-3 flex items-center justify-between">
|
||||
<a href="<%= root_path %>" class="text-2xl font-bold">
|
||||
<span>DocuSeal</span>
|
||||
</a>
|
||||
@@ -7,7 +7,7 @@
|
||||
<%= link_to 'Settings', settings_storage_index_path, class: 'font-medium text-lg' %>
|
||||
<div class="dropdown dropdown-end">
|
||||
<label tabindex="0" class="cursor-pointer bg-neutral-focus text-neutral-content rounded-full w-8 p-2">
|
||||
<span class="text-sm"><%= current_user.initials %></span>
|
||||
<span class="text-sm align-text-top"><%= current_user.initials %></span>
|
||||
</label>
|
||||
<ul tabindex="0" class="dropdown-content p-2 mt-2 shadow-2xl menu bg-white rounded-box whitespace-nowrap">
|
||||
<li class>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<menu-active class="block">
|
||||
<menu-active class="block w-52 flex-none">
|
||||
<div class="mt-4 -ml-3.5">
|
||||
<ul class="menu menu-compact px-2 w-52">
|
||||
<ul class="menu menu-compact px-2">
|
||||
<li class="menu-title"><span>Settings</span></li>
|
||||
<li></li>
|
||||
<li>
|
||||
|
||||
@@ -1,74 +1,93 @@
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="flex space-x-8">
|
||||
<div class="flex">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="mt-4">
|
||||
Storage settings
|
||||
<% value = @encrypted_config.value || { 'service' => 'disk' } %>
|
||||
<% configs = value['configs'] || {} %>
|
||||
<%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off' } do |f| %>
|
||||
<% options = [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']] %>
|
||||
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>">
|
||||
<% [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']].each do |(label, val)| %>
|
||||
<%= f.radio_button :selected, val, checked: value['service'] == val, data: { action: 'change:toggle-visible#trigger' } %>
|
||||
<%= f.label :selected, label, value: val %>
|
||||
<% end %>
|
||||
</toggle-visible>
|
||||
<disable-hidden id="disk" class="<%= 'hidden' if value['service'] != 'disk' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'disk' %>
|
||||
<% end %>
|
||||
<div>
|
||||
Disk storage - no configs needed but make sure you have a persistant disk (heroku doesnt not have one)
|
||||
<div class="mt-4 w-full">
|
||||
<div class="max-w-xl mx-auto">
|
||||
<h1 class="text-4xl font-bold mb-4">Storage</h1>
|
||||
<p class="mb-4">
|
||||
Select files torage option (TODO)
|
||||
</p>
|
||||
<% value = @encrypted_config.value || { 'service' => 'disk' } %>
|
||||
<% configs = value['configs'] || {} %>
|
||||
<%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' } do |f| %>
|
||||
<% options = [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']] %>
|
||||
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
|
||||
<div class="flex space-x-2 relative">
|
||||
<% [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']].each do |(label, val)| %>
|
||||
<%= f.label :selected, value: val, class: 'w-full flex flex-1 items-center space-x-2 btn btn-outline rounded-xl' do %>
|
||||
<%= f.radio_button :selected, val, checked: value['service'] == val, data: { action: 'change:toggle-visible#trigger' }, class: 'base-radio' %>
|
||||
<span><%= label %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</toggle-visible>
|
||||
<disable-hidden id="disk" class="<%= 'hidden' if value['service'] != 'disk' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'disk' %>
|
||||
<% end %>
|
||||
<div class="text-center max-w-xl mx-auto my-8 text-xl font-medium leading-9">
|
||||
Store all files on disk
|
||||
<br>
|
||||
No configs are needed but make sure your disk is persistent
|
||||
<br>
|
||||
(not suitable for Heroku and other PaaS)
|
||||
</div>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="aws_s3" class="<%= 'hidden' if value['service'] != 'aws_s3' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'aws_s3' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :access_key_id, 'Access key ID' %>
|
||||
<%= fff.text_field :access_key_id, value: configs['access_key_id'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :secret_access_key %>
|
||||
<%= fff.password_field :secret_access_key, value: configs['secret_access_key'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :region %>
|
||||
<%= fff.text_field :region, value: configs['region'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'aws_s3' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :endpoint %>
|
||||
<%= fff.text_field :endpoint, value: configs['endpoint'], type: :url %>
|
||||
<small>
|
||||
For AWS S3 compantiable APIs like Minio.
|
||||
</small>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="google" class="<%= 'hidden' if value['service'] != 'google' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'google' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :project, 'Project' %>
|
||||
<%= fff.text_field :project, value: configs['project'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :credentials, 'Credentials (JSON key content)' %>
|
||||
<%= fff.text_area :credentials, value: configs['credentials'], required: true %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</disable-hidden>
|
||||
<div class="form-control">
|
||||
<%= f.button button_title('OK'), class: 'base-button' %>
|
||||
</div>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="aws_s3" class="<%= 'hidden' if value['service'] != 'aws_s3' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'aws_s3' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :access_key_id, 'Access key ID' %>
|
||||
<%= fff.text_field :access_key_id, value: configs['access_key_id'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :secret_access_key %>
|
||||
<%= fff.password_field :secret_access_key, value: configs['secret_access_key'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :region %>
|
||||
<%= fff.text_field :region, value: configs['region'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'aws_s3' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :endpoint %>
|
||||
<%= fff.text_field :endpoint, value: configs['endpoint'], type: :url %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="google" class="<%= 'hidden' if value['service'] != 'google' %>">
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'google' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :project, 'Project' %>
|
||||
<%= fff.text_field :project, value: configs['project'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :credentials, 'Credentials (JSON key content)' %>
|
||||
<%= fff.text_area :credentials, value: configs['credentials'], required: true %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</disable-hidden>
|
||||
<%= f.button button_title %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-2 w-52 flex-none"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="flex space-x-8">
|
||||
<div class="flex space-x-2">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="mt-4 w-full px-2">
|
||||
<div class="flex justify-between mb-4 items-center">
|
||||
<h1 class="text-3xl font-bold text-left">Users</h1>
|
||||
<div class="flex justify-between mb-4">
|
||||
<h1 class="text-4xl font-bold">Users</h1>
|
||||
<%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: 'modal' } do %>
|
||||
<svg
|
||||
class="w-6 h-6"
|
||||
@@ -52,7 +52,6 @@
|
||||
Last session
|
||||
</th>
|
||||
<th scope="col" class="text-right" width="1px">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user