mirror of https://github.com/docusealco/docuseal
commit
154d706be1
@ -1,14 +1,12 @@
|
|||||||
export default class extends HTMLElement {
|
export default class extends HTMLElement {
|
||||||
connectedCallback () {
|
connectedCallback () {
|
||||||
this.image.addEventListener('load', (e) => {
|
const image = this.querySelector('img')
|
||||||
this.image.setAttribute('width', e.target.naturalWidth)
|
|
||||||
this.image.setAttribute('height', e.target.naturalHeight)
|
image.addEventListener('load', (e) => {
|
||||||
|
image.setAttribute('width', e.target.naturalWidth)
|
||||||
|
image.setAttribute('height', e.target.naturalHeight)
|
||||||
|
|
||||||
this.style.aspectRatio = `${e.target.naturalWidth} / ${e.target.naturalHeight}`
|
this.style.aspectRatio = `${e.target.naturalWidth} / ${e.target.naturalHeight}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
get image () {
|
|
||||||
return this.querySelector('img')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 398 B |
|
After Width: | Height: | Size: 378 B |
|
After Width: | Height: | Size: 408 B |
|
After Width: | Height: | Size: 308 B |
@ -0,0 +1,20 @@
|
|||||||
|
<div class="absolute bottom-0 w-full cursor-pointer rounded-xl bg-base-100 border-2 border-base-300 border-dashed hidden z-50" data-target="dashboard-dropzone.folderDropzone" style="<%= local_assigns[:style] %>">
|
||||||
|
<div class="absolute top-0 right-0 left-0 bottom-0 flex justify-center p-2 items-center pointer-events-none">
|
||||||
|
<div class="flex flex-col items-center text-center" data-target="dashboard-dropzone.toggleLoading">
|
||||||
|
<span class="flex flex-col items-center">
|
||||||
|
<span>
|
||||||
|
<%= svg_icon('folder_plus', class: 'w-9 h-9') %>
|
||||||
|
</span>
|
||||||
|
<div class="font-medium mb-1">
|
||||||
|
<%= t('create_a_new_folder') %>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="flex flex-col items-center hidden" data-target="dashboard-dropzone.fileDropzoneLoading">
|
||||||
|
<%= svg_icon('loader', class: 'w-9 h-9 animate-spin') %>
|
||||||
|
<div class="font-medium mb-1">
|
||||||
|
<%= t('loading') %>...
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class AddParentFolderIdToTemplateFolders < ActiveRecord::Migration[8.0]
|
||||||
|
def change
|
||||||
|
add_reference :template_folders, :parent_folder, foreign_key: { to_table: :template_folders }, index: true
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in new issue