mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 15:42:32 -05:00
fix native turbo modal
This commit is contained in:
1 parent
0bc620fa90
commit
4fec8db589
4 files changed
+11
-5
No files matched your search
@@ -32,11 +32,11 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def new
|
||||
render layout: turbo_native_android? ? 'plain' : true
|
||||
render layout: turbo_native_app? ? 'plain' : true
|
||||
end
|
||||
|
||||
def edit
|
||||
render layout: turbo_native_android? ? 'plain' : true
|
||||
render layout: turbo_native_app? ? 'plain' : true
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% if turbo_native_ios? || (turbo_native_app? && !turbo_frame_request?) %>
|
||||
<% if turbo_native_app? %>
|
||||
<% content_for(:native_modal, 'true') %>
|
||||
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<turbo-frame id="modal">
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<% if turbo_frame_request? %>
|
||||
<% if turbo_native_app? && turbo_frame_request? %>
|
||||
<turbo-frame id="modal">
|
||||
<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>
|
||||
</turbo-frame>
|
||||
<% elsif turbo_frame_request? %>
|
||||
<turbo-frame id="modal">
|
||||
<turbo-modal class="modal modal-open items-start !animate-none overflow-y-auto !justify-normal md:!justify-center" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
|
||||
<div class="absolute top-0 bottom-0 right-0 left-0" data-action="click:turbo-modal#close"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= form_for user, html: { class: "space-y-4 #{'px-4' if turbo_native_android?}" }, data: { turbo_frame: :_top } do |f| %>
|
||||
<%= form_for user, html: { class: "space-y-4 #{'px-4' if turbo_native_app?}" }, data: { turbo_frame: :_top } do |f| %>
|
||||
<div class="space-y-2">
|
||||
<div class="flex space-x-4">
|
||||
<div class="w-full">
|
||||
|
||||
Reference in new issue
Block a user