diff --git a/app/javascript/application.scss b/app/javascript/application.scss index 308019248..f1b2c9995 100644 --- a/app/javascript/application.scss +++ b/app/javascript/application.scss @@ -170,3 +170,67 @@ markdown-editor [contenteditable] p { native-action { display: contents; } + +@media (max-width: 767px) { + .table-stack, + .table-stack tbody, + .table-stack tr, + .table-stack td { + display: block; + } + + .table-stack, + div:has(> .table-stack) { + overflow: visible; + } + + .table-stack thead { + display: none; + } + + .table-stack tr { + @apply bg-base-200 rounded-2xl py-3 mb-3 border-0; + } + + .table-stack td { + @apply px-4 py-1; + } + + .table-stack td[data-label] { + @apply flow-root text-right; + overflow-wrap: anywhere; + } + + .table-stack td[data-label]::before { + content: attr(data-label); + @apply float-left mr-4 text-sm leading-6 text-base-content/60; + } + + .table-stack td:first-child { + @apply font-semibold; + } + + .table-stack td:last-child { + @apply grid grid-cols-2 gap-2 pt-3; + } + + .table-stack td:last-child:has(> .dropdown) { + grid-template-columns: repeat(2, minmax(0, 1fr)) auto; + } + + .table-stack td:last-child:not(:has(*)) { + display: none; + } + + .table-stack td:last-child > * { + margin-left: 0 !important; + } + + .table-stack td:last-child > :last-child:nth-child(odd):not(.dropdown) { + @apply col-span-2; + } + + .table-stack td:last-child .btn { + @apply btn-sm w-full; + } +} diff --git a/app/views/esign_settings/_default_signature_row.html.erb b/app/views/esign_settings/_default_signature_row.html.erb index a423d1cbc..5704bf2d5 100644 --- a/app/views/esign_settings/_default_signature_row.html.erb +++ b/app/views/esign_settings/_default_signature_row.html.erb @@ -1,20 +1,22 @@ <% unless turbo_native_ios? %> - - <%= svg_icon('discount_check_filled', class: 'w-6 h-6 shrink-0 text-green-500') %> - - <%= t('docuseal_trusted_signature') %> - - - +
+ <%= svg_icon('discount_check_filled', class: 'w-6 h-6 shrink-0 text-green-500') %> + + <%= t('docuseal_trusted_signature') %> + + +
+ + " class="btn btn-neutral btn-sm text-white whitespace-nowrap"> <%= t('unlock_with_docuseal_pro') %> - +
<%= button_to settings_esign_path, method: :put, params: { name: Docuseal::AATL_CERT_NAME }, class: 'btn btn-outline btn-neutral btn-xs whitespace-nowrap', title: t('make_default'), disabled: true do %> <%= t('make_default') %> diff --git a/app/views/esign_settings/show.html.erb b/app/views/esign_settings/show.html.erb index d8ec568bb..aa6882a0b 100644 --- a/app/views/esign_settings/show.html.erb +++ b/app/views/esign_settings/show.html.erb @@ -32,7 +32,8 @@ <%= t('verify_signed_pdf') %>
- <%= t('click_to_upload_or_drag_and_drop_files_html') %> + <%= t('click_to_upload') %> +
@@ -54,7 +55,7 @@ <%= render 'alert' %>
- +
- -
@@ -77,10 +78,10 @@ <%= item['name'] %> + <%= l(item['pkcs'].certificate.not_after.to_date, format: :long, locale: current_account.locale) %> + <% if item['status'] == 'default' %> <%= t('default') %> diff --git a/app/views/mcp_settings/index.html.erb b/app/views/mcp_settings/index.html.erb index c92936b82..aa2363d7b 100644 --- a/app/views/mcp_settings/index.html.erb +++ b/app/views/mcp_settings/index.html.erb @@ -2,16 +2,15 @@
<%= render 'shared/settings_nav' %>
-
-

+
+

<%= t('mcp_server') %>

-
- <%= link_to new_settings_mcp_path, class: 'btn btn-primary btn-md gap-2 w-full md:w-fit', aria: { label: t('new_token') }, data: { turbo_frame: 'modal' } do %> - <%= svg_icon('plus', class: 'w-6 h-6') %> - <%= t('new_token') %> - <% end %> -
+ <%= link_to new_settings_mcp_path, class: 'shrink-0 btn btn-primary btn-md gap-2', aria: { label: t('new_token') }, data: { turbo_frame: :modal, native_modal: :medium } do %> + <%= svg_icon('plus', class: 'w-6 h-6') %> + <%= t('new') %> + + <% end %>
<% if @mcp_token.present? %>
@@ -48,7 +47,7 @@
<% end %>
- +
- -
@@ -70,14 +69,16 @@ <%= mcp_token.name %> - <% if @mcp_token.present? && mcp_token.id == @mcp_token.id %> - <%= @mcp_token.token %> - <% else %> - <%= "#{mcp_token.token_prefix}#{'*' * 38}" %> - <% end %> + + + <% if @mcp_token.present? && mcp_token.id == @mcp_token.id %> + <%= @mcp_token.token %> + <% else %> + <%= "#{mcp_token.token_prefix}#{'*' * 38}" %> + <% end %> + + <%= l(mcp_token.created_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) %> diff --git a/app/views/templates/_dropzone.html.erb b/app/views/templates/_dropzone.html.erb index 3c028533a..855823781 100644 --- a/app/views/templates/_dropzone.html.erb +++ b/app/views/templates/_dropzone.html.erb @@ -13,7 +13,8 @@ <%= t('upload_a_new_document') %>
- <%= t('click_to_upload_or_drag_and_drop_html') %> + <%= t('click_to_upload') %> +
<% if Docuseal.multitenant? && !turbo_native_app? %> diff --git a/app/views/user_initials/edit.html.erb b/app/views/user_initials/edit.html.erb index 14eba2f16..feef01891 100644 --- a/app/views/user_initials/edit.html.erb +++ b/app/views/user_initials/edit.html.erb @@ -40,7 +40,8 @@ <%= t('upload_initials') %>
- <%= t('click_to_upload_or_drag_and_drop_html') %> + <%= t('click_to_upload') %> +
diff --git a/app/views/user_signatures/edit.html.erb b/app/views/user_signatures/edit.html.erb index 222525e1b..1c91065d6 100644 --- a/app/views/user_signatures/edit.html.erb +++ b/app/views/user_signatures/edit.html.erb @@ -40,7 +40,8 @@ <%= t('upload_signature') %>
- <%= t('click_to_upload_or_drag_and_drop_html') %> + <%= t('click_to_upload') %> +
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 92ef929f3..4b9df351c 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -2,8 +2,8 @@
<%= render 'shared/settings_nav' %>
-
-

+
+

<% if params[:status] == 'archived' %> <%= t('archived_users') %> <% elsif params[:status] == 'integration' %> @@ -12,30 +12,94 @@ <%= t('users') %> <% end %>

-
- <% if params[:status].blank? %> - <% if can?(:create, User.new(account: current_account)) %> - <%= render 'users/extra_buttons' %> - <% if content_for(:add_user_button) %> - <%= content_for(:add_user_button) %> - <% else %> - <%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2 w-full md:w-fit', data: { turbo_frame: 'modal' } do %> - <%= svg_icon('plus', class: 'w-6 h-6') %> - <%= t('new_user') %> - <% end %> - <% end %> - <% else %> -
- <%= link_to '#', class: 'btn btn-primary btn-md gap-2 w-full md:w-fit btn-disabled', data: { turbo_frame: 'modal' } do %> - <%= svg_icon('plus', class: 'w-6 h-6') %> - <%= t('new_user') %> - <% end %> -
+ <% if params[:status].blank? %> + <% if can?(:create, User.new(account: current_account)) %> + <%= link_to new_user_path, class: 'shrink-0 md:order-3 btn btn-primary btn-md gap-2', title: t('new_user'), data: { turbo_frame: 'modal' } do %> + <%= svg_icon('plus', class: 'w-6 h-6') %> + <%= t('new') %> + <% end %> + <% else %> +
+ <%= link_to '#', class: 'btn btn-primary btn-md gap-2 btn-disabled', title: t('new_user'), data: { turbo_frame: 'modal' } do %> + <%= svg_icon('plus', class: 'w-6 h-6') %> + <%= t('new') %> + + <% end %> +
<% end %> -
+ <% end %> + <% if params[:status].blank? && can?(:create, User.new(account: current_account)) %> +
+ <%= render 'users/extra_buttons' %> +
+ <% end %>
-
+
+ <% @users.each do |user| %> + <% can_edit = params[:status].blank? && can?(:update, user) && user.archived_at.blank? %> + <% can_remove = params[:status] != 'archived' && can?(:destroy, user) && user != current_user %> + <% can_unarchive = params[:status] == 'archived' && can?(:create, user) && user != current_user && user.archived_at? %> +
+ + <%= user.initials.presence || user.email.first.upcase %> + +
+
+ <%= user.full_name.presence || user.email %> + <%= t(user.role) %> +
+ <% if user.try(:pending_reconfirmation?) %> +
<%= user.unconfirmed_email %> (<%= t('unconfirmed') %>)
+ <% elsif user.full_name.present? %> +
<%= user.email %>
+ <% end %> +
+ <% if can_edit || can_remove || can_unarchive %> + + + + + <% end %> +
+ <% end %> +
+