mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
review fixes
This commit is contained in:
1 parent
d071e8c429
commit
e11f4bddbe
40 files changed
+232
-125
No files matched your search
@@ -1,6 +1,11 @@
|
||||
---
|
||||
EnableDefaultLinters: true
|
||||
linters:
|
||||
AllowedScriptType:
|
||||
enabled: true
|
||||
allowed_types:
|
||||
- text/javascript
|
||||
- application/json
|
||||
ErbSafety:
|
||||
enabled: false
|
||||
HardCodedString:
|
||||
|
||||
@@ -20,7 +20,7 @@ class UsersController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
@pagy, @users = pagy(@users)
|
||||
@pagy, @users = pagy(@users, limit: turbo_native_app? ? 1_000 : Pagy::OPTIONS[:limit])
|
||||
end
|
||||
|
||||
if current_ability.can?(:manage, current_account)
|
||||
|
||||
@@ -281,7 +281,7 @@ safeRegisterElement('template-builder', class extends HTMLElement {
|
||||
}
|
||||
|
||||
onSync = (e) => {
|
||||
const { schema, documents, fields, submitters } = e.detail
|
||||
const { schema, documents, fields, submitters, pendingFieldAttachmentUuids } = e.detail
|
||||
const selectedAreas = this.component.selectedAreasRef.value.map((area) => {
|
||||
const field = this.component.template.fields.find((f) => f.areas?.includes(area))
|
||||
|
||||
@@ -293,6 +293,7 @@ safeRegisterElement('template-builder', class extends HTMLElement {
|
||||
|
||||
this.component.selectedAreasRef.value = selectedAreas.map((item) => item && fields.find((f) => f.uuid === item.uuid)?.areas?.[item.index]).filter(Boolean)
|
||||
this.component.selectedSubmitter = submitters.find((s) => s.uuid === selectedSubmitterUuid) || submitters[0]
|
||||
this.component.pendingFieldAttachmentUuids = pendingFieldAttachmentUuids
|
||||
}
|
||||
|
||||
onScrollTo = (e) => {
|
||||
|
||||
@@ -26,17 +26,41 @@ export default targetable(class extends HTMLElement {
|
||||
|
||||
window.addEventListener('dragleave', this.onWindowDragleave)
|
||||
|
||||
this.fileDropzone?.addEventListener('drop', this.onDropFile)
|
||||
this.folderDropzone?.addEventListener('drop', this.onDropNewFolder)
|
||||
this.addEventListener('drop', this.onDrop)
|
||||
this.addEventListener('dragstart', this.onDragstart)
|
||||
this.addEventListener('dragover', this.onDragover)
|
||||
this.addEventListener('dragleave', this.onDragleave)
|
||||
}
|
||||
|
||||
this.folderCards.forEach((el) => el.addEventListener('drop', (e) => this.onDropFolder(e, el)))
|
||||
this.templateCards.forEach((el) => el.addEventListener('drop', this.onDropTemplate))
|
||||
this.templateCards.forEach((el) => el.addEventListener('dragstart', this.onTemplateDragStart))
|
||||
dropTarget (e) {
|
||||
return e.target.closest([
|
||||
'[data-target="dashboard-dropzone.fileDropzone"]',
|
||||
'[data-target="dashboard-dropzone.folderDropzone"]',
|
||||
'[data-targets="dashboard-dropzone.folderCards"]',
|
||||
'[data-targets="dashboard-dropzone.templateCards"]'
|
||||
].join(', '))
|
||||
}
|
||||
|
||||
return [this.fileDropzone, this.folderDropzone, ...this.folderCards, ...this.templateCards].forEach((el) => {
|
||||
el?.addEventListener('dragover', this.onDragover)
|
||||
el?.addEventListener('dragleave', this.onDragleave)
|
||||
})
|
||||
onDrop = (e) => {
|
||||
const el = this.dropTarget(e)
|
||||
|
||||
if (!el) return
|
||||
|
||||
if (el === this.fileDropzone) {
|
||||
this.onDropFile(e)
|
||||
} else if (el === this.folderDropzone) {
|
||||
this.onDropNewFolder(e)
|
||||
} else if (el.dataset.targets === 'dashboard-dropzone.folderCards') {
|
||||
this.onDropFolder(e, el)
|
||||
} else {
|
||||
this.onDropTemplate(e, el)
|
||||
}
|
||||
}
|
||||
|
||||
onDragstart = (e) => {
|
||||
if (e.target.closest('[data-targets="dashboard-dropzone.templateCards"]')) {
|
||||
this.onTemplateDragStart(e)
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback () {
|
||||
@@ -128,7 +152,7 @@ export default targetable(class extends HTMLElement {
|
||||
}
|
||||
}
|
||||
|
||||
onDropTemplate = (e) => {
|
||||
onDropTemplate = (e, el) => {
|
||||
e.preventDefault()
|
||||
|
||||
if (e.dataTransfer.files.length) {
|
||||
@@ -136,10 +160,10 @@ export default targetable(class extends HTMLElement {
|
||||
loading.classList.add('bottom-5', 'left-0', 'flex', 'justify-center', 'w-full', 'absolute')
|
||||
loading.innerHTML = loadingIconHtml
|
||||
|
||||
e.target.appendChild(loading)
|
||||
e.target.classList.add('opacity-50')
|
||||
el.appendChild(loading)
|
||||
el.classList.add('opacity-50')
|
||||
|
||||
const id = e.target.href.split('/').pop()
|
||||
const id = el.href.split('/').pop()
|
||||
|
||||
this.uploadFiles(e.dataTransfer.files, `/templates/${id}/clone_and_replace`)
|
||||
}
|
||||
@@ -173,16 +197,20 @@ export default targetable(class extends HTMLElement {
|
||||
}
|
||||
}
|
||||
|
||||
onDragover (e) {
|
||||
if (e.dataTransfer?.types?.includes('Files') || this.dataset.targets !== 'dashboard-dropzone.templateCards') {
|
||||
this.style.backgroundColor = '#F7F3F0'
|
||||
onDragover = (e) => {
|
||||
const el = this.dropTarget(e)
|
||||
|
||||
if (this.classList.contains('before:border-base-300')) {
|
||||
this.classList.remove('before:border-base-300')
|
||||
this.classList.add('before:border-base-content/30')
|
||||
} else if (this.classList.contains('border-base-300')) {
|
||||
this.classList.remove('border-base-300')
|
||||
this.classList.add('border-base-content/30')
|
||||
if (!el) return
|
||||
|
||||
if (e.dataTransfer?.types?.includes('Files') || el.dataset.targets !== 'dashboard-dropzone.templateCards') {
|
||||
el.style.backgroundColor = '#F7F3F0'
|
||||
|
||||
if (el.classList.contains('before:border-base-300')) {
|
||||
el.classList.remove('before:border-base-300')
|
||||
el.classList.add('before:border-base-content/30')
|
||||
} else if (el.classList.contains('border-base-300')) {
|
||||
el.classList.remove('border-base-300')
|
||||
el.classList.add('border-base-content/30')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,15 +233,19 @@ export default targetable(class extends HTMLElement {
|
||||
a.remove()
|
||||
}
|
||||
|
||||
onDragleave () {
|
||||
this.style.backgroundColor = null
|
||||
onDragleave = (e) => {
|
||||
const el = this.dropTarget(e)
|
||||
|
||||
if (this.classList.contains('before:border-base-content/30')) {
|
||||
this.classList.remove('before:border-base-content/30')
|
||||
this.classList.add('before:border-base-300')
|
||||
} else if (this.classList.contains('border-base-content/30')) {
|
||||
this.classList.remove('border-base-content/30')
|
||||
this.classList.add('border-base-300')
|
||||
if (!el) return
|
||||
|
||||
el.style.backgroundColor = null
|
||||
|
||||
if (el.classList.contains('before:border-base-content/30')) {
|
||||
el.classList.remove('before:border-base-content/30')
|
||||
el.classList.add('before:border-base-300')
|
||||
} else if (el.classList.contains('border-base-content/30')) {
|
||||
el.classList.remove('border-base-content/30')
|
||||
el.classList.add('border-base-300')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class extends HTMLElement {
|
||||
document.removeEventListener('turbo:submit-end', this.onSubmit)
|
||||
}
|
||||
|
||||
onSubmit = (e) => {
|
||||
onSubmit = async (e) => {
|
||||
if (!e.detail.success) return
|
||||
if (e.detail.fetchResponse?.redirected && e.detail.fetchResponse.location.href !== window.location.href) return
|
||||
if (e.detail.formSubmission?.formElement?.method === 'get') return
|
||||
@@ -16,7 +16,19 @@ export default class extends HTMLElement {
|
||||
if (e.detail.formSubmission?.formElement?.dataset?.closeOnSubmit === 'false') return
|
||||
if (e.detail.formSubmission?.formElement?.closest('native-event[data-on="submit"]')) return
|
||||
|
||||
window.webkit?.messageHandlers?.modal?.postMessage({ action: 'submitted' })
|
||||
const flash = await this.flashFrom(e.detail.fetchResponse)
|
||||
|
||||
window.webkit?.messageHandlers?.modal?.postMessage({ action: 'submitted', ...flash })
|
||||
}
|
||||
|
||||
async flashFrom (fetchResponse) {
|
||||
const html = await fetchResponse?.responseHTML
|
||||
const flash = html && new DOMParser().parseFromString(html, 'text/html').getElementById('native_flash')
|
||||
|
||||
if (flash?.dataset.alert) return { alert: flash.dataset.alert }
|
||||
if (flash?.dataset.notice) return { notice: flash.dataset.notice }
|
||||
|
||||
return {}
|
||||
}
|
||||
|
||||
onClick = () => {
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
this.addEventListener('pointerdown', this.onPointerdown)
|
||||
}
|
||||
|
||||
onPointerdown = (event) => {
|
||||
if (this.dataset.disabled === 'true') return
|
||||
if (/Hotwire Native/.test(navigator.userAgent)) return
|
||||
if (!this.isMobile()) return
|
||||
if (window.innerWidth >= 768) return
|
||||
|
||||
this.querySelectorAll('a[data-turbo-frame]').forEach((link) => {
|
||||
link.dataset.turboFrame = '_top'
|
||||
})
|
||||
const link = event.target.closest('a[data-turbo-frame]')
|
||||
|
||||
if (link) link.dataset.turboFrame = '_top'
|
||||
}
|
||||
|
||||
isMobile () {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
if (this.lastElementChild) {
|
||||
this.init()
|
||||
} else {
|
||||
queueMicrotask(() => this.init())
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback () {
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
}
|
||||
|
||||
init () {
|
||||
const form = this.querySelector('form') || (this.querySelector('input, button, select') || this.lastElementChild).form
|
||||
|
||||
if (this.dataset.interval) {
|
||||
@@ -24,10 +38,4 @@ export default class extends HTMLElement {
|
||||
form.requestSubmit()
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback () {
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,8 +50,11 @@ export function nativeIcon (name) {
|
||||
}
|
||||
|
||||
const handlers = window.webkit?.messageHandlers
|
||||
const isNativeLoaded = window.isNativeLoaded
|
||||
|
||||
if (handlers?.native && window === window.top && !isNativeLoaded) {
|
||||
window.isNativeLoaded = true
|
||||
|
||||
if (handlers?.native && window === window.top) {
|
||||
handlers.native.postMessage({ type: 'reset' })
|
||||
|
||||
const reportPathConfiguration = () => {
|
||||
@@ -150,7 +153,7 @@ if (handlers?.native && window === window.top) {
|
||||
})
|
||||
}
|
||||
|
||||
if (handlers?.native && window.Turbo) {
|
||||
if (handlers?.native && window.Turbo && !isNativeLoaded) {
|
||||
const staleSnapshots = new Set()
|
||||
let isRestoring = false
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
@drop="isDragFile = false"
|
||||
>
|
||||
<HoverDropzone
|
||||
v-if="sortedDocuments.length && withUploadButton && editable"
|
||||
v-if="sortedDocuments.length && withUploadButton && editable && !isSheetView"
|
||||
:is-dragging="isDragFile"
|
||||
:template-id="template.id"
|
||||
:accept-file-types="acceptFileTypes"
|
||||
@@ -26,7 +26,7 @@
|
||||
:is-required="defaultRequiredFields.includes(toRaw(dragField))"
|
||||
/>
|
||||
<MobileDrawer
|
||||
v-if="isDocumentsView || (withMobileDrawers && withDocumentsList && (isBreakpointLg || isMobile))"
|
||||
v-if="isDocumentsView || withDocumentsDrawer"
|
||||
side="left"
|
||||
:inline="isDocumentsView"
|
||||
:open="isDocumentsDrawerOpen"
|
||||
@@ -91,16 +91,16 @@
|
||||
</div>
|
||||
</MobileDrawer>
|
||||
<MobileDrawer
|
||||
v-if="isFieldsView || (withMobileDrawers && withFieldsList && editable)"
|
||||
v-if="isFieldsView || withFieldsDrawer"
|
||||
side="right"
|
||||
:inline="isFieldsView"
|
||||
:open="isFieldsDrawerOpen"
|
||||
:background-color="backgroundColor"
|
||||
class="md:hidden"
|
||||
@close="isFieldsDrawerOpen = false"
|
||||
>
|
||||
<div class="pb-6">
|
||||
<Fields
|
||||
ref="fields"
|
||||
:with-top-padding="true"
|
||||
:fields="template.fields"
|
||||
:submitters="template.submitters"
|
||||
@@ -153,7 +153,7 @@
|
||||
@documents-modified="onDocumentsModified"
|
||||
/>
|
||||
<div
|
||||
v-if="pendingFieldAttachmentUuids.length && editable"
|
||||
v-if="pendingFieldAttachmentUuids.length && editable && !nativeView"
|
||||
class="top-1.5 sticky h-0 z-20 max-w-2xl mx-auto"
|
||||
>
|
||||
<div class="alert border-base-content/30 py-2 px-2.5 max-sm:flex max-sm:items-center max-sm:justify-between max-sm:gap-2 max-sm:text-left max-sm:text-sm">
|
||||
@@ -519,11 +519,11 @@
|
||||
:class="($slots.buttons || withTitle) && !nativePlatform ? (isMobile ? 'max-h-[calc(100%_-_60px)]' : 'md:max-h-[calc(100%_-_60px)]') : (isMobile ? 'max-h-[100%]' : 'md:max-h-[100%]')"
|
||||
>
|
||||
<div
|
||||
v-if="withDocumentsList"
|
||||
v-if="withDocumentsList && !withDocumentsDrawer"
|
||||
id="documents_container"
|
||||
ref="previews"
|
||||
:style="{ 'display': isBreakpointLg || isMobile ? 'none' : 'initial' }"
|
||||
class="overflow-y-auto overflow-x-hidden w-52 flex-none pr-3 mt-0.5 pt-0.5 hidden lg:block"
|
||||
class="overflow-y-auto overflow-x-hidden w-52 flex-none pr-3 mt-0.5 pt-0.5"
|
||||
>
|
||||
<DocumentPreview
|
||||
v-for="(item, index) in template.schema"
|
||||
@@ -685,9 +685,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="withFieldsList"
|
||||
v-if="withFieldsList && !(nativePlatform ? isBreakpointLg : isBreakpointMd)"
|
||||
id="fields_list_container"
|
||||
class="relative w-80 flex-none mt-1 pr-4 pl-0.5 hidden md:block fields-list-container"
|
||||
class="relative w-80 flex-none mt-1 pr-4 pl-0.5 fields-list-container"
|
||||
:class="drawField || drawCustomField ? 'overflow-hidden' : 'overflow-y-auto overflow-x-hidden'"
|
||||
>
|
||||
<div
|
||||
@@ -739,7 +739,7 @@
|
||||
:detect-custom-fields-index="detectCustomFieldsIndex"
|
||||
:field-types="fieldTypes"
|
||||
:with-sticky-submitters="withStickySubmitters"
|
||||
:with-add-fields-pill="!showDrawField && !drawField && !drawCustomField"
|
||||
:with-add-fields-pill="!nativePlatform && !showDrawField && !drawField && !drawCustomField"
|
||||
:with-fields-detection="withFieldsDetection"
|
||||
:with-detect-existing-fields="withDetectExistingFields"
|
||||
:with-signature-id="withSignatureId"
|
||||
@@ -769,7 +769,7 @@
|
||||
class="sticky bottom-0 z-20"
|
||||
>
|
||||
<native-action
|
||||
v-if="nativePlatform && withDocumentsList && isBreakpointLg && sortedDocuments.length && editable"
|
||||
v-if="nativePlatform && withDocumentsList && (isBreakpointLg || isMobile) && sortedDocuments.length && editable"
|
||||
data-placement="drawer"
|
||||
data-side="leading"
|
||||
data-icon="files"
|
||||
@@ -785,7 +785,7 @@
|
||||
data-icon="plus"
|
||||
data-native="drawer"
|
||||
data-haptic="true"
|
||||
:data-label="'Fields'"
|
||||
:data-label="t('fields')"
|
||||
data-view="fields"
|
||||
/>
|
||||
<native-action
|
||||
@@ -800,8 +800,8 @@
|
||||
/>
|
||||
</native-action>
|
||||
<button
|
||||
v-if="drawField && (isBreakpointLg || isMobile) && !nativePlatform"
|
||||
class="btn btn-neutral text-white rounded-full no-animation transition-none absolute bottom-6 -left-3 md:-left-4 right-0 mx-auto w-fit z-10 flex-nowrap gap-2 px-5 max-[400px]:px-4 md:hidden"
|
||||
v-if="drawField && isBreakpointMd && !nativePlatform"
|
||||
class="btn btn-neutral text-white rounded-full no-animation transition-none absolute bottom-6 -left-3 md:-left-4 right-0 mx-auto w-fit z-10 flex-nowrap gap-2 px-5 max-[400px]:px-4"
|
||||
style="max-width: calc(100% - 11rem); --btn-focus-scale: 1"
|
||||
@click.prevent="[drawField = null, drawOption = null]"
|
||||
>
|
||||
@@ -824,7 +824,7 @@
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
v-if="withMobileDrawers && withDocumentsList && (isBreakpointLg || isMobile)"
|
||||
v-if="withDocumentsDrawer"
|
||||
class="btn btn-neutral text-white btn-circle btn-lg absolute bottom-4 left-1 md:left-0 z-10"
|
||||
:title="t('documents')"
|
||||
@click.prevent="isDocumentsDrawerOpen = true"
|
||||
@@ -836,9 +836,9 @@
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
v-if="withMobileDrawers && withFieldsList && editable"
|
||||
class="btn btn-neutral text-white btn-circle btn-lg absolute bottom-4 right-4 z-10 md:hidden"
|
||||
title="Fields"
|
||||
v-if="withFieldsDrawer"
|
||||
class="btn btn-neutral text-white btn-circle btn-lg absolute bottom-4 right-4 z-10"
|
||||
:title="t('fields')"
|
||||
@click.prevent="isFieldsDrawerOpen = true"
|
||||
>
|
||||
<IconPlus
|
||||
@@ -1369,6 +1369,7 @@ export default {
|
||||
return {
|
||||
documentRefs: [],
|
||||
isBreakpointLg: false,
|
||||
isBreakpointMd: false,
|
||||
isDownloading: false,
|
||||
isPreviewLoading: false,
|
||||
isLoadingBlankPage: false,
|
||||
@@ -1448,6 +1449,12 @@ export default {
|
||||
withMobileDrawers () {
|
||||
return !this.nativePlatform && !this.nativeView && this.sortedDocuments.length > 0
|
||||
},
|
||||
withDocumentsDrawer () {
|
||||
return this.withMobileDrawers && this.withDocumentsList && (this.isBreakpointLg || this.isMobile)
|
||||
},
|
||||
withFieldsDrawer () {
|
||||
return this.withMobileDrawers && this.withFieldsList && this.editable && this.isBreakpointMd
|
||||
},
|
||||
isMobile () {
|
||||
const isMobileSafariIos = 'ontouchstart' in window && navigator.maxTouchPoints > 0 && /AppleWebKit/i.test(navigator.userAgent)
|
||||
|
||||
@@ -2402,8 +2409,11 @@ export default {
|
||||
},
|
||||
onWindowResize (e) {
|
||||
const breakpointLg = 1024
|
||||
const breakpointMd = 768
|
||||
const width = this.$el.getRootNode().querySelector('div[data-v-app]').offsetWidth
|
||||
|
||||
this.isBreakpointLg = this.$el.getRootNode().querySelector('div[data-v-app]').offsetWidth < breakpointLg
|
||||
this.isBreakpointLg = width < breakpointLg
|
||||
this.isBreakpointMd = width < breakpointMd
|
||||
},
|
||||
onPagesWheel (event) {
|
||||
if (!event.ctrlKey && !event.metaKey) return
|
||||
@@ -2497,7 +2507,7 @@ export default {
|
||||
},
|
||||
syncNative () {
|
||||
const { schema, documents, fields, submitters } = this.template
|
||||
const detail = JSON.stringify({ schema, documents, fields, submitters })
|
||||
const detail = JSON.stringify({ schema, documents, fields, submitters, pendingFieldAttachmentUuids: this.pendingFieldAttachmentUuids })
|
||||
|
||||
if (this.nativeView) {
|
||||
window.webkit?.messageHandlers?.modal?.postMessage({ action: 'dispatch', name: 'template-builder:sync', detail, dismiss: 'false' })
|
||||
@@ -3439,6 +3449,10 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (this.nativeView && this.pendingFieldAttachmentUuids.length) {
|
||||
this.syncNative()
|
||||
}
|
||||
},
|
||||
updateName (value) {
|
||||
this.template.name = value
|
||||
|
||||
@@ -201,6 +201,7 @@ const en = {
|
||||
uploading_: 'Uploading...',
|
||||
add_document: 'Add Document',
|
||||
add_fields: 'Add Fields',
|
||||
fields: 'Fields',
|
||||
none: 'None',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -445,6 +446,7 @@ const es = {
|
||||
uploading_: 'Subiendo...',
|
||||
add_document: 'Subir',
|
||||
add_fields: 'Agregar campos',
|
||||
fields: 'Campos',
|
||||
any: 'Cualquier',
|
||||
drawn: 'Dibujado',
|
||||
drawn_or_typed: 'Dibujado o Escrito',
|
||||
@@ -701,6 +703,7 @@ const it = {
|
||||
uploading_: 'Caricamento in corso...',
|
||||
add_document: 'Aggiungi',
|
||||
add_fields: 'Aggiungi campi',
|
||||
fields: 'Campi',
|
||||
none: 'Nessuno',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -945,6 +948,7 @@ const pt = {
|
||||
uploading_: 'Carregando...',
|
||||
add_document: 'Enviar',
|
||||
add_fields: 'Adicionar campos',
|
||||
fields: 'Campos',
|
||||
any: 'Qualquer',
|
||||
drawn: 'Desenhado',
|
||||
drawn_or_typed: 'Desenhado ou Digitado',
|
||||
@@ -1201,6 +1205,7 @@ const fr = {
|
||||
uploading_: 'Téléversement...',
|
||||
add_document: 'Téléverser',
|
||||
add_fields: 'Ajouter des champs',
|
||||
fields: 'Champs',
|
||||
none: 'Aucun',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -1451,6 +1456,7 @@ const de = {
|
||||
uploading_: 'Hochladen...',
|
||||
add_document: 'Hochladen',
|
||||
add_fields: 'Felder hinzufügen',
|
||||
fields: 'Felder',
|
||||
none: 'Keine',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
@@ -1701,6 +1707,7 @@ const nl = {
|
||||
uploading_: 'Bezig met uploaden...',
|
||||
add_document: 'Doc. toevoegen',
|
||||
add_fields: 'Velden toevoegen',
|
||||
fields: 'Velden',
|
||||
none: 'Geen',
|
||||
ssn: 'SSN',
|
||||
ein: 'EIN',
|
||||
|
||||
@@ -303,6 +303,6 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
<%= render 'shared/app_tour', type: 'account' %>
|
||||
@@ -1,7 +1,10 @@
|
||||
<div class="max-w-lg mx-auto px-2">
|
||||
<% content_for(:native_title, t('forgot_your_password_')) if turbo_native_app? %>
|
||||
<div class="max-w-lg mx-auto <%= turbo_native_app? ? 'pb-6' : 'px-2' %>">
|
||||
<% unless turbo_native_app? %>
|
||||
<h1 class="text-4xl font-bold text-center mt-8">
|
||||
<%= t('forgot_your_password_') %>
|
||||
</h1>
|
||||
<% end %>
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'space-y-6' }) do |f| %>
|
||||
<div class="space-y-2">
|
||||
<%= render 'devise/shared/error_messages', resource: %>
|
||||
|
||||
@@ -64,5 +64,5 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
<title>
|
||||
<%= content_for(:native_title) || content_for(:html_title) || (signed_in? ? 'DocuSeal' : 'DocuSeal | Open Source Document Signing') %>
|
||||
<%= turbo_native_app? ? content_for(:native_title) : (content_for(:html_title) || (signed_in? ? 'DocuSeal' : 'DocuSeal | Open Source Document Signing')) %>
|
||||
</title>
|
||||
<%= render 'shared/meta' %>
|
||||
<% if turbo_native_app? %>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
"fields": <%== t('fields').to_json %>,
|
||||
"more": <%== t('more').to_json %>,
|
||||
"close": <%== t('close').to_json %>,
|
||||
"settings": <%== t('settings').to_json %>,
|
||||
"sign_out": <%== t('sign_out').to_json %>,
|
||||
"cancel": <%== t('cancel').to_json %>,
|
||||
"ok": <%== t('ok').to_json %>,
|
||||
"failed_to_download_files": <%== t('failed_to_download_files').to_json %>,
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
<%= render 'reminder_form', config: @reminder_config %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -26,5 +26,5 @@
|
||||
</div>
|
||||
<%= render 'form_customization_settings' %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -107,5 +107,5 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -27,5 +27,12 @@
|
||||
<native-action data-placement="create" data-icon="pencil_plus">
|
||||
<%= link_to t('create'), new_template_path(folder_name: folder_name), data: { turbo_frame: :modal, native_modal: :medium } %>
|
||||
</native-action>
|
||||
<% unless controller_name.in?(%w[templates_archived submissions_archived]) %>
|
||||
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="upload" data-native="upload" data-label="<%= t('upload') %>" data-url="<%= templates_upload_path(folder_name: folder_name) %>" data-accept="image/*, application/pdf, application/zip, application/json<%= ", #{Templates::CreateAttachments::DOCUMENT_EXTENSIONS.join(', ')}" if Docuseal.advanced_formats? %>"></native-action>
|
||||
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="scan" data-native="scan" data-label="<%= t('scan') %>" data-url="<%= templates_upload_path(folder_name: folder_name) %>"></native-action>
|
||||
<native-action data-placement="menu" data-menu="<%= t('new') %>" data-menu-icon="pencil_plus" data-icon="pencil_plus">
|
||||
<%= link_to t('create'), new_template_path(folder_name: folder_name), data: { turbo_frame: :modal, native_modal: :medium } %>
|
||||
</native-action>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -1,5 +1,6 @@
|
||||
<% expanded = local_assigns[:expanded] %>
|
||||
<div class="<%= expanded ? 'block -mx-3 md:mx-0' : 'w-full md:w-52 flex-none' %>">
|
||||
<% nav_link_data = turbo_native_app? && !expanded ? { turbo_action: 'replace' } : {} %>
|
||||
<div class="<%= expanded ? 'block -mx-3 md:mx-0' : 'w-full md:w-52 flex-none' %> <%= 'md:sticky md:top-0 md:self-start' if turbo_native_app? && !expanded %>">
|
||||
<% unless expanded || turbo_native_app? %>
|
||||
<div class="md:hidden w-full">
|
||||
<a href="<%= local_assigns[:back_path] || settings_path %>" class="flex items-center space-x-0.5 font-medium">
|
||||
@@ -26,60 +27,60 @@
|
||||
<li></li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to t('profile'), settings_profile_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('profile'), settings_profile_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('account'), settings_account_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('account'), settings_account_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% if (!Docuseal.multitenant? || EncryptedConfig.exists?(key: EncryptedConfig::EMAIL_SMTP_KEY, account: current_account)) && can?(:read, EncryptedConfig.new(key: EncryptedConfig::EMAIL_SMTP_KEY, account: current_account)) && ENV['SMTP_ADDRESS'].blank? && true_user == current_user %>
|
||||
<li>
|
||||
<%= link_to t('email'), settings_email_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('email'), settings_email_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% unless Docuseal.multitenant? %>
|
||||
<% if can?(:read, EncryptedConfig.new(key: EncryptedConfig::FILES_STORAGE_KEY, account: current_account)) && true_user == current_user && ENV['S3_ATTACHMENTS_BUCKET'].blank? && ENV['GCS_BUCKET'].blank? && ENV['AZURE_CONTAINER'].blank? %>
|
||||
<li>
|
||||
<%= link_to t('storage'), settings_storage_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('storage'), settings_storage_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:read, EncryptedConfig.new(key: 'submitter_invitation_sms', account: current_account)) && true_user == current_user && (!turbo_native_ios? || can?(:manage, :sms_verification)) %>
|
||||
<li>
|
||||
<%= link_to 'SMS', settings_sms_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to 'SMS', settings_sms_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can?(:read, AccountConfig) %>
|
||||
<li>
|
||||
<%= link_to t('notifications'), settings_notifications_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('notifications'), settings_notifications_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:read, EncryptedConfig.new(key: EncryptedConfig::ESIGN_CERTS_KEY, account: current_account)) %>
|
||||
<li>
|
||||
<%= link_to t('e_signature'), settings_esign_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('e_signature'), settings_esign_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:read, AccountConfig) %>
|
||||
<li>
|
||||
<%= link_to t('personalization'), settings_personalization_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('personalization'), settings_personalization_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:read, User) %>
|
||||
<li>
|
||||
<%= link_to t('users'), settings_users_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to t('users'), settings_users_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= render 'shared/settings_nav_extra' %>
|
||||
<%= render 'shared/settings_nav_extra', nav_link_data: %>
|
||||
<% if Docuseal.demo? || !Docuseal.multitenant? %>
|
||||
<% if can?(:read, AccessToken) %>
|
||||
<li>
|
||||
<%= link_to 'API', settings_api_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to 'API', settings_api_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if Docuseal.demo? || !Docuseal.multitenant? || (current_user != true_user && !current_account.testing?) %>
|
||||
<% if can?(:read, WebhookUrl) %>
|
||||
<li>
|
||||
<%= link_to 'Webhooks', settings_webhooks_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to 'Webhooks', settings_webhooks_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -108,15 +109,15 @@
|
||||
<% end %>
|
||||
<% if (!Docuseal.multitenant? || can?(:manage, :saml_sso)) && can?(:read, EncryptedConfig.new(key: 'saml_configs', account: current_account)) && true_user == current_user && (!turbo_native_ios? || can?(:manage, :saml_sso)) %>
|
||||
<li>
|
||||
<%= link_to 'SSO', settings_sso_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to 'SSO', settings_sso_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if !Docuseal.multitenant? && can?(:read, McpToken) && can?(:manage, :mcp) %>
|
||||
<li>
|
||||
<%= link_to 'MCP', settings_mcp_index_path, class: 'text-base hover:bg-base-300' %>
|
||||
<%= link_to 'MCP', settings_mcp_index_path, class: 'text-base hover:bg-base-300', data: nav_link_data %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%= render 'shared/settings_nav_extra2' %>
|
||||
<%= render 'shared/settings_nav_extra2', nav_link_data: %>
|
||||
<% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %>
|
||||
<%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :post, html: { class: 'w-full' } do |f| %>
|
||||
<li>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if turbo_native_app? && !turbo_frame_request? %>
|
||||
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<turbo-frame id="drawer">
|
||||
<native-modal class="block w-full" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
|
||||
<%= yield %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% if turbo_native_ios? || (turbo_native_app? && !turbo_frame_request?) %>
|
||||
<% content_for(:native_modal, 'true') %>
|
||||
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<turbo-frame id="modal">
|
||||
<native-modal class="block max-w-lg mx-auto pb-6" data-close-after-submit="<%= local_assigns.key?(:close_after_submit) ? local_assigns[:close_after_submit] : true %>">
|
||||
<%= yield %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</turbo-modal>
|
||||
</turbo-frame>
|
||||
<% elsif turbo_native_app? %>
|
||||
<% content_for(:html_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<% content_for(:native_title, local_assigns[:title]) if local_assigns[:title] %>
|
||||
<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>
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
<h1 class="text-3xl md:text-4xl font-bold mb-4">SMS</h1>
|
||||
<%= render 'placeholder' %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -5,5 +5,5 @@
|
||||
<h1 class="text-3xl md:text-4xl font-bold mb-4">SAML SSO</h1>
|
||||
<%= render 'placeholder' %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
</h1>
|
||||
<% value = @encrypted_config.value || { 'service' => 'disk' } %>
|
||||
<% configs = value['configs'] || {} %>
|
||||
<%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' } do |f| %>
|
||||
<%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' }, data: { turbo_action: 'advance' } do |f| %>
|
||||
<% options = [%w[Disk disk], %w[AWS aws_s3], %w[GCP google], %w[Azure azure]] %>
|
||||
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
|
||||
<ul class="items-center w-full text-sm font-medium text-gray-900 space-y-2 sm:space-y-0 sm:flex sm:space-x-2">
|
||||
@@ -36,5 +36,5 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-0 md:w-52"></div>
|
||||
<div class="w-0 lg:w-52"></div>
|
||||
</div>
|
||||
@@ -111,20 +111,21 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% elsif @submission.submitters.to_a.size == 1 && !@submission.expired? && !@submission.submitters.to_a.first.declined_at? && !@submission.archived_at? && !@submission.template&.archived_at? %>
|
||||
<native-action data-label="<%= t('copy_share_link') %>" data-icon="link">
|
||||
<native-action data-label="<%= t('share_link') %>" data-icon="link">
|
||||
<%= render 'shared/clipboard_copy', text: submit_form_url(slug: @submission.submitters.to_a.first.slug, host: form_link_host), class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy_share_link'), copied_title: t('copied_to_clipboard') %>
|
||||
</native-action>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex md:max-h-[calc(100vh-60px)]">
|
||||
<div class="flex <%= 'md:max-h-[calc(100vh-60px)]' unless turbo_native_app? %>">
|
||||
<% values = @submission.submitters.reduce({}) { |acc, sub| acc.merge(sub.values) } %>
|
||||
<% service_url_time = ActiveStorage::Attachment.service_url_time %>
|
||||
<% attachments_index = ActiveStorage::Attachment.where(record: @submission.submitters, name: :attachments).preload(:blob).index_by(&:uuid) %>
|
||||
<% unless native_tab == 'recipients' %>
|
||||
<div class="overflow-y-auto overflow-x-hidden hidden lg:block w-52 flex-none pr-3 mt-0.5 pt-0.5" tabindex="0">
|
||||
<% schema = Submissions.filtered_conditions_schema(@submission, values:) %>
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="overflow-y-auto overflow-x-hidden hidden lg:block w-52 flex-none pr-3 mt-0.5 pt-0.5" tabindex="0">
|
||||
<% schema.each do |item| %>
|
||||
<% document = @submission.schema_documents.find { |a| item['attachment_uuid'] == a.uuid } %>
|
||||
<% if document.preview_images.first %>
|
||||
@@ -137,6 +138,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="document_view" class="w-full overflow-y-auto overflow-x-hidden mt-0.5 pt-0.5" tabindex="0">
|
||||
<div class="pr-3.5 pl-0.5 max-md:pr-4 max-md:pl-0">
|
||||
<% fields_index = Templates.build_field_areas_index(@submission.template_fields || @submission.template.fields) %>
|
||||
@@ -193,7 +195,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless native_tab == 'document' %>
|
||||
<div id="parties_view" class="<%= 'hidden md:block' unless native_tab %> relative w-full md:w-80 flex-none pt-0.5 pr-4 pl-0.5 max-md:pl-0 overflow-auto space" tabindex="0">
|
||||
<div id="parties_view" class="<%= 'hidden md:block md:w-80' unless native_tab %> relative w-full flex-none pt-0.5 pr-4 pl-0.5 max-md:pl-0 overflow-auto space" tabindex="0">
|
||||
<% colors = %w[bg-red-500 bg-sky-500 bg-emerald-500 bg-yellow-300 bg-purple-600 bg-pink-500 bg-cyan-500 bg-orange-500 bg-lime-500 bg-indigo-500] %>
|
||||
<% submitter_fields_index = (@submission.template_fields || @submission.template.fields).group_by { |f| f['submitter_uuid'] } %>
|
||||
<% submitter_field_counters = Hash.new { 0 } %>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col md:flex-row md:items-center mb-4 <%= 'gap-3' unless turbo_native_app? %>">
|
||||
<div class="flex flex-col mb-4 <%= 'md:flex-row md:items-center gap-3' unless turbo_native_app? %>">
|
||||
<div class="group/header flex w-full justify-between items-center">
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="max-md:group-has-[search-input:focus-within]/header:hidden">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<% end %>
|
||||
<% if is_show_tabs %>
|
||||
<div class="flex items-center flex-col md:flex-row md:flex-wrap gap-2 mb-4">
|
||||
<div class="hidden md:flex md:items-end gap-2 md:w-fit">
|
||||
<div class="hidden <%= 'md:flex' unless turbo_native_app? %> md:items-end gap-2 md:w-fit">
|
||||
<a href="<%= url_for(params: request.query_parameters.except('status')) %>" class="<%= params[:status].blank? ? 'border-neutral-700' : 'border-neutral-300' %> flex h-10 px-2 py-1 text-lg items-center justify-between border text-center text-neutral font-semibold rounded-xl w-full md:w-48 hover:border-neutral-600">
|
||||
<div class="flex items-center space-x-1">
|
||||
<%= svg_icon('list', class: 'w-5 h-5') %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<% status_icons = { 'all' => 'list', 'pending' => 'clock', 'completed' => 'circle_check' } %>
|
||||
<% current_status = status_icons.key?(params[:status].to_s) ? params[:status].to_s : 'all' %>
|
||||
<% status_icon = { 'declined' => 'x_circle', 'expired' => 'clock_cancel', 'partially_completed' => 'clock_edit', 'sent' => 'send', 'opened' => 'mail_opened' }[params[:status]] %>
|
||||
<% default_status_icon = status_icons[params[:status]] if status_icon.blank? && local_assigns[:with_default_status] && current_status != 'all' %>
|
||||
<% default_status_icon = status_icons[params[:status]] if status_icon.blank? && local_assigns[:with_default_status] && current_status != 'all' && !turbo_native_app? %>
|
||||
<% with_status_button = local_assigns[:with_status] && status_icon.blank? %>
|
||||
<% status_chip_html = capture do %>
|
||||
<% if status_icon || default_status_icon %>
|
||||
@@ -105,7 +105,7 @@
|
||||
<% end %>
|
||||
<% with_status_dropdown = with_status_button && chips_html.blank? %>
|
||||
<% if with_status_dropdown %>
|
||||
<native-menu class="<%= turbo_native_app? ? 'block' : 'dropdown' %> md:hidden shrink-0">
|
||||
<native-menu class="<%= turbo_native_app? ? 'block' : 'dropdown md:hidden' %> shrink-0">
|
||||
<label tabindex="0" class="cursor-pointer flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
|
||||
<%= svg_icon(status_icons[current_status], class: 'w-5 h-5 shrink-0') %>
|
||||
<span><%= t(current_status) %></span>
|
||||
@@ -157,7 +157,7 @@
|
||||
<% if chips_html.present? || status_chip_html.present? %>
|
||||
<scroll-fade class="flex items-center gap-2 overflow-x-auto flex-1 min-w-0 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&::-webkit-scrollbar]:h-0 [&::-webkit-scrollbar]:w-0 md:contents <%= 'max-md:hidden' if with_status_dropdown %>">
|
||||
<% if with_status_button && !with_status_dropdown %>
|
||||
<a href="<%= submissions_filter_path('status', query_params.merge(path: url_for)) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('status') %>" class="order-none md:hidden flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl shrink-0 <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
|
||||
<a href="<%= submissions_filter_path('status', query_params.merge(path: url_for)) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('status') %>" class="order-none <%= 'md:hidden' unless turbo_native_app? %> flex h-10 px-2 py-1 space-x-1 text-base items-center border text-neutral rounded-xl shrink-0 <%= current_status == 'all' ? 'border-neutral-300' : 'border-neutral-700' %>">
|
||||
<%= svg_icon(status_icons[current_status], class: 'w-5 h-5 shrink-0') %>
|
||||
<span><%= t(current_status) %></span>
|
||||
<%= svg_icon('chevron_down', class: 'w-4 h-4 shrink-0') %>
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
<% if turbo_native_app? %>
|
||||
<native-action data-placement="search" data-native="search" data-label="<%= t('search') %>" data-url="<%= search_index_path(folder: @template_folder.full_name) %>"></native-action>
|
||||
<% end %>
|
||||
<% if turbo_native_app? && can?(:update, @template_folder) && @template_folder.full_name != TemplateFolder::DEFAULT_NAME %>
|
||||
<form-prompt data-refresh="false">
|
||||
<native-action data-placement="title" data-label="<%= t('folder_name') %>">
|
||||
<%= form_for @template_folder, url: folder_path(@template_folder), html: { class: 'hidden', id: nil } do |f| %>
|
||||
<%= f.label :name, t('folder_name'), for: name_input_id = SecureRandom.uuid %>
|
||||
<%= f.hidden_field :name, id: name_input_id %>
|
||||
<% end %>
|
||||
</native-action>
|
||||
</form-prompt>
|
||||
<% end %>
|
||||
<% if turbo_native_app? && (can?(:manage, :countless) || current_account.templates.where.not(archived_at: nil).exists?) %>
|
||||
<native-action data-placement="menu" data-icon="archive" data-label="<%= t('archived') %>">
|
||||
<a href="<%= templates_archived_index_path %>" data-native-title="<%= t('archived') %>"><%= t('view_archived') %></a>
|
||||
|
||||
@@ -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? %>">
|
||||
<div id="<%= dom_id(submission) %>" class="bg-base-200 rounded-2xl flex flex-col lg: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 %>" 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">
|
||||
<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 lg:pr-3 py-3 lg:pb-4 group lg:rounded-l-2xl lg:rounded-tr-none rounded-t-2xl flex lg:flex-col justify-between lg:w-52 w-full flex-shrink-0 bg-base-300/60 space-x-2 lg: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') %>
|
||||
@@ -11,7 +11,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-shrink-0 sm:mt-2 max-w-[50%] sm:max-w-full">
|
||||
<div class="flex-shrink-0 lg:mt-2 max-w-[50%] lg:max-w-full">
|
||||
<div class="flex text-xs flex-col text-base-content/60 space-y-0.5">
|
||||
<span class="flex items-center space-x-1">
|
||||
<%= svg_icon('user', class: 'w-4 h-4 flex-shrink-0') %>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<% if turbo_native_app? && !template.archived_at? && can?(:update, template) %>
|
||||
<form-prompt>
|
||||
<native-action data-placement="title" data-label="<%= t('name') %>">
|
||||
<%= form_for template, url: template_path(template), method: :put, html: { class: 'hidden' } do |f| %>
|
||||
<%= f.label :name, t('name') %>
|
||||
<%= f.hidden_field :name %>
|
||||
<%= form_for template, url: template_path(template), method: :put, html: { class: 'hidden', id: nil } do |f| %>
|
||||
<%= f.label :name, t('name'), for: name_input_id = SecureRandom.uuid %>
|
||||
<%= f.hidden_field :name, id: name_input_id %>
|
||||
<% end %>
|
||||
</native-action>
|
||||
<%= name_html %>
|
||||
@@ -38,7 +38,7 @@
|
||||
</span>
|
||||
</a>
|
||||
<% if can?(:update, template) %>
|
||||
<span class="pl-1 tooltip tooltip-right tooltip-no-touch md:opacity-0 hover:opacity-100 peer-hover:opacity-100" data-tip="<%= t('move') %>">
|
||||
<span class="pl-1 tooltip tooltip-right tooltip-no-touch <%= 'md:opacity-0' unless turbo_native_app? %> hover:opacity-100 peer-hover:opacity-100" data-tip="<%= t('move') %>">
|
||||
<a href="<%= edit_template_folder_path(template.id, subfolder: @template.folder.parent_folder.present?) %>" data-turbo-frame="modal" data-native-modal="medium" aria-label="<%= t('move_into_folder') %>">
|
||||
<%= svg_icon('pencil_share', class: 'w-5 h-5') %>
|
||||
</a>
|
||||
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<% if !template.archived_at? %>
|
||||
<div class="flex items-center space-x-2">
|
||||
<% if can?(:update, template) %>
|
||||
<% if can?(:update, template) && !turbo_native_app? %>
|
||||
<div class="tooltip tooltip-no-touch hidden md:block" data-tip="<%= t('preferences') %>">
|
||||
<%= link_to template_preferences_path(template), class: 'btn border border-base-200 bg-base-200 hover:bg-base-300 hover:border-base-300 btn-sm flex-1 hidden md:flex', data: { turbo_frame: :modal } do %>
|
||||
<span class="flex items-center justify-center space-x-2">
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<% end %>
|
||||
<% if is_show_tabs %>
|
||||
<div class="flex items-center flex-col md:flex-row md:flex-wrap gap-2 mb-4">
|
||||
<div class="hidden md:flex md:items-end gap-2 md:w-fit">
|
||||
<div class="hidden <%= 'md:flex' unless turbo_native_app? %> md:items-end gap-2 md:w-fit">
|
||||
<a href="<%= url_for(params: request.query_parameters.except('status')) %>" class="<%= params[:status].blank? ? 'border-neutral-700' : 'border-neutral-300' %> flex h-10 px-2 py-1 text-lg items-center justify-between border text-center text-neutral font-semibold rounded-xl w-full md:w-48 hover:border-neutral-700">
|
||||
<div class="flex items-center space-x-1">
|
||||
<%= svg_icon('list', class: 'w-5 h-5') %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% content_for(:native_title, t('archived')) if turbo_native_app? %>
|
||||
<% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS).compact_blank %>
|
||||
<% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS - %w[template_id]).compact_blank %>
|
||||
<% if turbo_native_app? %>
|
||||
<native-action data-placement="search" data-native="search" data-label="<%= t('search') %>" data-url="<%= search_index_path(filter_params.to_h.merge('scope' => 'submissions', 'archived' => 'true', 'template_id' => @template.id)) %>"></native-action>
|
||||
<% end %>
|
||||
@@ -13,7 +13,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col md:flex-row md:items-center mb-4 <%= 'gap-3' unless turbo_native_app? %>">
|
||||
<div class="flex flex-col mb-4 <%= 'md:flex-row md:items-center gap-3' unless turbo_native_app? %>">
|
||||
<div class="group/header flex w-full md:flex-1 min-w-0 justify-between items-center">
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="max-md:group-has-[search-input:focus-within]/header:hidden">
|
||||
@@ -26,7 +26,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-nowrap md:flex-wrap md:justify-end items-center gap-2">
|
||||
<div class="flex flex-nowrap <%= 'md:flex-wrap md:justify-end' unless turbo_native_app? %> items-center gap-2">
|
||||
<%= render 'submissions_filters/applied_filters', filter_params:, with_status: true, with_default_status: true %>
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="hidden md:block shrink-0 md:order-first">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="md:hidden divide-y divide-base-300">
|
||||
<div class="<%= 'md:hidden' unless turbo_native_app? %> divide-y divide-base-300">
|
||||
<% @users.each do |user| %>
|
||||
<% can_edit = params[:status].blank? && can?(:update, user) && user.archived_at.blank? %>
|
||||
<% can_remove = params[:status] != 'archived' && can?(:destroy, user) && user != current_user %>
|
||||
@@ -104,6 +104,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="hidden md:block overflow-x-auto">
|
||||
<table class="table w-full table-lg rounded-b-none overflow-hidden">
|
||||
<thead class="bg-base-200">
|
||||
@@ -169,6 +170,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @pagy.pages > 1 %>
|
||||
<%= render 'shared/pagination', pagy: @pagy, items_name: 'users', left_additional_html: render('bottom_links') %>
|
||||
<% else %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= render 'shared/turbo_drawer', title: @webhook_event.event_type, close_after_submit: false do %>
|
||||
<div class="relative py-4 <%= 'px-4' if turbo_native_app? %>">
|
||||
<div class="relative py-4 <%= 'px-4' unless turbo_native_app? %>">
|
||||
<%= render 'drawer_events', webhook_url: @webhook_url, webhook_event: @webhook_event %>
|
||||
<% if @data %>
|
||||
<div class="mockup-code overflow-hidden relative pb-0 mt-6">
|
||||
|
||||
@@ -2840,7 +2840,7 @@ it: &it
|
||||
send: Invia
|
||||
send_to_recipients: Invia ai destinatari
|
||||
sign_it_yourself: Firmalo tu stesso
|
||||
sign_yourself: Firma te stesso
|
||||
sign_yourself: Firma tu stesso
|
||||
revisions: Revisioni
|
||||
no_revisions_yet: Nessuna revisione ancora
|
||||
api_and_embedding: API e Incorporazione
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
module.exports = {
|
||||
future: {
|
||||
hoverOnlyWhenSupported: true
|
||||
},
|
||||
plugins: [
|
||||
require('daisyui')
|
||||
],
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
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')
|
||||
|
||||
Reference in new issue
Block a user