From f11d28aebccc4a8fd6ff44c8fbdc7746da7f996e Mon Sep 17 00:00:00 2001 From: Tamara Steinwender <tamara.steinwender@tugraz.at> Date: Mon, 7 Sep 2020 15:15:21 +0200 Subject: [PATCH] Small UI bugfixes and improvements --- .../file-handling/src/dbp-nextcloud-file-picker.js | 14 +++++++++++--- packages/file-handling/src/file-source.js | 2 +- .../file-handling/src/i18n/de/translation.json | 3 ++- .../file-handling/src/i18n/en/translation.json | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/file-handling/src/dbp-nextcloud-file-picker.js b/packages/file-handling/src/dbp-nextcloud-file-picker.js index 3ede1962..e05f3728 100644 --- a/packages/file-handling/src/dbp-nextcloud-file-picker.js +++ b/packages/file-handling/src/dbp-nextcloud-file-picker.js @@ -498,7 +498,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { this.abortUpload = false; this.abortUploadButton = false; this.forAll = false; - this.statusText = "Vorgang wurde abgebrochen"; + this.statusText = i18n.t('nextcloud-file-picker.abort-message'); this._("#replace_mode_all").checked = false; return; } @@ -559,7 +559,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { this.abortUpload = false; this.abortUploadButton = false; this.forAll = false; - this.statusText = "Vorgang wurde abgebrochen"; + this.statusText = i18n.t('nextcloud-file-picker.abort-message'); this._("#replace_mode_all").checked = false; return; } @@ -1276,6 +1276,14 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { animation: added 0.4s ease; } + #abortButton{ + color: var(--dbp-danger-bg-color); + } + + #abortButton:hover{ + color: white; + } + @keyframes added { 0% { background-color: white; @@ -1480,7 +1488,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { @click="${() => { this.sendDirectory(this.tabulatorTable.getSelectedData()); }}">${this.folderIsSelected}</button> <button class="button select-button is-primary ${classMap({hidden: this.directoriesOnly})}" @click="${() => { this.downloadFiles(this.tabulatorTable.getSelectedData()); }}">${i18n.t('nextcloud-file-picker.select-files')}</button> - <button class="button select-button ${classMap({hidden: (!this.abortUploadButton && !this.forAll)})}" + <button id="abortButton" class="button select-button ${classMap({hidden: (!this.abortUploadButton && !this.forAll)})}" title="${i18n.t('nextcloud-file-picker.abort')}" @click="${() => { this.abortUpload = true; }}">${i18n.t('nextcloud-file-picker.abort')}</button> <div class="block info-box ${classMap({hidden: this.statusText === ""})}"> diff --git a/packages/file-handling/src/file-source.js b/packages/file-handling/src/file-source.js index ab67af30..873b4a67 100644 --- a/packages/file-handling/src/file-source.js +++ b/packages/file-handling/src/file-source.js @@ -354,7 +354,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { width: auto; margin: var(--FUMargin, 0px); padding: var(--FUPadding, 20px); - /*flex-grow: 1;*/ + flex-grow: 1; height: 100%; display: flex; flex-direction: column; diff --git a/packages/file-handling/src/i18n/de/translation.json b/packages/file-handling/src/i18n/de/translation.json index 6ff53f94..8ba94644 100644 --- a/packages/file-handling/src/i18n/de/translation.json +++ b/packages/file-handling/src/i18n/de/translation.json @@ -76,6 +76,7 @@ "select-all-title": "Alle verfügbaren Dateien in diesem Ordner auswählen", "select-nothing": "Nichts auswählen", "select-nothing-title": "Alle gewählten Dateien nicht mehr selektieren", - "abort": "Vorgang abbrechen" + "abort": "Vorgang abbrechen", + "abort-message": "Vorgang wurde abgebrochen." } } diff --git a/packages/file-handling/src/i18n/en/translation.json b/packages/file-handling/src/i18n/en/translation.json index 0bca671d..794ab708 100644 --- a/packages/file-handling/src/i18n/en/translation.json +++ b/packages/file-handling/src/i18n/en/translation.json @@ -76,6 +76,7 @@ "select-all-title": "Select all files in this folder", "select-nothing": "Select none", "select-nothing-title": "Select no files", - "abort": "Cancel process" + "abort": "Cancel process", + "abort-message": "The process was canceled." } } -- GitLab