fix mobile modal

master^2
Pete Matsyburka 4 days ago
parent 55089bee7f
commit 0d197bb2eb

@ -1,5 +1,6 @@
export default class extends HTMLElement {
connectedCallback () {
if (this.dataset.disabled === 'true') return
if (!this.isMobile()) return
if (window.innerWidth >= 768) return

@ -18,7 +18,7 @@
<span class="hidden sm:block">
<%= render 'templates/upload_button' %>
</span>
<open-modal-mobile class="flex">
<open-modal-mobile data-disabled="<%= !Docuseal.multitenant? %>" class="flex">
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block"><%= t('create') %></span>

@ -37,7 +37,7 @@
<span class="hidden sm:block">
<%= render 'templates/upload_button', folder_name: @template_folder.full_name %>
</span>
<open-modal-mobile class="flex">
<open-modal-mobile data-disabled="<%= !Docuseal.multitenant? %>" class="flex">
<%= link_to new_template_path(folder_name: @template_folder.full_name), class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block"><%= t('create') %></span>

@ -30,7 +30,7 @@
<span class="hidden sm:block">
<%= render 'templates/upload_button' %>
</span>
<open-modal-mobile class="flex">
<open-modal-mobile data-disabled="<%= !Docuseal.multitenant? %>" class="flex">
<%= link_to new_template_path, class: 'white-button !border gap-2', data: { turbo_frame: :modal } do %>
<%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
<span class="hidden md:block"><%= t('create') %></span>

Loading…
Cancel
Save