diff --git a/packages/file-handling/src/dbp-file-handling-clipboard.js b/packages/file-handling/src/dbp-file-handling-clipboard.js index f3a297599b0211d5d92556047991f6b2ef35df49..86875687a23311822231b2f66146445dfcef3866 100644 --- a/packages/file-handling/src/dbp-file-handling-clipboard.js +++ b/packages/file-handling/src/dbp-file-handling-clipboard.js @@ -207,6 +207,7 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { } }); if (!this.clipboardSource) { + window.removeEventListener('beforeunload', this._onReceiveBeforeUnload); window.addEventListener('beforeunload', this._onReceiveBeforeUnload); } @@ -542,28 +543,29 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { <p>${i18n.t('file-sink.save-to-clipboard-warning')}</p> </div> - <div class="${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> - <button id="clipboard-download-button" + + + <div class="clipboard-data ${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> + <h4>${i18n.t('file-sink.clipboard-files')}</h4> + <div class="${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> + <button id="clipboard-download-button" class="button is-right clipboard-btn" @click="${this.openClipboardFileSink}" >${i18n.t('clipboard.save-from-clipboard-btn')}</button> - </div> - - <dbp-file-sink id="file-sink-clipboard" - context="${i18n.t('clipboard.save-files-from-clipboard', {count: this.clipboardFiles ? this.clipboardFiles.files.length : 0})}" - filename="clipboard-documents.zip" - enabled-targets="local,nextcloud" - nextcloud-auth-url="${this.nextcloudAuthUrl}" - nextcloud-web-dav-url="${this.nextcloudWebDavUrl}" - nextcloud-name="${this.nextcloudName}" - nextcloud-file-url="${this.nextcloudFileURL}" - fullsize-modal="true" - lang="${this.lang}" - ></dbp-file-sink> + </div> + <dbp-file-sink id="file-sink-clipboard" + context="${i18n.t('clipboard.save-files-from-clipboard', {count: this.clipboardFiles ? this.clipboardFiles.files.length : 0})}" + filename="clipboard-documents.zip" + enabled-targets="local,nextcloud" + nextcloud-auth-url="${this.nextcloudAuthUrl}" + nextcloud-web-dav-url="${this.nextcloudWebDavUrl}" + nextcloud-name="${this.nextcloudName}" + nextcloud-file-url="${this.nextcloudFileURL}" + fullsize-modal="true" + lang="${this.lang}" + ></dbp-file-sink> - <div class="clipboard-data ${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> - <h4>${i18n.t('file-sink.clipboard-files')}</h4> <p>${i18n.t('file-sink.clipboard-files-overwrite')}</p> ${this.getClipboardFileList()} </div> diff --git a/packages/file-handling/src/i18n/de/translation.json b/packages/file-handling/src/i18n/de/translation.json index c053bad57d09bcdd6b6cac28ca6a6bf6afaa345f..ea46dd9d2726db0e57f698ddbe2060c384c2ee2c 100644 --- a/packages/file-handling/src/i18n/de/translation.json +++ b/packages/file-handling/src/i18n/de/translation.json @@ -41,7 +41,7 @@ "save-to-clipboard-text": "Hier können Sie Dateien temporär ablegen.", "save-to-clipboard-warning": "Vorsicht! Wenn Sie den Browser schließen, die Seite neu laden oder neue Dateien hinzufügen, wird die bestehende Zwischenablage automatisch verworfen!", "clipboard-files": "Aktuell vorhandene Dateien in der Zwischenablage", - "clipboard-files-overwrite": "Folgende Dateien werden verworfen:" + "clipboard-files-overwrite": "Folgende Dateien werden verworfen, wenn Sie neue Dateien ins Clipboard legen:" }, "nextcloud-file-picker": { "open": "Nextcloud",