review fixes

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:18 +03:00
1 parent d071e8c429
commit e11f4bddbe
40 files changed
+299 -192

No files matched your search

+1 -1
View File
@@ -303,6 +303,6 @@
</div>
<% end %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
<%= render 'shared/app_tour', type: 'account' %>
+7 -4
View File
@@ -1,7 +1,10 @@
<div class="max-w-lg mx-auto px-2">
<h1 class="text-4xl font-bold text-center mt-8">
<%= t('forgot_your_password_') %>
</h1>
<% content_for(:native_title, t('forgot_your_password_')) if turbo_native_app? %>
<div class="max-w-lg mx-auto <%= turbo_native_app? ? 'pb-6' : 'px-2' %>">
<% unless turbo_native_app? %>
<h1 class="text-4xl font-bold text-center mt-8">
<%= t('forgot_your_password_') %>
</h1>
<% end %>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'space-y-6' }) do |f| %>
<div class="space-y-2">
<%= render 'devise/shared/error_messages', resource: %>
+1 -1
View File
@@ -64,5 +64,5 @@
</div>
<% end %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+1 -1
View File
@@ -1,5 +1,5 @@
<title>
<%= content_for(:native_title) || content_for(:html_title) || (signed_in? ? 'DocuSeal' : 'DocuSeal | Open Source Document Signing') %>
<%= turbo_native_app? ? content_for(:native_title) : (content_for(:html_title) || (signed_in? ? 'DocuSeal' : 'DocuSeal | Open Source Document Signing')) %>
</title>
<%= render 'shared/meta' %>
<% if turbo_native_app? %>
@@ -8,6 +8,8 @@
"fields": <%== t('fields').to_json %>,
"more": <%== t('more').to_json %>,
"close": <%== t('close').to_json %>,
"settings": <%== t('settings').to_json %>,
"sign_out": <%== t('sign_out').to_json %>,
"cancel": <%== t('cancel').to_json %>,
"ok": <%== t('ok').to_json %>,
"failed_to_download_files": <%== t('failed_to_download_files').to_json %>,
@@ -32,5 +32,5 @@
<%= render 'reminder_form', config: @reminder_config %>
<% end %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
@@ -26,5 +26,5 @@
</div>
<%= render 'form_customization_settings' %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+1 -1
View File
@@ -107,5 +107,5 @@
</div>
<% end %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+7
View File
@@ -27,5 +27,12 @@
<native-action data-placement="create" data-icon="pencil_plus">
<%= link_to t('create'), new_template_path(folder_name: folder_name), data: { turbo_frame: :modal, native_modal: :medium } %>
</native-action>
<% unless controller_name.in?(%w[templates_archived submissions_archived]) %>
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="upload" data-native="upload" data-label="<%= t('upload') %>" data-url="<%= templates_upload_path(folder_name: folder_name) %>" data-accept="image/*, application/pdf, application/zip, application/json<%= ", #{Templates::CreateAttachments::DOCUMENT_EXTENSIONS.join(', ')}" if Docuseal.advanced_formats? %>"></native-action>
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="scan" data-native="scan" data-label="<%= t('scan') %>" data-url="<%= templates_upload_path(folder_name: folder_name) %>"></native-action>
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="pencil_plus">
<%= link_to t('create'), new_template_path(folder_name: folder_name), data: { turbo_frame: :modal, native_modal: :medium } %>
</native-action>
<% end %>
<% end %>
<% end %>
+17 -16
View File
@@ -1,5 +1,6 @@
<% expanded = local_assigns[:expanded] %>
<div class="<%= expanded ? 'block -mx-3 md:mx-0' : 'w-full md:w-52 flex-none' %>">
<% nav_link_data = turbo_native_app? && !expanded ? { turbo_action: 'replace' } : {} %>
<div class="<%= expanded ? 'block -mx-3 md:mx-0' : 'w-full md:w-52 flex-none' %> <%= 'md:sticky md:top-0 md:self-start' if turbo_native_app? && !expanded %>">
<% unless expanded || turbo_native_app? %>
<div class="md:hidden w-full">
<a href="<%= local_assigns[:back_path] || settings_path %>" class="flex items-center space-x-0.5 font-medium">
@@ -26,60 +27,60 @@
<li></li>
<% end %>
<li>
<%= link_to t('profile'), settings_profile_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('profile'), settings_profile_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<li>
<%= link_to t('account'), settings_account_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('account'), settings_account_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% if (!Docuseal.multitenant? || EncryptedConfig.exists?(key: EncryptedConfig::EMAIL_SMTP_KEY, account: current_account)) && can?(:read, EncryptedConfig.new(key: EncryptedConfig::EMAIL_SMTP_KEY, account: current_account)) && ENV['SMTP_ADDRESS'].blank? && true_user == current_user %>
<li>
<%= link_to t('email'), settings_email_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('email'), settings_email_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% unless Docuseal.multitenant? %>
<% if can?(:read, EncryptedConfig.new(key: EncryptedConfig::FILES_STORAGE_KEY, account: current_account)) && true_user == current_user && ENV['S3_ATTACHMENTS_BUCKET'].blank? && ENV['GCS_BUCKET'].blank? && ENV['AZURE_CONTAINER'].blank? %>
<li>
<%= link_to t('storage'), settings_storage_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('storage'), settings_storage_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% if can?(:read, EncryptedConfig.new(key: 'submitter_invitation_sms', account: current_account)) && true_user == current_user && (!turbo_native_ios? || can?(:manage, :sms_verification)) %>
<li>
<%= link_to 'SMS', settings_sms_path, class: 'text-base hover:bg-base-300' %>
<%= link_to 'SMS', settings_sms_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% end %>
<% if can?(:read, AccountConfig) %>
<li>
<%= link_to t('notifications'), settings_notifications_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('notifications'), settings_notifications_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% if can?(:read, EncryptedConfig.new(key: EncryptedConfig::ESIGN_CERTS_KEY, account: current_account)) %>
<li>
<%= link_to t('e_signature'), settings_esign_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('e_signature'), settings_esign_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% if can?(:read, AccountConfig) %>
<li>
<%= link_to t('personalization'), settings_personalization_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('personalization'), settings_personalization_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% if can?(:read, User) %>
<li>
<%= link_to t('users'), settings_users_path, class: 'text-base hover:bg-base-300' %>
<%= link_to t('users'), settings_users_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<%= render 'shared/settings_nav_extra' %>
<%= render 'shared/settings_nav_extra', nav_link_data: %>
<% if Docuseal.demo? || !Docuseal.multitenant? %>
<% if can?(:read, AccessToken) %>
<li>
<%= link_to 'API', settings_api_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to 'API', settings_api_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% end %>
<% if Docuseal.demo? || !Docuseal.multitenant? || (current_user != true_user && !current_account.testing?) %>
<% if can?(:read, WebhookUrl) %>
<li>
<%= link_to 'Webhooks', settings_webhooks_path, class: 'text-base hover:bg-base-300' %>
<%= link_to 'Webhooks', settings_webhooks_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% end %>
@@ -108,15 +109,15 @@
<% end %>
<% if (!Docuseal.multitenant? || can?(:manage, :saml_sso)) && can?(:read, EncryptedConfig.new(key: 'saml_configs', account: current_account)) && true_user == current_user && (!turbo_native_ios? || can?(:manage, :saml_sso)) %>
<li>
<%= link_to 'SSO', settings_sso_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to 'SSO', settings_sso_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<% if !Docuseal.multitenant? && can?(:read, McpToken) && can?(:manage, :mcp) %>
<li>
<%= link_to 'MCP', settings_mcp_index_path, class: 'text-base hover:bg-base-300' %>
<%= link_to 'MCP', settings_mcp_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
</li>
<% end %>
<%= render 'shared/settings_nav_extra2' %>
<%= render 'shared/settings_nav_extra2', nav_link_data: %>
<% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %>
<%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :post, html: { class: 'w-full' } do |f| %>
<li>
+1 -1
View File
@@ -1,5 +1,5 @@
<% if turbo_native_app? && !turbo_frame_request? %>
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
<turbo-frame id="drawer">
<native-modal class="block w-full" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
<%= yield %>
+1 -1
View File
@@ -1,6 +1,6 @@
<% if turbo_native_ios? || (turbo_native_app? && !turbo_frame_request?) %>
<% content_for(:native_modal, 'true') %>
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
<turbo-frame id="modal">
<native-modal class="block max-w-lg mx-auto pb-6" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
<%= yield %>
+1 -1
View File
@@ -18,7 +18,7 @@
</turbo-modal>
</turbo-frame>
<% elsif turbo_native_app? %>
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
<native-modal class="block w-full [&>.px-5]:px-4" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
<%= yield %>
</native-modal>
+1 -1
View File
@@ -5,5 +5,5 @@
<h1 class="text-3xl md:text-4xl font-bold mb-4">SMS</h1>
<%= render 'placeholder' %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+1 -1
View File
@@ -5,5 +5,5 @@
<h1 class="text-3xl md:text-4xl font-bold mb-4">SAML SSO</h1>
<%= render 'placeholder' %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+2 -2
View File
@@ -7,7 +7,7 @@
</h1>
<% 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| %>
<%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' }, data: { turbo_action: 'advance' } do |f| %>
<% options = [%w[Disk disk], %w[AWS aws_s3], %w[GCP google], %w[Azure azure]] %>
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
<ul class="items-center w-full text-sm font-medium text-gray-900 space-y-2 sm:space-y-0 sm:flex sm:space-x-2">
@@ -36,5 +36,5 @@
</div>
<% end %>
</div>
<div class="w-0 md:w-52"></div>
<div class="w-0 lg:w-52"></div>
</div>
+6 -4
View File
@@ -111,20 +111,21 @@
</div>
<% end %>
<% elsif @submission.submitters.to_a.size == 1 && !@submission.expired? && !@submission.submitters.to_a.first.declined_at? && !@submission.archived_at? && !@submission.template&.archived_at? %>
<native-action data-label="<%= t('copy_share_link') %>" data-icon="link">
<native-action data-label="<%= t('share_link') %>" data-icon="link">
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: @submission.submitters.to_a.first.slug, host: form_link_host), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy_share_link'), copied_title: t('copied_to_clipboard') %>
</native-action>
<% end %>
</div>
</div>
<% end %>
<div class="flex md:max-h-[calc(100vh-60px)]">
<div class="flex <%= 'md:max-h-[calc(100vh-60px)]' unless turbo_native_app? %>">
<% values = @submission.submitters.reduce({}) { |acc, sub| acc.merge(sub.values) } %>
<% service_url_time = ActiveStorage::Attachment.service_url_time %>
<% attachments_index = ActiveStorage::Attachment.where(record: @submission.submitters, name: :attachments).preload(:blob).index_by(&:uuid) %>
<% unless native_tab == 'recipients' %>
<% schema = Submissions.filtered_conditions_schema(@submission, values:) %>
<% unless turbo_native_app? %>
<div class="overflow-y-auto overflow-x-hidden hidden lg:block w-52 flex-none pr-3 mt-0.5 pt-0.5" tabindex="0">
<% schema = Submissions.filtered_conditions_schema(@submission, values:) %>
<% schema.each do |item| %>
<% document = @submission.schema_documents.find { |a| item['attachment_uuid'] == a.uuid } %>
<% if document.preview_images.first %>
@@ -137,6 +138,7 @@
<% end %>
<% end %>
</div>
<% end %>
<div id="document_view" class="w-full overflow-y-auto overflow-x-hidden mt-0.5 pt-0.5" tabindex="0">
<div class="pr-3.5 pl-0.5 max-md:pr-4 max-md:pl-0">
<% fields_index = Templates.build_field_areas_index(@submission.template_fields || @submission.template.fields) %>
@@ -193,7 +195,7 @@
</div>
<% end %>
<% unless native_tab == 'document' %>
<div id="parties_view" class="<%= 'hidden md:block' unless native_tab %> relative w-full md:w-80 flex-none pt-0.5 pr-4 pl-0.5 max-md:pl-0 overflow-auto space" tabindex="0">
<div id="parties_view" class="<%= 'hidden md:block md:w-80' unless native_tab %> relative w-full flex-none pt-0.5 pr-4 pl-0.5 max-md:pl-0 overflow-auto space" tabindex="0">
<% colors = %w[bg-red-500 bg-sky-500 bg-emerald-500 bg-yellow-300 bg-purple-600 bg-pink-500 bg-cyan-500 bg-orange-500 bg-lime-500 bg-indigo-500] %>
<% submitter_fields_index = (@submission.template_fields || @submission.template.fields).group_by { |f| f['submitter_uuid'] } %>
<% submitter_field_counters = Hash.new { 0 } %>
@@ -11,7 +11,7 @@
<% end %>
</div>
<% end %>
<div class="flex flex-col md:flex-row md:items-center mb-4 <%= 'gap-3' unless turbo_native_app? %>">
<div class="flex flex-col mb-4 <%= 'md:flex-row md:items-center gap-3' unless turbo_native_app? %>">
<div class="group/header flex w-full justify-between items-center">
<% unless turbo_native_app? %>
<div class="max-md:group-has-[search-input:focus-within]/header:hidden">
@@ -43,7 +43,7 @@
<% end %>
<% if is_show_tabs %>
<div class="flex items-center flex-col md:flex-row md:flex-wrap gap-2 mb-4">
<div class="hidden md:flex md:items-end gap-2 md:w-fit">
<div class="hidden <%= 'md:flex' unless turbo_native_app? %> md:items-end gap-2 md:w-fit">
<a href="<%= url_for(params: request.query_parameters.except('status')) %>" class="<%= params[:status].blank? ? 'border-neutral-700' : 'border-neutral-300' %> flex h-10 px-2 py-1 text-lg items-center justify-between border text-center text-neutral font-semibold rounded-xl w-full md:w-48 hover:border-neutral-600">
<div class="flex items-center space-x-1">
<%= svg_icon('list', class: 'w-5 h-5') %>
@@ -6,7 +6,7 @@
<% status_icons = { 'all' => 'list', 'pending' => 'clock', 'completed' => 'circle_check' } %>
<% current_status = status_icons.key?(params[:status].to_s) ? params[:status].to_s : 'all' %>
<% status_icon = { 'declined' => 'x_circle', 'expired' => 'clock_cancel', 'partially_completed' => 'clock_edit', 'sent' => 'send', 'opened' => 'mail_opened' }[params[:status]] %>
<% default_status_icon = status_icons[params[:status]] if status_icon.blank? && local_assigns[:with_default_status] && current_status != 'all' %>
<% default_status_icon = status_icons[params[:status]] if status_icon.blank? && local_assigns[:with_default_status] && current_status != 'all' && !turbo_native_app? %>
<% with_status_button = local_assigns[:with_status] && status_icon.blank? %>
<% status_chip_html = capture do %>
<% if status_icon || default_status_icon %>
@@ -105,7 +105,7 @@
<% end %>
<% with_status_dropdown = with_status_button && chips_html.blank? %>
<% if with_status_dropdown %>
<native-menu class="<%= turbo_native_app? ? 'block' : 'dropdown' %> md:hidden shrink-0">
<native-menu class="<%= turbo_native_app? ? 'block' : 'dropdown md:hidden' %> shrink-0">
<label tabindex="0" class="cursor-pointer flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
<%= svg_icon(status_icons[current_status], class: 'w-5 h-5 shrink-0') %>
<span><%= t(current_status) %></span>
@@ -157,7 +157,7 @@
<% if chips_html.present? || status_chip_html.present? %>
<scroll-fade class="flex items-center gap-2 overflow-x-auto flex-1 min-w-0 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&::-webkit-scrollbar]:h-0 [&::-webkit-scrollbar]:w-0 md:contents <%= 'max-md:hidden' if with_status_dropdown %>">
<% if with_status_button && !with_status_dropdown %>
<a href="<%= submissions_filter_path('status', query_params.merge(path: url_for)) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('status') %>" class="order-none md:hidden flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl shrink-0 <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
<a href="<%= submissions_filter_path('status', query_params.merge(path: url_for)) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('status') %>" class="order-none <%= 'md:hidden' unless turbo_native_app? %> flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl shrink-0 <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
<%= svg_icon(status_icons[current_status], class: 'w-5 h-5 shrink-0') %>
<span><%= t(current_status) %></span>
<%= svg_icon('chevron_down', class: 'w-4 h-4 shrink-0') %>
+10
View File
@@ -2,6 +2,16 @@
<% if turbo_native_app? %>
<native-action data-placement="search" data-native="search" data-label="<%= t('search') %>" data-url="<%= search_index_path(folder: @template_folder.full_name) %>"></native-action>
<% end %>
<% if turbo_native_app? && can?(:update, @template_folder) && @template_folder.full_name != TemplateFolder::DEFAULT_NAME %>
<form-prompt data-refresh="false">
<native-action data-placement="title" data-label="<%= t('folder_name') %>">
<%= form_for @template_folder, url: folder_path(@template_folder), html: { class: 'hidden', id: nil } do |f| %>
<%= f.label :name, t('folder_name'), for: name_input_id = SecureRandom.uuid %>
<%= f.hidden_field :name, id: name_input_id %>
<% end %>
</native-action>
</form-prompt>
<% end %>
<% if turbo_native_app? && (can?(:manage, :countless) || current_account.templates.where.not(archived_at: nil).exists?) %>
<native-action data-placement="menu" data-icon="archive" data-label="<%= t('archived') %>">
<a href="<%= templates_archived_index_path %>" data-native-title="<%= t('archived') %>"><%= t('view_archived') %></a>
+3 -3
View File
@@ -1,7 +1,7 @@
<div id="<%= dom_id(submission) %>" class="bg-base-200 rounded-2xl flex flex-col sm:flex-row" data-native-title="<%= submission.name.presence || (local_assigns[:template] || submission.template)&.name if turbo_native_app? %>">
<div id="<%= dom_id(submission) %>" class="bg-base-200 rounded-2xl flex flex-col lg:flex-row" data-native-title="<%= submission.name.presence || (local_assigns[:template] || submission.template)&.name if turbo_native_app? %>">
<% if local_assigns[:with_template] %>
<% template = submission.template %>
<a href="<%= template ? template_path(template) : submission_path(submission) %>" data-native-title="<%= template&.name %>" data-native-actions="<%= (!template.archived_at? && can?(:update, template) ? 'pencil,menu' : 'file_text,menu') if template && turbo_native_app? %>" class="px-5 sm:pr-3 py-3 sm:pb-4 group sm:rounded-l-2xl sm:rounded-tr-none rounded-t-2xl flex sm:flex-col justify-between sm:w-52 w-full flex-shrink-0 bg-base-300/60 space-x-2 sm:space-x-0">
<a href="<%= template ? template_path(template) : submission_path(submission) %>" data-native-title="<%= template&.name %>" data-native-actions="<%= (!template.archived_at? && can?(:update, template) ? 'pencil,menu' : 'file_text,menu') if template && turbo_native_app? %>" class="px-5 lg:pr-3 py-3 lg:pb-4 group lg:rounded-l-2xl lg:rounded-tr-none rounded-t-2xl flex lg:flex-col justify-between lg:w-52 w-full flex-shrink-0 bg-base-300/60 space-x-2 lg:space-x-0">
<div>
<div class="font-medium items-start w-full group-hover:link text-sm flex space-x-1">
<%= svg_icon('file_text', class: 'w-4 h-4 mt-0.5 flex-shrink-0') %>
@@ -11,7 +11,7 @@
</span>
</div>
</div>
<div class="flex-shrink-0 sm:mt-2 max-w-[50%] sm:max-w-full">
<div class="flex-shrink-0 lg:mt-2 max-w-[50%] lg:max-w-full">
<div class="flex text-xs flex-col text-base-content/60 space-y-0.5">
<span class="flex items-center space-x-1">
<%= svg_icon('user', class: 'w-4 h-4 flex-shrink-0') %>
+5 -5
View File
@@ -7,9 +7,9 @@
<% if turbo_native_app? && !template.archived_at? && can?(:update, template) %>
<form-prompt>
<native-action data-placement="title" data-label="<%= t('name') %>">
<%= form_for template, url: template_path(template), method: :put, html: { class: 'hidden' } do |f| %>
<%= f.label :name, t('name') %>
<%= f.hidden_field :name %>
<%= form_for template, url: template_path(template), method: :put, html: { class: 'hidden', id: nil } do |f| %>
<%= f.label :name, t('name'), for: name_input_id = SecureRandom.uuid %>
<%= f.hidden_field :name, id: name_input_id %>
<% end %>
</native-action>
<%= name_html %>
@@ -38,7 +38,7 @@
</span>
</a>
<% if can?(:update, template) %>
<span class="pl-1 tooltip tooltip-right tooltip-no-touch md:opacity-0 hover:opacity-100 peer-hover:opacity-100" data-tip="<%= t('move') %>">
<span class="pl-1 tooltip tooltip-right tooltip-no-touch <%= 'md:opacity-0' unless turbo_native_app? %> hover:opacity-100 peer-hover:opacity-100" data-tip="<%= t('move') %>">
<a href="<%= edit_template_folder_path(template.id, subfolder: @template.folder.parent_folder.present?) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('move_into_folder') %>">
<%= svg_icon('pencil_share', class: 'w-5 h-5') %>
</a>
@@ -61,7 +61,7 @@
</div>
<% if !template.archived_at? %>
<div class="flex items-center space-x-2">
<% if can?(:update, template) %>
<% if can?(:update, template) && !turbo_native_app? %>
<div class="tooltip tooltip-no-touch hidden md:block" data-tip="<%= t('preferences') %>">
<%= link_to template_preferences_path(template), class: 'btn border border-base-200 bg-base-200 hover:bg-base-300 hover:border-base-300 btn-sm flex-1 hidden md:flex', data: { turbo_frame: :modal } do %>
<span class="flex items-center justify-center space-x-2">
+1 -1
View File
@@ -42,7 +42,7 @@
<% end %>
<% if is_show_tabs %>
<div class="flex items-center flex-col md:flex-row md:flex-wrap gap-2 mb-4">
<div class="hidden md:flex md:items-end gap-2 md:w-fit">
<div class="hidden <%= 'md:flex' unless turbo_native_app? %> md:items-end gap-2 md:w-fit">
<a href="<%= url_for(params: request.query_parameters.except('status')) %>" class="<%= params[:status].blank? ? 'border-neutral-700' : 'border-neutral-300' %> flex h-10 px-2 py-1 text-lg items-center justify-between border text-center text-neutral font-semibold rounded-xl w-full md:w-48 hover:border-neutral-700">
<div class="flex items-center space-x-1">
<%= svg_icon('list', class: 'w-5 h-5') %>
@@ -1,5 +1,5 @@
<% content_for(:native_title, t('archived')) if turbo_native_app? %>
<% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS).compact_blank %>
<% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS - %w[template_id]).compact_blank %>
<% if turbo_native_app? %>
<native-action data-placement="search" data-native="search" data-label="<%= t('search') %>" data-url="<%= search_index_path(filter_params.to_h.merge('scope' => 'submissions', 'archived' => 'true', 'template_id' => @template.id)) %>"></native-action>
<% end %>
@@ -13,7 +13,7 @@
<% end %>
</div>
<% end %>
<div class="flex flex-col md:flex-row md:items-center mb-4 <%= 'gap-3' unless turbo_native_app? %>">
<div class="flex flex-col mb-4 <%= 'md:flex-row md:items-center gap-3' unless turbo_native_app? %>">
<div class="group/header flex w-full md:flex-1 min-w-0 justify-between items-center">
<% unless turbo_native_app? %>
<div class="max-md:group-has-[search-input:focus-within]/header:hidden">
@@ -26,7 +26,7 @@
<% end %>
</div>
</div>
<div class="flex flex-nowrap md:flex-wrap md:justify-end items-center gap-2">
<div class="flex flex-nowrap <%= 'md:flex-wrap md:justify-end' unless turbo_native_app? %> items-center gap-2">
<%= render 'submissions_filters/applied_filters', filter_params:, with_status: true, with_default_status: true %>
<% unless turbo_native_app? %>
<div class="hidden md:block shrink-0 md:order-first">
+67 -65
View File
@@ -40,7 +40,7 @@
</div>
<% end %>
</div>
<div class="md:hidden divide-y divide-base-300">
<div class="<%= 'md:hidden' unless turbo_native_app? %> divide-y divide-base-300">
<% @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 %>
@@ -104,71 +104,73 @@
</div>
<% end %>
</div>
<div class="hidden md:block overflow-x-auto">
<table class="table w-full table-lg rounded-b-none overflow-hidden">
<thead class="bg-base-200">
<tr class="text-neutral uppercase">
<th>
<%= t('name') %>
</th>
<th>
<%= t('email') %>
</th>
<th>
<%= t('role') %>
</th>
<th>
<%= t('last_session') %>
</th>
<th class="text-right" width="1px">
</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td>
<%= user.full_name %>
</td>
<td>
<% if user.try(:pending_reconfirmation?) %>
<%= user.unconfirmed_email %>
<br>
<span class="label-text-alt">(<%= t('unconfirmed') %>)</span>
<% else %>
<%= user.email %>
<% end %>
</td>
<td>
<span class="badge badge-info badge-outline whitespace-nowrap">
<%= t(user.role) %>
</span>
</td>
<td>
<%= user.current_sign_in_at ? l(user.current_sign_in_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) : '-' %>
</td>
<td class="flex items-center space-x-2 justify-end">
<% if params[:status].blank? && can?(:update, user) && user.archived_at.blank? %>
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: t('edit'), data: { turbo_frame: 'modal' } do %>
<%= t('edit') %>
<% end %>
<% end %>
<% if params[:status] != 'archived' && can?(:destroy, user) && user != current_user %>
<%= button_to user_path(user), method: :delete, class: 'btn btn-outline btn-error btn-xs', title: t('remove'), data: { turbo_confirm: t('are_you_sure_') } do %>
<%= t('remove') %>
<% end %>
<% end %>
<% if params[:status] == 'archived' && can?(:create, user) && user != current_user && user.archived_at? %>
<%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: t('unarchive'), data: { turbo_confirm: t('are_you_sure_') } do %>
<%= t('unarchive') %>
<% end %>
<% end %>
</td>
<% unless turbo_native_app? %>
<div class="hidden md:block overflow-x-auto">
<table class="table w-full table-lg rounded-b-none overflow-hidden">
<thead class="bg-base-200">
<tr class="text-neutral uppercase">
<th>
<%= t('name') %>
</th>
<th>
<%= t('email') %>
</th>
<th>
<%= t('role') %>
</th>
<th>
<%= t('last_session') %>
</th>
<th class="text-right" width="1px">
</th>
</tr>
<% end %>
</tbody>
</table>
</div>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td>
<%= user.full_name %>
</td>
<td>
<% if user.try(:pending_reconfirmation?) %>
<%= user.unconfirmed_email %>
<br>
<span class="label-text-alt">(<%= t('unconfirmed') %>)</span>
<% else %>
<%= user.email %>
<% end %>
</td>
<td>
<span class="badge badge-info badge-outline whitespace-nowrap">
<%= t(user.role) %>
</span>
</td>
<td>
<%= user.current_sign_in_at ? l(user.current_sign_in_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) : '-' %>
</td>
<td class="flex items-center space-x-2 justify-end">
<% if params[:status].blank? && can?(:update, user) && user.archived_at.blank? %>
<%= link_to edit_user_path(user), class: 'btn btn-outline btn-xs', title: t('edit'), data: { turbo_frame: 'modal' } do %>
<%= t('edit') %>
<% end %>
<% end %>
<% if params[:status] != 'archived' && can?(:destroy, user) && user != current_user %>
<%= button_to user_path(user), method: :delete, class: 'btn btn-outline btn-error btn-xs', title: t('remove'), data: { turbo_confirm: t('are_you_sure_') } do %>
<%= t('remove') %>
<% end %>
<% end %>
<% if params[:status] == 'archived' && can?(:create, user) && user != current_user && user.archived_at? %>
<%= button_to user_path(user), method: :put, params: { user: { archived_at: nil } }, class: 'btn btn-outline btn-xs', title: t('unarchive'), data: { turbo_confirm: t('are_you_sure_') } do %>
<%= t('unarchive') %>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
<% if @pagy.pages > 1 %>
<%= render 'shared/pagination', pagy: @pagy, items_name: 'users', left_additional_html: render('bottom_links') %>
<% else %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= render 'shared/turbo_drawer', title: @webhook_event.event_type, close_after_submit: false do %>
<div class="relative py-4 <%= 'px-4' if turbo_native_app? %>">
<div class="relative py-4 <%= 'px-4' unless turbo_native_app? %>">
<%= render 'drawer_events', webhook_url: @webhook_url, webhook_event: @webhook_event %>
<% if @data %>
<div class="mockup-code overflow-hidden relative pb-0 mt-6">