From fca0ba9436a25e430a8db236d38f41ee0f57cc6c Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Thu, 11 Feb 2021 07:59:19 +0100 Subject: [PATCH] Migrate "enabled-sources" and "enabled-destinations" file-handling attributes to "enabled-targets" --- packages/file-handling/README.md | 8 ++++---- packages/file-handling/src/demo.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/file-handling/README.md b/packages/file-handling/README.md index 2cc9224b..4c8fd690 100644 --- a/packages/file-handling/README.md +++ b/packages/file-handling/README.md @@ -57,9 +57,9 @@ files from a [Nextcloud](https://nextcloud.com/) instance. - example `<dbp-file-source allowed-mime-types='image/*'></dbp-file-source>` ... images (of all sub types) only - example `<dbp-file-source allowed-mime-types='image/png,text/plain'></dbp-file-source>` ... PNGs or TXTs only - example `<dbp-file-source allowed-mime-types='*/*'></dbp-file-source>` ... all file types (default) -- `enabled-sources` (optional, default: `local`): sets which sources are enabled +- `enabled-targets` (optional, default: `local`): sets which sources are enabled - you can use `local` and `nextcloud` - - example `<dbp-file-source enabled-sources="local,nextcloud"></dbp-file-source>` + - example `<dbp-file-source enabled-targets="local,nextcloud"></dbp-file-source>` - `disabled` (optional): disable input control - example `<dbp-file-source disabled></dbp-file-source>` - `decompress-zip` (optional): decompress zip file and send the contained files (including files in folders) @@ -107,9 +107,9 @@ files to a [Nextcloud](https://nextcloud.com/) instance. - `lang` (optional, default: `de`): set to `de` or `en` for German or English - example `<dbp-file-sink lang="de"></dbp-file-sink>` -- `enabled-destinations` (optional, default: `local`): sets which destination are enabled +- `enabled-targets` (optional, default: `local`): sets which destination are enabled - you can use `local` and `nextcloud` - - example `<dbp-file-sink enabled-destinations="local,nextcloud"></dbp-file-sink>` + - example `<dbp-file-sink enabled-targets="local,nextcloud"></dbp-file-sink>` - `filename` (optional, default: `files.zip`): sets a file name to use for downloading the zip file - example `<dbp-file-sink filename="signed-documents.zip"></dbp-file-sink>` - `nextcloud-auth-url` (optional): Nextcloud Auth Url to use with the Nextcloud file picker diff --git a/packages/file-handling/src/demo.js b/packages/file-handling/src/demo.js index 0e084c81..149b9667 100644 --- a/packages/file-handling/src/demo.js +++ b/packages/file-handling/src/demo.js @@ -91,7 +91,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { allowed-mime-types="*/*" subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url" lang="en" - enabled-sources="local,nextcloud"></dbp-file-source> + enabled-targets="local,nextcloud"></dbp-file-source> <p>Only images are allowed here (JPG, PNG, GIF, TIF, ...):</p> <button @click="${() => { this._("#file-source2").setAttribute("dialog-open", ""); }}" @@ -101,7 +101,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { <dbp-file-source id="file-source2" lang="en" url="${this.url}" allowed-mime-types="image/*" subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url" - enabled-sources="local,nextcloud" + enabled-targets="local,nextcloud" text="Please select images"></dbp-file-source> <p>This is for PDF only:</p> @@ -112,7 +112,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { <dbp-file-source id="file-source3" lang="en" url="${this.url}" allowed-mime-types="application/pdf" subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url" - enabled-sources="local,nextcloud" + enabled-targets="local,nextcloud" text="Submit only PDF files" button-label="PDF auswählen"></dbp-file-source> <p>Text and images (JPG, PNG, GIF, TIF, ...) :</p> @@ -123,7 +123,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { <dbp-file-source id="file-source4" lang="en" url="${this.url}" allowed-mime-types="text/plain,image/*" subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url" - enabled-sources="local,nextcloud" + enabled-targets="local,nextcloud" text="Please select text or images"></dbp-file-source> <p>PDFs also in ZIPS :</p> @@ -135,7 +135,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { allowed-mime-types="application/pdf" decompress-zip subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url" - enabled-sources="local,nextcloud" + enabled-targets="local,nextcloud" text="Please select PDF(s) or ZIP(s) with PDF(s)"></dbp-file-source> <dbp-file-sink lang="en"></dbp-file-sink> -- GitLab