Skip to content
Snippets Groups Projects
Commit 3b9774b7 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Remove text attribute of file-sink and file-source

parent 4e209565
No related branches found
No related tags found
No related merge requests found
Pipeline #45363 passed
......@@ -77,8 +77,6 @@ files from a [Nextcloud](https://nextcloud.com/) instance.
- example `<dbp-file-source nextcloud-auth-info="You need special permissions for this function"></dbp-file-source>`
- `dialog-open` (optional): if this attribute is set at runtime the dialog for selecting local or Nextcloud files will open
- example `document.querySelector("dbp-file-source").setAttribute("dialog-open", "")`
- `text` (optional): the text that is shown above the button to select files
- example `<dbp-file-source text="Please select some files"></dbp-file-source>`
- `button-label` (optional): the text that is shown on the button to select files
- example `<dbp-file-source button-label="Select files"></dbp-file-source>`
- `initial-file-handling-state` (optional): An object: `initial-file-handling-state' = {target: "", path: ""}` for initial opening behaviour.
......@@ -144,8 +142,6 @@ files to a [Nextcloud](https://nextcloud.com/) instance.
- example `<dbp-file-sink nextcloud-file-url="http://localhost:8081/apps/files/?dir="></dbp-file-sink>`
- `nextcloud-auth-info` (optional): Additional authentication information text that is shown in the Nextcloud file picker
- example `<dbp-file-sink nextcloud-auth-info="You need special permissions for this function"></dbp-file-sink>`
- `text` (optional): the text that is shown above the button to download the zip file
- example `<dbp-file-sink text="Download files as ZIP-file"></dbp-file-sink>`
- `button-label` (optional): the text that is shown on the button to download the zip file
- example `<dbp-file-sink button-label="Download files"></dbp-file-sink>`
- `initial-file-handling-state` (optional): An object: `initial-file-handling-state' = {target: "", path: ""}` for initial opening behaviour.
......
......@@ -27,7 +27,6 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
this.nextcloudName ='Nextcloud';
this.nextcloudPath = '';
this.nextcloudFileURL = '';
this.text = '';
this.buttonLabel = '';
this.filename = "files.zip";
this.files = [];
......@@ -66,7 +65,6 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
nextcloudName: {type: String, attribute: 'nextcloud-name'},
nextcloudFileURL: {type: String, attribute: 'nextcloud-file-url'},
nextcloudAuthInfo: {type: String, attribute: 'nextcloud-auth-info'},
text: {type: String},
buttonLabel: {type: String, attribute: 'button-label'},
isDialogOpen: {type: Boolean, attribute: false},
activeTarget: {type: String, attribute: 'active-target'},
......@@ -361,12 +359,12 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
<div class="source-main ${classMap({"hidden": this.activeTarget !== "local"})}">
<div id="zip-download-block">
<div class="block">
${this.text || i18n.t('file-sink.local-intro', {'count': this.files.length})}
${i18n.t('file-sink.local-intro', {'count': this.files.length})}
</div>
<button class="button is-primary"
?disabled="${this.disabled}"
@click="${() => { this.downloadCompressedFiles(); }}">
${this.buttonLabel || i18n.t('file-sink.local-button', {'count': this.files.length})}
${i18n.t('file-sink.local-button', {'count': this.files.length})}
</button>
</div>
</div>
......
......@@ -46,7 +46,6 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
this.dropArea = null;
this.allowedMimeTypes = '*/*';
this.enabledTargets = 'local';
this.text = '';
this.buttonLabel = '';
this.disabled = false;
this.decompressZip = false;
......@@ -83,7 +82,6 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
nextcloudName: { type: String, attribute: 'nextcloud-name' },
nextcloudFileURL: { type: String, attribute: 'nextcloud-file-url' },
nextcloudAuthInfo: {type: String, attribute: 'nextcloud-auth-info'},
text: { type: String },
buttonLabel: { type: String, attribute: 'button-label' },
disabled: { type: Boolean },
decompressZip: { type: Boolean, attribute: 'decompress-zip' },
......@@ -566,7 +564,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
<div class="source-main ${classMap({"hidden": this.activeTarget !== "local"})}">
<div id="dropArea">
<div class="block">
<p>${this.text || i18n.t('intro')}</p>
<p>${i18n.t('intro')}</p>
</div>
<input ?disabled="${this.disabled}"
type="file"
......
......@@ -7,7 +7,7 @@
"demo-title": "Datei Abgabe Demo",
"server-required": "Es wird unter der URL <a href=\"{{- url}}\"><tt>{{- url}}</tt></a> ein Server benötigt um die Dateien zu empfangen.",
"intro": "Laden Sie mehrere Dateien mit dem Auswahldialog oder durch Ziehen und Fallenlassen in diesem Bereich hoch.",
"intro": "Sie können in diesem Bereich Dateien per Drag & Drop oder per Direktauswahl hochladen. Die Dateien dürfen sich auch in ZIP-Archiven befinden.",
"upload-label": "Dateiauswahl",
"upload-disabled-title": "Die Dateiauswahl ist während dem Hochladvorgang gesperrt!",
"page-leaving-warn-dialogue": "Vorsicht! Es befinden sich noch ungenutzte Dateien in der Zwischenablage. Wenn Sie auf 'OK' klicken, wird die bestehende Zwischenablage automatisch verworfen!",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment