mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
ui fixes
This commit is contained in:
1 parent
79aa034183
commit
d071e8c429
5 files changed
+17
-5
No files matched your search
@@ -57,11 +57,23 @@ if (handlers?.native && window === window.top) {
|
||||
const reportPathConfiguration = () => {
|
||||
const element = document.getElementById('native_path_configuration')
|
||||
|
||||
if (element) handlers.native.postMessage({ type: 'path-configuration', json: element.textContent })
|
||||
if (!element) return
|
||||
|
||||
const config = JSON.parse(element.textContent)
|
||||
|
||||
config.rules.forEach(({ properties }) => {
|
||||
if (properties.native_actions) properties.native_actions = properties.native_actions.map(nativeIcon)
|
||||
})
|
||||
|
||||
handlers.native.postMessage({ type: 'path-configuration', json: JSON.stringify(config) })
|
||||
}
|
||||
|
||||
document.addEventListener('turbo:load', reportPathConfiguration)
|
||||
|
||||
document.addEventListener('turbo:before-cache', () => {
|
||||
document.getElementById('native_path_configuration')?.remove()
|
||||
})
|
||||
|
||||
reportPathConfiguration()
|
||||
|
||||
const reportFlash = (element) => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<% end %>
|
||||
<div id="account_settings_menu" class="<%= 'hidden md:block' unless expanded %>">
|
||||
<menu-active>
|
||||
<ul class="menu px-0">
|
||||
<ul class="menu px-0" style="<%= '--n: var(--b3); --nc: var(--bc);' if expanded %>">
|
||||
<% unless expanded || turbo_native_app? %>
|
||||
<li class="menu-title py-0 !bg-transparent mb-3 -mt-5">
|
||||
<a href="<%= root_path %>" class="!bg-transparent !text-neutral font-medium flex items-center space-x-0.5">
|
||||
|
||||
@@ -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? %>">
|
||||
<% if local_assigns[:with_template] %>
|
||||
<% template = submission.template %>
|
||||
<a href="<%= template ? template_path(template) : submission_path(submission) %>" data-native-title="<%= template&.name %>" 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 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">
|
||||
<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') %>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<% if can?(:update, template) %>
|
||||
<li>
|
||||
<native-menu-action data-icon="pencil" data-label="<%= t('edit') %>" class="grid-cols-1 p-0">
|
||||
<a href="<%= edit_template_path(template) %>" class="flex items-center gap-2 px-4 py-2" data-native-title="<%= template.name %>" data-native-actions="<%= 'check,menu' if turbo_native_app? %>">
|
||||
<a href="<%= edit_template_path(template) %>" class="flex items-center gap-2 px-4 py-2" data-native-title="<%= template.name %>">
|
||||
<%= svg_icon('pencil', class: 'w-5 h-5 flex-shrink-0') %>
|
||||
<span><%= t('edit') %></span>
|
||||
</a>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<% end %>
|
||||
<% if !template.archived_at? && can?(:update, template) %>
|
||||
<native-action data-placement="bar" data-icon="pencil" data-label="<%= t('edit') %>">
|
||||
<a href="<%= edit_template_path(template) %>" data-native-title="<%= template.name %>" data-native-actions="check,menu"></a>
|
||||
<a href="<%= edit_template_path(template) %>" data-native-title="<%= template.name %>"></a>
|
||||
</native-action>
|
||||
<native-action data-section="edit" data-icon="adjustments_horizontal" data-label="<%= t('preferences') %>">
|
||||
<a href="<%= template_preferences_path(template) %>" data-turbo-frame="modal"></a>
|
||||
|
||||
Reference in new issue
Block a user