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

Remove "consts" dependencies

parent 127a7033
No related branches found
No related tags found
No related merge requests found
Pipeline #16167 passed
......@@ -14,5 +14,5 @@
"de": "Erlaubt das Hochladen von PDF-Dokumenten, um sie mit einer Amtssignatur zu versehen",
"en": "Allows upload of PDF-documents to officially sign them"
},
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url,show-nextcloud-file-picker:show-nextcloud-file-picker"
}
......@@ -14,5 +14,5 @@
"de": "Erlaubt das Hochladen von PDF-Dokumenten, um sie mit einer persönlichen elektronischen Signatur zu versehen",
"en": "Allows upload of PDF-documents to personally sign them"
},
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url,show-nextcloud-file-picker:show-nextcloud-file-picker"
}
......@@ -14,5 +14,5 @@
"de": "Erlaubt das Verifizieren von signierten PDF-Dokumenten",
"en": "Allows verification of signed PDF-documents"
},
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
"subscribe": "lang:lang,entry-point-url:entry-point-url,nextcloud-web-app-password-url:nextcloud-web-app-password-url,nextcloud-webdav-url:nextcloud-webdav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url,show-nextcloud-file-picker:show-nextcloud-file-picker"
}
......@@ -55,6 +55,7 @@
<body>
<dbp-provider id="root"
lang="de" entry-point-url="<%= entryPointURL %>"
<%= buildInfo.env !== 'production' ? 'show-nextcloud-file-picker' : '' %>
nextcloud-web-app-password-url="<%= nextcloudWebAppPasswordURL %>"
nextcloud-webdav-url="<%= nextcloudWebDavURL %>"
nextcloud-name="<%= nextcloudName %>"
......@@ -66,6 +67,10 @@
keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "tugraz", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= getUrl('silent-check-sso.html') %>"}'
matomo-url='<%= matomoUrl %>'
matomo-site-id='<%= matomoSiteId %>'
git-info='<%= buildInfo.info %>'
build-url='<%= buildInfo.url %>'
build-time='<%= buildInfo.time %>'
env='<%= buildInfo.env %>'
><dbp-loading-spinner></dbp-loading-spinner></<%= name %>>
</dbp-provider>
......
......@@ -8,6 +8,7 @@ import {terser} from "rollup-plugin-terser";
import json from '@rollup/plugin-json';
import serve from 'rollup-plugin-serve';
import urlPlugin from "@rollup/plugin-url";
// TODO: remove consts if "environment" isn't needed any more for "getAPiUrl"
import consts from 'rollup-plugin-consts';
import license from 'rollup-plugin-license';
import del from 'rollup-plugin-delete';
......@@ -113,10 +114,9 @@ export default (async () => {
del({
targets: 'dist/*'
}),
// TODO: remove consts if "environment" isn't needed any more for "getAPiUrl"
consts({
environment: appEnv,
buildinfo: getBuildInfo(appEnv),
nextcloudBaseURL: config.nextcloudBaseURL,
}),
emitEJS({
src: 'assets',
......
......@@ -776,7 +776,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
id="file-source"
context="${i18n.t('qualified-pdf-upload.upload-field-label')}"
allowed-mime-types="application/pdf"
enabled-sources="local${this.showTestNextcloudFilePicker ? ",nextcloud" : ""}"
enabled-sources="local${this.showNextcloudFilePicker ? ",nextcloud" : ""}"
nextcloud-auth-url="${this.nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${this.nextcloudWebDavURL}"
nextcloud-name="${this.nextcloudName}"
......@@ -917,7 +917,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
<dbp-file-sink id="file-sink"
context="${i18n.t('qualified-pdf-upload.save-field-label', {count: this.signedFilesToDownload})}"
filename="signed-documents.zip"
enabled-destinations="local${this.showTestNextcloudFilePicker ? ",nextcloud" : ""}"
enabled-destinations="local${this.showNextcloudFilePicker ? ",nextcloud" : ""}"
nextcloud-auth-url="${this.nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${this.nextcloudWebDavURL}"
nextcloud-name="${this.nextcloudName}"
......
......@@ -8,7 +8,6 @@ import {MiniSpinner, Icon} from '@dbp-toolkit/common';
import * as commonUtils from "@dbp-toolkit/common/utils";
import * as commonStyles from '@dbp-toolkit/common/styles';
import pdfjs from 'pdfjs-dist/es5/build/pdf.js';
import buildinfo from 'consts:buildinfo';
import {name as pkgName} from './../package.json';
import {readBinaryFileContent} from './utils.js';
......@@ -36,6 +35,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
this.signature_width = 42;
this.signature_height = 42;
this.border_width = 2;
this.allowSignatureRotation = false;
this._onWindowResize = this._onWindowResize.bind(this);
}
......@@ -62,6 +62,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
placeholder: { type: String, attribute: 'signature-placeholder-image-src' },
signature_width: { type: Number, attribute: 'signature-width' },
signature_height: { type: Number, attribute: 'signature-height' },
allowSignatureRotation: { type: Boolean, attribute: 'allow-signature-rotation' },
});
}
......@@ -487,7 +488,7 @@ export class PdfPreview extends ScopedElementsMixin(DBPLitElement) {
}
render() {
const isRotationHidden = (buildinfo.env === 'production');
const isRotationHidden = !this.allowSignatureRotation;
return html`
......
......@@ -941,7 +941,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
id="file-source"
context="${i18n.t('qualified-pdf-upload.upload-field-label')}"
allowed-mime-types="application/pdf"
enabled-sources="local${this.showTestNextcloudFilePicker ? ",nextcloud" : ""}"
enabled-sources="local${this.showNextcloudFilePicker ? ",nextcloud" : ""}"
nextcloud-auth-url="${this.nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${this.nextcloudWebDavURL}"
nextcloud-name="${this.nextcloudName}"
......@@ -1094,7 +1094,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
<dbp-file-sink id="file-sink"
context="${i18n.t('qualified-pdf-upload.save-field-label', {count: this.signedFilesToDownload})}"
filename="signed-documents.zip"
enabled-destinations="local${this.showTestNextcloudFilePicker ? ",nextcloud" : ""}"
enabled-destinations="local${this.showNextcloudFilePicker ? ",nextcloud" : ""}"
nextcloud-auth-url="${this.nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${this.nextcloudWebDavURL}"
nextcloud-name="${this.nextcloudName}"
......
import {EventBus} from '@dbp-toolkit/common';
import buildinfo from 'consts:buildinfo';
import * as utils from "./utils";
import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
......@@ -54,7 +53,6 @@ export class DBPSignatureBaseLitElement extends AdapterLitElement {
}
export default class DBPSignatureLitElement extends DBPSignatureBaseLitElement {
constructor() {
super();
this.queuedFiles = [];
......@@ -62,11 +60,16 @@ export default class DBPSignatureLitElement extends DBPSignatureBaseLitElement {
this.uploadInProgress = false;
this.queueBlockEnabled = false;
this._queueKey = 0;
this.showNextcloudFilePicker = false;
// will be set in function update
this.fileSourceUrl = "";
}
this.showTestNextcloudFilePicker = buildinfo.env !== 'production';
static get properties() {
return this.getProperties({
showNextcloudFilePicker: { type: Boolean, attribute: 'show-nextcloud-file-picker' },
});
}
/**
......
......@@ -699,7 +699,7 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme
<dbp-file-source
id="file-source"
allowed-mime-types="application/pdf"
enabled-sources="local${this.showTestNextcloudFilePicker ? ",nextcloud" : ""}"
enabled-sources="local${this.showNextcloudFilePicker ? ",nextcloud" : ""}"
nextcloud-auth-url="${this.nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${this.nextcloudWebDavURL}"
nextcloud-name="${this.nextcloudName}"
......
Subproject commit 43c558436c6a0f66e6bd162cd6f6ce8af1f2fa7c
Subproject commit f69a28898187580c2cfe281271384a56d3832930
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment