diff --git a/rollup.config.js b/rollup.config.js index 05d01b5e56c700a04629bb6e323b92b7ed5d8853..141dbb28198eeb0e4fdaf33012eb691d7f8eed91 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -185,14 +185,15 @@ Dependencies: emitFiles: true, fileName: 'shared/[name].[hash][extname]', }), - appEnv == 'test' && copy({ - targets: [ - { - src: 'test/data/*', - dest: 'dist/test', - }, - ] - }), + appEnv == 'test' && + copy({ + targets: [ + { + src: 'test/data/*', + dest: 'dist/test', + }, + ], + }), copy({ targets: [ { diff --git a/src/dbp-official-signature-pdf-upload.js b/src/dbp-official-signature-pdf-upload.js index 81575ab910c614713b390d938fd16272d19895e6..1a1e8f8c173e2fb4377f97e4a369478beb238fb0 100644 --- a/src/dbp-official-signature-pdf-upload.js +++ b/src/dbp-official-signature-pdf-upload.js @@ -317,7 +317,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem ${commonStyles.getButtonCSS()} ${commonStyles.getNotificationCSS()} ${SignatureStyles.getSignatureCss()} - `; } @@ -428,7 +427,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem <span class="bold-filename">${file.name}</span> (${humanFileSize(file.contentSize)}) </span> - <button class="button" + <button + class="button" title="${i18n.t('official-pdf-upload.download-file-button-title')}" @click="${() => { this.downloadFileClickHandler(file, 'file-block-' + id); @@ -721,7 +721,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem : 0 )}) </div> - <button + <button class="is-cancel annotation" @click="${this.hideAnnotationView}"> <dbp-icon name="close" id="close-icon"></dbp-icon> diff --git a/src/dbp-pdf-annotation-view.js b/src/dbp-pdf-annotation-view.js index 2bf87ee3afa6f7022ecaf85bd8220962e06a1326..747196eb6fc7de020a02add56988a2f6a74fa905 100644 --- a/src/dbp-pdf-annotation-view.js +++ b/src/dbp-pdf-annotation-view.js @@ -248,9 +248,9 @@ export class PdfAnnotationView extends ScopedElementsMixin(DBPLitElement) { .border { border-top: var(--dbp-border); - padding-bottom: .5em; + padding-bottom: 0.5em; } - + .border-wrapper { border: var(--dbp-border); border-bottom-width: 0; diff --git a/src/dbp-pdf-preview.js b/src/dbp-pdf-preview.js index 51e48bbac9bfd960cd162a81f5a9f0fee3ac154f..306b49e6439e6b15878477386e3fd5fbf915dfd4 100644 --- a/src/dbp-pdf-preview.js +++ b/src/dbp-pdf-preview.js @@ -588,7 +588,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) { .nav-buttons > * { margin: 2px; } - + input[type='number'] { border: var(--dbp-border); padding: 0 0.3em; @@ -617,17 +617,15 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) { border: unset; } - - input[type="number"]{ + input[type='number'] { background-color: var(--dbp-background); } - dbp-mini-spinner{ + dbp-mini-spinner { margin: auto; display: block; width: 17px; } - `; } diff --git a/src/dbp-qualified-signature-pdf-upload.js b/src/dbp-qualified-signature-pdf-upload.js index d06fa3ac4345e3e1867492d3ba1bd8ece58e68ab..471d351c2598e618f1c800b36facfcad18b997ce 100644 --- a/src/dbp-qualified-signature-pdf-upload.js +++ b/src/dbp-qualified-signature-pdf-upload.js @@ -555,10 +555,11 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle <div class="file-block" id="file-block-${id}"> <div class="header"> <span class="filename"> - <span class="bold-filename">${file.name}</span> + <span class="bold-filename">${file.name}</span> (${humanFileSize(file.contentSize)}) </span> - <button class="button" + <button + class="button" title="${i18n.t('qualified-pdf-upload.download-file-button-title')}" @click="${() => { this.downloadFileClickHandler(file, 'file-block-' + id); @@ -873,8 +874,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle : 0 )}) </div> - <button - class="is-cancel annotation" + <button + class="is-cancel annotation" @click="${this.hideAnnotationView}"> <dbp-icon name="close" id="close-icon"></dbp-icon> </button> @@ -912,7 +913,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle : 0 )}) </div> - <button + <button class="is-cancel" title="${i18n.t( 'qualified-pdf-upload.stop-signing-process-button' diff --git a/src/dbp-signature-lit-element.js b/src/dbp-signature-lit-element.js index 73e1a1f79441dcc8bc91a99bcc61efa706d077a4..6d30e7e4d4ab017013ff5cf2b70245a8df816952 100644 --- a/src/dbp-signature-lit-element.js +++ b/src/dbp-signature-lit-element.js @@ -381,7 +381,7 @@ export default class DBPSignatureLitElement extends BaseLitElement { /** * Convert files to binary async */ - async convertFiles () { + async convertFiles() { let files = []; for (const file of this.signedFiles) { @@ -394,7 +394,6 @@ export default class DBPSignatureLitElement extends BaseLitElement { return files; } - /** * Open Filesink for multiple files */ diff --git a/src/dbp-signature-verification.js b/src/dbp-signature-verification.js index 8d534c32fddfab4958fd6d3636c3a985b31872b7..cd41ff4d9af6dc901acdcac32c4daa6f9e1cf0b9 100644 --- a/src/dbp-signature-verification.js +++ b/src/dbp-signature-verification.js @@ -49,7 +49,6 @@ class SignatureVerification extends ScopedElementsMixin(DBPSignatureLitElement) border-color: var(--dbp-content); padding: 0; } - h2:first-child { margin-top: 0; diff --git a/src/styles.js b/src/styles.js index ac1d8875cc476353dd307b2ba389bcdf8b9237e7..3a58264554a34e59f8c629d7571b4283b2d9e8a4 100644 --- a/src/styles.js +++ b/src/styles.js @@ -3,7 +3,6 @@ import {css} from 'lit'; export function getSignatureCss() { // language=css return css` - #annotation-view button.is-cancel { background: transparent; border: none; @@ -103,11 +102,11 @@ export function getSignatureCss() { a > [name='close'] { font-size: 0.8em; } - + a > [name='close'] { color: var(--dbp-accent); } - .button.close dbp-icon{ + .button.close dbp-icon { margin-left: -2px; } @@ -201,7 +200,7 @@ export function getSignatureCss() { font-size: 1.5rem; color: var(--dbp-accent); cursor: pointer; - padding: 0px 2px ; + padding: 0px 2px; margin-top: -5px; } @@ -250,8 +249,8 @@ export function getSignatureCss() { margin-top: 2rem; /*padding-top: 2rem;*/ } - - .border{ + + .border { border-top: var(--dbp-border); margin-top: 2rem; padding-top: 2rem; diff --git a/test/unit.js b/test/unit.js index 4b806d512ca14fb7b0d24bb2865022061af651bf..e81609c953d2108f23305fb67314475a52b3d587 100644 --- a/test/unit.js +++ b/test/unit.js @@ -68,7 +68,6 @@ suite('pdf signature detection', () => { }); test('getPDFSignatureCount real files', async () => { - async function getRealPDFFile(name) { let url = new URL('test/' + name, import.meta.url).href; let resp = await fetch(url); @@ -76,8 +75,11 @@ suite('pdf signature detection', () => { return getPDFFile(await resp.arrayBuffer()); } - assert.equal((await getPDFSignatureCount(await getRealPDFFile('QPDF-367-0.pdf'))), 1); - assert.equal((await getPDFSignatureCount(await getRealPDFFile('qual-sig-simple.pdf'))), 1); - assert.equal((await getPDFSignatureCount(await getRealPDFFile('qual-sig-tugraz-multiple.pdf'))), 2); + assert.equal(await getPDFSignatureCount(await getRealPDFFile('QPDF-367-0.pdf')), 1); + assert.equal(await getPDFSignatureCount(await getRealPDFFile('qual-sig-simple.pdf')), 1); + assert.equal( + await getPDFSignatureCount(await getRealPDFFile('qual-sig-tugraz-multiple.pdf')), + 2 + ); }); });