OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43576] Harmonize drop zones
Eric Schubert6fdf52e04c91
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 92948d7a0d0..3d8785e8935 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -517,8 +517,8 @@ en:label_custom_queries: "Private"label_columns: "Columns"label_attachments: Attachments- label_drop_files: Drop files here- label_drop_files_hint: or click to add files+ label_drop_files: "Drop files here to attach files."+ label_drop_or_click_files: "Drop files here or click to attach files."label_drop_folders_hint: You cannot upload folders as an attachment. Please select single files.label_add_attachments: "Add attachments"label_formattable_attachment_hint: "Attach and link files by dropping on this field, or pasting from the clipboard."diff --git a/frontend/src/app/shared/components/attachments/attachments.component.html b/frontend/src/app/shared/components/attachments/attachments.component.htmlindex bcbd09843f4..93396159de3 100644--- a/frontend/src/app/shared/components/attachments/attachments.component.html+++ b/frontend/src/app/shared/components/attachments/attachments.component.html@@ -37,14 +37,18 @@(drop)="onDropFiles($event)"><span- class="spot-icon spot-icon_attachment op-file-section--drop-box-icon"+ class="spot-icon spot-icon_add-attachment op-file-section--drop-box-icon"></span><span+ *ngIf="(attachments$ | async).length > 0"class="op-file-section--drop-box-text"- >- {{ text.dropFiles }}<br>- {{ text.dropFilesHint }}- </span>+ [textContent]="text.dropFiles"+ ></span>+ <span+ *ngIf="(attachments$ | async).length === 0"+ class="op-file-section--drop-box-text"+ [textContent]="text.dropClickFiles"+ ></span></button><div@@ -57,8 +61,7 @@(click)="triggerFileInput()"data-qa-selector="op-attachments--upload-button">- <span class="spot-icon spot-icon_attachment"></span>-+ <span class="spot-icon spot-icon_add-attachment"></span>Add attachment</button></div>diff --git a/frontend/src/app/shared/components/attachments/attachments.component.ts b/frontend/src/app/shared/components/attachments/attachments.component.tsindex 498fb712eeb..ede74d39f5c 100644--- a/frontend/src/app/shared/components/attachments/attachments.component.ts+++ b/frontend/src/app/shared/components/attachments/attachments.component.ts@@ -90,7 +90,7 @@ export class OpAttachmentsComponent extends UntilDestroyedMixin implements OnIniattachments: this.I18n.t('js.label_attachments'),uploadLabel: this.I18n.t('js.label_add_attachments'),dropFiles: this.I18n.t('js.label_drop_files'),- dropFilesHint: this.I18n.t('js.label_drop_files_hint'),+ dropClickFiles: this.I18n.t('js.label_drop_or_click_files'),foldersWarning: this.I18n.t('js.label_drop_folders_hint'),};diff --git a/frontend/src/app/shared/components/storages/storage/storage.component.html b/frontend/src/app/shared/components/storages/storage/storage.component.htmlindex 3c1cfbbd3f0..3d4d351e446 100644--- a/frontend/src/app/shared/components/storages/storage/storage.component.html+++ b/frontend/src/app/shared/components/storages/storage/storage.component.html@@ -26,6 +26,7 @@<div class="op-file-section"><ul+ *ngIf="(fileLinks$ | async).length > 0"class="spot-list spot-list_compact op-file-list"[ngClass]="{'op-file-section': true,@@ -72,10 +73,15 @@class="spot-icon spot-icon_upload-arrow op-file-section--drop-box-icon"></span><span+ *ngIf="(fileLinks$ | async).length > 0"class="op-file-section--drop-box-text"- >- {{ text.dropBox.dropFiles() }}- </span>+ [textContent]="text.dropBox.dropFiles()"+ ></span>+ <span+ *ngIf="(fileLinks$ | async).length === 0"+ class="op-file-section--drop-box-text"+ [textContent]="text.dropBox.dropClickFiles()"+ ></span></button><divdiff --git a/frontend/src/app/shared/components/storages/storage/storage.component.ts b/frontend/src/app/shared/components/storages/storage/storage.component.tsindex 2d65cf20fb5..96c5c8dae2a 100644--- a/frontend/src/app/shared/components/storages/storage/storage.component.ts+++ b/frontend/src/app/shared/components/storages/storage/storage.component.ts@@ -119,7 +119,8 @@ export class StorageComponent extends UntilDestroyedMixin implements OnInit, OnD},dropBox: {uploadLabel: this.i18n.t('js.storages.upload_files'),- dropFiles: ():string => this.i18n.t('js.storages.drop_files', { storageType: this.storageType }),+ dropFiles: ():string => this.i18n.t('js.storages.drop_files', { name: this.storage.name }),+ dropClickFiles: ():string => this.i18n.t('js.storages.drop_or_click_files', { name: this.storage.name }),},emptyList: ():string => this.i18n.t('js.storages.file_links.empty', { storageType: this.storageType }),openStorage: ():string => this.i18n.t('js.storages.open_storage', { storageType: this.storageType }),diff --git a/modules/storages/config/locales/js-en.yml b/modules/storages/config/locales/js-en.ymlindex 7f7469499d1..78ac30c940c 100644--- a/modules/storages/config/locales/js-en.yml+++ b/modules/storages/config/locales/js-en.yml@@ -5,8 +5,8 @@ en:link_files_in_storage: "Link files in %{storageType}"link_existing_files: "Link existing files"upload_files: "Upload files"- drop_files: >- Drop files here to upload them to %{storageType}.+ drop_files: "Drop files here to upload them to %{name}."+ drop_or_click_files: "Drop files here or click to upload them to %{name}."login: "%{storageType} login"login_to: "Login to %{storageType}"no_connection: "No %{storageType} connection"