diff --git a/packages/file-handling/src/dbp-file-handling-clipboard.js b/packages/file-handling/src/dbp-file-handling-clipboard.js index 950ffc2f7545b0c12d56b6d00979bebbbd47bf3c..ef5efc73d4bc26ff868e8aa9b64acd007c69de7b 100644 --- a/packages/file-handling/src/dbp-file-handling-clipboard.js +++ b/packages/file-handling/src/dbp-file-handling-clipboard.js @@ -423,7 +423,6 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { display: flex; flex-direction: column; justify-content: center; - padding: var(--FUPadding, 20px); } .clipboard-container.table{ @@ -439,24 +438,30 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { .warning-icon{ font-size: 2rem; padding: 0 1rem; + padding-left: 0px; } .clipboard-btn{ - margin-top: 1.5rem; - margin-bottom: 1.5rem; - } + margin-bottom: 2rem; + } .warning-container{ display: flex; - max-width: 400px; text-align: left; margin: auto; + margin-top: 2rem; + margin-bottom: 2rem; } + .clipboard-data{ + text-align: left; + } + .clipboard-data h4{ margin-top: 2rem; + margin-bottom: 1rem; } - + .clipboard-data p{ margin-top: 1rem; margin-bottom: 1rem; @@ -464,7 +469,16 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { .clipboard-list{ padding: 1rem 0; - border-top: 1px solid #eee; + border-top: 1px solid #888; + } + + .button-wrapper{ + display: flex; + justify-content: space-between; + } + + .border{ + border-top:solid 1px #888; } @@ -480,6 +494,16 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { } .warning-icon{ margin-bottom: 1rem; + padding: 0px; + } + + .clipboard-footer{ + padding-top: 10px; + align-self: center; + } + + .button-wrapper{ + flex-direction: column; } } `; @@ -534,29 +558,34 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { return html` <div class="block clipboard-container ${classMap({"table": this.clipboardFiles && this.clipboardFiles.files.length !== 0})}"> <div class="inner"> - <h3>${i18n.t('file-sink.save-to-clipboard-title')}</h3> + <h3>${i18n.t('clipboard.save-to-clipboard-title')}</h3> <p>${i18n.t('file-sink.save-to-clipboard-text')}</p> - <button class="button is-primary clipboard-btn" - ?disabled="${this.disabled}" - @click="${() => { this.saveFilesToClipboard(); }}"> - ${this.buttonLabel || i18n.t('file-sink.save-to-clipboard-btn', {count:this.filesToSave ? this.filesToSave.length : 0})} - </button> - <div class="warning-container"> + <div class="warning-container"> <dbp-icon name="warning" class="warning-icon"></dbp-icon> <p>${i18n.t('file-sink.save-to-clipboard-warning')}</p> </div> + <div class="${classMap({"button-wrapper": this.clipboardFiles.files.length !== 0})}"> + <button id="clipboard-download-button" + class="button is-right clipboard-btn ${classMap({"hidden": this.clipboardFiles.files.length === 0})}" + @click="${this.openClipboardFileSink}"> + ${i18n.t('clipboard.save-from-clipboard-btn')} + </button> + <button class="button is-primary clipboard-btn" + ?disabled="${this.disabled}" + @click="${() => { this.saveFilesToClipboard(); }}"> + ${this.buttonLabel || i18n.t('file-sink.save-to-clipboard-btn', {count:this.filesToSave ? this.filesToSave.length : 0})} + </button> + + + </div> + <div class="border ${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> + <div class="clipboard-data ${classMap({"hidden": this.clipboardFiles.files.length === 0})}"> - <h4>${i18n.t('file-sink.clipboard-files')}</h4> - <div> - <p>${i18n.t('clipboard.save-from-clipboard')}</p> - <button id="clipboard-download-button" - class="button is-right" - @click="${this.openClipboardFileSink}" - >${i18n.t('clipboard.save-from-clipboard-btn')}</button> - </div> + <h4>${i18n.t('file-sink.clipboard-files', {count: this.clipboardFiles.files.length})}</h4> + <dbp-file-sink id="file-sink-clipboard" context="${i18n.t('clipboard.save-files-from-clipboard', {count: this.clipboardFiles ? this.clipboardFiles.files.length : 0})}" @@ -570,8 +599,11 @@ export class FileHandlingClipboard extends ScopedElementsMixin(DBPLitElement) { lang="${this.lang}" ></dbp-file-sink> - <p>${i18n.t('file-sink.clipboard-files-overwrite')}</p> - ${this.getClipboardFileList()} + <details> + <summary>Dateien anzeigen</summary> + <p>${i18n.t('file-sink.clipboard-files-overwrite')}</p> + ${this.getClipboardFileList()} + </details> </div> </div> </div> diff --git a/packages/file-handling/src/file-sink.js b/packages/file-handling/src/file-sink.js index 85a9c3eb0bb61d35acc1237c1c92efecc662af54..cc38a6ec0f6bf8ffd1f0900dc9036b69ee27b0b5 100644 --- a/packages/file-handling/src/file-sink.js +++ b/packages/file-handling/src/file-sink.js @@ -339,11 +339,11 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) { <dbp-icon class="nav-icon" name="cloud"></dbp-icon> <p> ${this.nextcloudName} </p> </div> - <div title="Clipboard" + <div title="${i18n.t('file-sink.clipboard')}" @click="${() => { this.activeTarget = "clipboard"; }}" class="${classMap({"active": this.activeTarget === "clipboard", hidden: (!this.hasEnabledDestination("clipboard")) })}"> <dbp-icon class="nav-icon" name="clipboard"></dbp-icon> - <p>Clipboard</p> + <p>${i18n.t('file-sink.clipboard')}</p> </div> </nav> <div class="modal-header"> diff --git a/packages/file-handling/src/file-source.js b/packages/file-handling/src/file-source.js index 2c155dc5d8362806b388879406727041314f0f97..ba4b48ef6ff0bbbb02019a9a97f7faf49a7e5b4c 100644 --- a/packages/file-handling/src/file-source.js +++ b/packages/file-handling/src/file-source.js @@ -545,11 +545,11 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { <dbp-icon class="nav-icon" name="cloud"></dbp-icon> <p> ${this.nextcloudName} </p> </div> - <div title="Clipboard" + <div title="${i18n.t('file-source.clipboard')}" @click="${() => { this.activeTarget = "clipboard"; }}" class="${classMap({"active": this.activeTarget === "clipboard", hidden: !this.hasEnabledSource("clipboard") })}"> <dbp-icon class="nav-icon" name="clipboard"></dbp-icon> - <p>Clipboard</p> + <p>${i18n.t('file-source.clipboard')}</p> </div> </nav> diff --git a/packages/file-handling/src/i18n/de/translation.json b/packages/file-handling/src/i18n/de/translation.json index 76d8a3a5d691955c396a18129182aad23358c89c..ba69688d85aaf9ff2e8ef90f80249cf0ef86a31d 100644 --- a/packages/file-handling/src/i18n/de/translation.json +++ b/packages/file-handling/src/i18n/de/translation.json @@ -20,7 +20,8 @@ "clipboard-title": "Von der Zwischenablage auswählen", "clipboard-body": "Hier können Sie zuvor temporär abgelegte Dateien auswählen.", "clipboard-select-btn": "Auswählen", - "clipboard-no-files": "Aktuell befinden sich keine Dateien in der Zwischenablage." + "clipboard-no-files": "Aktuell befinden sich keine Dateien in der Zwischenablage.", + "clipboard": "Zwischenablage" }, "file-sink": { "local-intro": "{{count}} Datei herunterladen", @@ -37,11 +38,12 @@ "save-to-clipboard-body_plural": "Sie haben {{count}} Dateien in der Zwischenablage temporär abgelegt. Vergessen Sie nicht diese dauerhaft zu speichern.", "save-to-clipboard-btn": "{{count}} Datei ablegen", "save-to-clipboard-btn_plural": "{{count}} Dateien ablegen", - "save-to-clipboard-title": "Dateien in der Zwischenablage 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!", - "clipboard-files": "Aktuell vorhandene Dateien in der Zwischenablage", - "clipboard-files-overwrite": "Folgende Dateien werden verworfen, wenn Sie neue Dateien ins Clipboard legen:" + "clipboard-files": "Aktuell ist eine Datei in der Zwischenablage vorhanden", + "clipboard-files_plural": "Aktuell sind {{count}} Dateien in der Zwischenablage vorhanden", + "clipboard-files-overwrite": "Folgende Dateien werden verworfen, wenn Sie neue Dateien ins Zwischenablage legen:", + "clipboard": "Zwischenablage" }, "nextcloud-file-picker": { "open": "Nextcloud", @@ -104,6 +106,7 @@ "save-files-from-clipboard": "Eine Datei aus der Zwischenablage speichern", "save-files-from-clipboard_plurafile-sinkl": "{{count}} Dateien aus der Zwischenablage speichern", "save-from-clipboard": "Aktuellen Inhalt aus der Zwischenablage speichern:", - "save-from-clipboard-btn": "Zwischenablage speichern" + "save-from-clipboard-btn": "Zwischenablage speichern", + "save-to-clipboard-title": "Dateien in der Zwischenablage ablegen" } } diff --git a/packages/file-handling/src/i18n/en/translation.json b/packages/file-handling/src/i18n/en/translation.json index fe11c38c717b3ad1be1a9d45ed20eb15f7afbcd6..0cd99e8bcbac8c6d7a1a829f6805989c631ee609 100644 --- a/packages/file-handling/src/i18n/en/translation.json +++ b/packages/file-handling/src/i18n/en/translation.json @@ -20,7 +20,8 @@ "clipboard-title": "Select files from clipboard", "clipboard-body": "Here you can choose from the previously temporarily cached files.", "clipboard-select-btn": "Select", - "clipboard-no-files": "There are currently no files in the clipboard." + "clipboard-no-files": "There are currently no files in the clipboard.", + "clipboard": "Clipboard" }, "file-sink": { "local-intro": "Download {{count}} file", @@ -37,11 +38,12 @@ "save-to-clipboard-body_plural": "You have temporarily saved {{count}} files in the clipboard. Don't forget to save them permanently.", "save-to-clipboard-btn": "{{count}} cache file", "save-to-clipboard-btn_plural": "{{count}} cache files", - "save-to-clipboard-title": "Cache files in the clipboard ", "save-to-clipboard-text": "Here you can cache files temporarily.", "save-to-clipboard-warning": "Attention! When you close the browser, reload the page or add new files, the clipboard will automatically be emptied!", - "clipboard-files": "Files currently available in the clipboard", - "clipboard-files-overwrite": "The following files will be overwritten:" + "clipboard-files": "One file is currently available in the clipboard", + "clipboard-files_plural": "{{count}} files are currently available in the clipboard", + "clipboard-files-overwrite": "The following files will be overwritten:", + "clipboard": "Clipboard" }, "nextcloud-file-picker": { "open": "Nextcloud", @@ -104,6 +106,7 @@ "save-files-from-clipboard": "Save a file from the clipboard", "save-files-from-clipboard_plural": "Save {{count}} files from the clipboard", "save-from-clipboard": "Save the current content from the clipboard:", - "save-from-clipboard-btn": "Save the clipboard" + "save-from-clipboard-btn": "Save the clipboard", + "save-to-clipboard-title": "Cached files in the clipboard " } }