From f9c12b9d7848036ad6594f138ce1882862c4243d Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 29 Oct 2026 11:55:33 +0200 Subject: [PATCH] mobile fixes --- app/controllers/submissions_export_controller.rb | 4 +++- app/controllers/template_folders_controller.rb | 4 +++- app/controllers/templates_clone_controller.rb | 2 ++ app/controllers/templates_folders_controller.rb | 4 +++- app/controllers/user_initials_controller.rb | 4 +++- app/controllers/user_signatures_controller.rb | 4 +++- app/controllers/users_controller.rb | 8 ++++++-- app/javascript/elements/signature_form.js | 2 +- app/javascript/template_builder/conditions_modal.vue | 6 +++--- app/javascript/template_builder/description_modal.vue | 6 +++--- app/javascript/template_builder/font_modal.vue | 6 +++--- app/javascript/template_builder/formula_modal.vue | 6 +++--- app/javascript/template_builder/revisions_modal.vue | 4 ++-- app/views/shared/_templates_order_select.html.erb | 8 +++++--- app/views/submissions_export/new.html.erb | 2 +- app/views/submissions_filters/completed_at.html.erb | 4 ++-- app/views/submissions_filters/created_at.html.erb | 4 ++-- app/views/template_folders/edit.html.erb | 4 ++-- app/views/templates_clone/_form.html.erb | 9 +++++---- app/views/templates_folders/edit.html.erb | 4 ++-- app/views/user_initials/edit.html.erb | 6 +++--- app/views/user_signatures/edit.html.erb | 6 +++--- app/views/users/_form.html.erb | 2 +- 23 files changed, 64 insertions(+), 45 deletions(-) diff --git a/app/controllers/submissions_export_controller.rb b/app/controllers/submissions_export_controller.rb index d199e5850..7a42d6a5c 100644 --- a/app/controllers/submissions_export_controller.rb +++ b/app/controllers/submissions_export_controller.rb @@ -25,5 +25,7 @@ class SubmissionsExportController < ApplicationController end end - def new; end + def new + render layout: turbo_native_android? ? 'plain' : true + end end diff --git a/app/controllers/template_folders_controller.rb b/app/controllers/template_folders_controller.rb index 17fbc806f..8b24d2020 100644 --- a/app/controllers/template_folders_controller.rb +++ b/app/controllers/template_folders_controller.rb @@ -41,7 +41,9 @@ class TemplateFoldersController < ApplicationController render_infinite_scroll(@pagy, @templates, @template_folders) if turbo_infinite_scroll? end - def edit; end + def edit + render layout: turbo_native_android? ? 'plain' : true + end def update if @template_folder != current_account.default_template_folder && diff --git a/app/controllers/templates_clone_controller.rb b/app/controllers/templates_clone_controller.rb index d001087ff..8d5f62546 100644 --- a/app/controllers/templates_clone_controller.rb +++ b/app/controllers/templates_clone_controller.rb @@ -7,6 +7,8 @@ class TemplatesCloneController < ApplicationController authorize!(:create, Template) @template = Template.new(name: "#{@base_template.name} (#{I18n.t('clone')})") + + render layout: turbo_native_android? ? 'plain' : true end def create diff --git a/app/controllers/templates_folders_controller.rb b/app/controllers/templates_folders_controller.rb index 05ee62d84..6f22669b0 100644 --- a/app/controllers/templates_folders_controller.rb +++ b/app/controllers/templates_folders_controller.rb @@ -3,7 +3,9 @@ class TemplatesFoldersController < ApplicationController load_and_authorize_resource :template - def edit; end + def edit + render layout: turbo_native_android? ? 'plain' : true + end def update authorize!(:update, @template) diff --git a/app/controllers/user_initials_controller.rb b/app/controllers/user_initials_controller.rb index 29562e642..1306444cc 100644 --- a/app/controllers/user_initials_controller.rb +++ b/app/controllers/user_initials_controller.rb @@ -4,7 +4,9 @@ class UserInitialsController < ApplicationController before_action :load_user_config authorize_resource :user_config - def edit; end + def edit + render layout: turbo_native_android? ? 'plain' : true + end def update file = params[:file] diff --git a/app/controllers/user_signatures_controller.rb b/app/controllers/user_signatures_controller.rb index da2974eae..353e26092 100644 --- a/app/controllers/user_signatures_controller.rb +++ b/app/controllers/user_signatures_controller.rb @@ -4,7 +4,9 @@ class UserSignaturesController < ApplicationController before_action :load_user_config authorize_resource :user_config - def edit; end + def edit + render layout: turbo_native_android? ? 'plain' : true + end def update file = params[:file] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d2371aa55..6298c0815 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -31,9 +31,13 @@ class UsersController < ApplicationController end end - def new; end + def new + render layout: turbo_native_android? ? 'plain' : true + end - def edit; end + def edit + render layout: turbo_native_android? ? 'plain' : true + end def create existing_user = User.accessible_by(current_ability).find_by(email: @user.email) diff --git a/app/javascript/elements/signature_form.js b/app/javascript/elements/signature_form.js index 845a6b6cf..f3129167e 100644 --- a/app/javascript/elements/signature_form.js +++ b/app/javascript/elements/signature_form.js @@ -55,7 +55,7 @@ export default targetable(class extends HTMLElement { this.input.files = dataTransfer.files - if (this.input.webkitEntries.length) { + if (this.input.webkitEntries?.length) { this.input.dataset.file = `${dataTransfer.files[0].name}` } diff --git a/app/javascript/template_builder/conditions_modal.vue b/app/javascript/template_builder/conditions_modal.vue index 6ba5fe8cb..c625f43e5 100644 --- a/app/javascript/template_builder/conditions_modal.vue +++ b/app/javascript/template_builder/conditions_modal.vue @@ -7,7 +7,7 @@ class="absolute top-0 bottom-0 right-0 left-0" @click.prevent="$emit('close')" /> -
+
{{ t('available_in_pro') }}
-
+
export default { name: 'ConditionModal', - inject: ['t', 'template', 'withConditions'], + inject: ['t', 'template', 'withConditions', 'nativePlatform'], props: { item: { type: Object, diff --git a/app/javascript/template_builder/description_modal.vue b/app/javascript/template_builder/description_modal.vue index 14bd31c57..bea1a78f5 100644 --- a/app/javascript/template_builder/description_modal.vue +++ b/app/javascript/template_builder/description_modal.vue @@ -7,7 +7,7 @@ class="absolute top-0 bottom-0 right-0 left-0" @click.prevent="$emit('close')" /> -
+