From aa1874cdb44d74fa30cbfcd7fc8f608df25ee3eb Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Tue, 8 Sep 2026 01:14:14 +0300 Subject: [PATCH] adjust more UI elevent for native app --- app/views/submissions/show.html.erb | 4 ++- app/views/submissions_archived/index.html.erb | 24 ++++++++------- app/views/templates/edit.html.erb | 2 +- app/views/templates_archived/index.html.erb | 18 ++++++----- app/views/templates_shared/index.html.erb | 30 +++++++++++-------- tailwind.config.js | 3 ++ tailwind.dynamic.config.js | 3 ++ 7 files changed, 52 insertions(+), 32 deletions(-) diff --git a/app/views/submissions/show.html.erb b/app/views/submissions/show.html.erb index 56994bd7d..6a863cc29 100644 --- a/app/views/submissions/show.html.erb +++ b/app/views/submissions/show.html.erb @@ -12,7 +12,9 @@
- <%= render 'submissions/logo' %> + <% unless turbo_native_app? %> + <%= render 'submissions/logo' %> + <% end %>

<% (@submission.name || @submission.template&.name).to_s.split(/(_)/).each do |item| %><%= item %><% end %>

diff --git a/app/views/submissions_archived/index.html.erb b/app/views/submissions_archived/index.html.erb index 33dd01099..0118a3cb3 100644 --- a/app/views/submissions_archived/index.html.erb +++ b/app/views/submissions_archived/index.html.erb @@ -8,16 +8,20 @@
<% end %>
-
-
-

<%= t('submissions') %> <%= t('archived') %>

-
-
- <% if params[:q].present? || @pagy.pages > 1 || filter_params.present? %> - <%= render 'shared/search_input', placeholder: "#{t('search')}..." %> - <% end %> -
-
+ <% if turbo_native_app? %> + <% content_for(:html_title, t('archived')) %> + <% else %> +
+
+

<%= t('submissions') %> <%= t('archived') %>

+
+
+ <% if params[:q].present? || @pagy.pages > 1 || filter_params.present? %> + <%= render 'shared/search_input', placeholder: "#{t('search')}..." %> + <% end %> +
+
+ <% end %>
<%= render 'submissions_filters/applied_filters', filter_params:, with_status: true, with_default_status: true %> <%= render 'submissions_filters/filter_button', filter_params: %> diff --git a/app/views/templates/edit.html.erb b/app/views/templates/edit.html.erb index e02bc39b3..8377815f7 100644 --- a/app/views/templates/edit.html.erb +++ b/app/views/templates/edit.html.erb @@ -1,4 +1,4 @@ -<% if current_user.created_at > 2.weeks.ago || params[:tour] == 'true' %> +<% if !turbo_native_app? && (current_user.created_at > 2.weeks.ago || params[:tour] == 'true') %> <% user_config = current_user.user_configs.find_or_initialize_by(key: UserConfig::SHOW_APP_TOUR) %> <% @show_tour_start_form = user_config.new_record? && !params.key?(:tour) %> <% if user_config.new_record? || user_config.value || params[:tour] == 'true' %> diff --git a/app/views/templates_archived/index.html.erb b/app/views/templates_archived/index.html.erb index 834118d3b..b387d224f 100644 --- a/app/views/templates_archived/index.html.erb +++ b/app/views/templates_archived/index.html.erb @@ -6,14 +6,18 @@ <% end %>
<% end %> -
-
-

<%= t('document_templates_html') %> <%= t('archived') %>

+<% if turbo_native_app? %> + <% content_for(:html_title, t('archived')) %> +<% else %> +
+
+

<%= t('document_templates_html') %> <%= t('archived') %>

+
+ <% if params[:q].present? || @pagy.pages > 1 %> + <%= render 'shared/search_input', placeholder: "#{t('search')}..." %> + <% end %>
- <% if params[:q].present? || @pagy.pages > 1 %> - <%= render 'shared/search_input', placeholder: "#{t('search')}..." %> - <% end %> -
+<% end %> <% if @pagy.count.nil? || @pagy.count > 0 %>
<%= render partial: 'templates/template', collection: @templates, locals: { with_folder: true } %> diff --git a/app/views/templates_shared/index.html.erb b/app/views/templates_shared/index.html.erb index b04dacd7b..af2a9bd5d 100644 --- a/app/views/templates_shared/index.html.erb +++ b/app/views/templates_shared/index.html.erb @@ -6,20 +6,24 @@ <% end %>
<% end %> -
-

- <%= svg_icon('folder', class: 'w-9 h-9 flex-shrink-0') %> - <%= t('shared') %> - <% if @is_archived %> - <%= t('archived') %> - <% end %> -

-
- <% if params[:q].present? || @pagy.count.nil? || @pagy.count > 1 %> - <%= render 'shared/search_input' %> - <% end %> +<% if turbo_native_app? %> + <% content_for(:html_title, t('shared').capitalize) %> +<% else %> +
+

+ <%= svg_icon('folder', class: 'w-9 h-9 flex-shrink-0') %> + <%= t('shared') %> + <% if @is_archived %> + <%= t('archived') %> + <% end %> +

+
+ <% if params[:q].present? || @pagy.count.nil? || @pagy.count > 1 %> + <%= render 'shared/search_input' %> + <% end %> +
-
+<% end %> <% view_archived_html = capture do %> <% if @has_archived && params[:q].blank? %>
diff --git a/tailwind.config.js b/tailwind.config.js index d6c5b9bf9..e3d5576fa 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,7 @@ module.exports = { + future: { + hoverOnlyWhenSupported: true + }, plugins: [ require('daisyui') ], diff --git a/tailwind.dynamic.config.js b/tailwind.dynamic.config.js index eb7851f46..2058c30f0 100644 --- a/tailwind.dynamic.config.js +++ b/tailwind.dynamic.config.js @@ -1,6 +1,9 @@ const path = require('path') module.exports = { + future: { + hoverOnlyWhenSupported: true + }, content: [ path.resolve(__dirname, 'app/javascript/template_builder/dynamic_area.vue'), path.resolve(__dirname, 'app/javascript/template_builder/dynamic_section.vue')