Skip to content
Snippets Groups Projects
Unverified Commit 4ade1a9e authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Improve responsiveness of file blocks (VPU/Middleware/API#40)

parent b9af968f
No related branches found
No related tags found
No related merge requests found
Pipeline #9671 passed with warnings
...@@ -150,11 +150,14 @@ class SignaturePdfUpload extends VPUSignatureLitElement { ...@@ -150,11 +150,14 @@ class SignaturePdfUpload extends VPUSignatureLitElement {
} }
.files-block .file { .files-block .file {
display: grid;
grid-template-columns: 40px auto;
margin: 10px 0; margin: 10px 0;
} }
.files-block .file button { .files-block .file .button-box {
margin-right: 5px; display: flex;
align-items: center;
} }
.files-block .file .info { .files-block .file .info {
...@@ -177,9 +180,11 @@ class SignaturePdfUpload extends VPUSignatureLitElement { ...@@ -177,9 +180,11 @@ class SignaturePdfUpload extends VPUSignatureLitElement {
getSignedFilesHtml() { getSignedFilesHtml() {
return this.signedFiles.map(file => html` return this.signedFiles.map(file => html`
<div class="file"> <div class="file">
<div class="button-box">
<button class="button is-small is-download" <button class="button is-small is-download"
title="${i18n.t('pdf-upload.download-file-button-title')}" title="${i18n.t('pdf-upload.download-file-button-title')}"
@click="${() => {this.fileDownloadClickHandler(file);}}"><vpu-icon name="download"></vpu-icon></button> @click="${() => {this.fileDownloadClickHandler(file);}}"><vpu-icon name="download"></vpu-icon></button>
</div>
<div class="info"> <div class="info">
<strong>${file.name}</strong> (${humanFileSize(file.contentSize)}) <strong>${file.name}</strong> (${humanFileSize(file.contentSize)})
</div> </div>
...@@ -190,9 +195,11 @@ class SignaturePdfUpload extends VPUSignatureLitElement { ...@@ -190,9 +195,11 @@ class SignaturePdfUpload extends VPUSignatureLitElement {
getErrorFilesHtml() { getErrorFilesHtml() {
return this.errorFiles.map((data, id) => html` return this.errorFiles.map((data, id) => html`
<div class="file"> <div class="file">
<div class="button-box">
<button class="button is-small is-re-upload" <button class="button is-small is-re-upload"
title="${i18n.t('pdf-upload.re-upload-file-button-title')}" title="${i18n.t('pdf-upload.re-upload-file-button-title')}"
@click="${() => {this.fileUploadClickHandler(data.file, id);}}"><vpu-icon name="upload"></vpu-icon></button> @click="${() => {this.fileUploadClickHandler(data.file, id);}}"><vpu-icon name="upload"></vpu-icon></button>
</div>
<div class="info"> <div class="info">
<strong>${data.file.name}</strong> (${humanFileSize(data.file.size)}) <strong>${data.file.name}</strong> (${humanFileSize(data.file.size)})
${data.json["hydra:description"]} ${data.json["hydra:description"]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment