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

Improve clipboard

parent 04df4c15
No related branches found
No related tags found
No related merge requests found
Pipeline #24990 passed
...@@ -207,6 +207,7 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { ...@@ -207,6 +207,7 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) {
} }
}); });
if (!this.clipboardSource) { if (!this.clipboardSource) {
window.removeEventListener('beforeunload', this._onReceiveBeforeUnload);
window.addEventListener('beforeunload', this._onReceiveBeforeUnload); window.addEventListener('beforeunload', this._onReceiveBeforeUnload);
} }
...@@ -542,28 +543,29 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { ...@@ -542,28 +543,29 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) {
<p>${i18n.t('file-sink.save-to-clipboard-warning')}</p> <p>${i18n.t('file-sink.save-to-clipboard-warning')}</p>
</div> </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" class="button is-right clipboard-btn"
@click="${this.openClipboardFileSink}" @click="${this.openClipboardFileSink}"
>${i18n.t('clipboard.save-from-clipboard-btn')}</button> >${i18n.t('clipboard.save-from-clipboard-btn')}</button>
</div> </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>
<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> <p>${i18n.t('file-sink.clipboard-files-overwrite')}</p>
${this.getClipboardFileList()} ${this.getClipboardFileList()}
</div> </div>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"save-to-clipboard-text": "Hier können Sie Dateien temporär ablegen.", "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!", "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": "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": { "nextcloud-file-picker": {
"open": "Nextcloud", "open": "Nextcloud",
......
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