Skip to content

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

[#43688] replaced add-link icon

Eric Schubert09eba81e1c1a
diff --git a/frontend/src/app/shared/components/attachments/attachments.component.ts b/frontend/src/app/shared/components/attachments/attachments.component.ts
index e7002210e85..498fb712eeb 100644
--- a/frontend/src/app/shared/components/attachments/attachments.component.ts
+++ b/frontend/src/app/shared/components/attachments/attachments.component.ts
@@ -160,14 +160,14 @@ export class OpAttachmentsComponent extends UntilDestroyedMixin implements OnIni
);
document.body.addEventListener('dragover', this.onGlobalDragOver.bind(this));
- document.body.addEventListener('dragleave', this.onGlobalDragLeave.bind(this));
- document.body.addEventListener('drop', this.onGlobalDrop.bind(this));
+ document.body.addEventListener('dragleave', this.onGlobalDragEnd.bind(this));
+ document.body.addEventListener('drop', this.onGlobalDragEnd.bind(this));
}
ngOnDestroy():void {
document.body.removeEventListener('dragover', this.onGlobalDragOver.bind(this));
- document.body.removeEventListener('dragleave', this.onGlobalDragLeave.bind(this));
- document.body.removeEventListener('drop', this.onGlobalDrop.bind(this));
+ document.body.removeEventListener('dragleave', this.onGlobalDragEnd.bind(this));
+ document.body.removeEventListener('drop', this.onGlobalDragEnd.bind(this));
}
public triggerFileInput():void {
@@ -213,13 +213,7 @@ export class OpAttachmentsComponent extends UntilDestroyedMixin implements OnIni
this.draggingOverDropZone = false;
}
- public onGlobalDragLeave():void {
- this.dragging = false;
-
- this.cdRef.detectChanges();
- }
-
- public onGlobalDrop():void {
+ public onGlobalDragEnd():void {
this.dragging = false;
this.cdRef.detectChanges();
diff --git a/frontend/src/app/shared/components/storages/storage/storage.component.html b/frontend/src/app/shared/components/storages/storage/storage.component.html
index 1a13bc054ca..801efc062dc 100644
--- a/frontend/src/app/shared/components/storages/storage/storage.component.html
+++ b/frontend/src/app/shared/components/storages/storage/storage.component.html
@@ -20,7 +20,7 @@
<op-storage-information
*ngFor="let infoBox of storageErrors | async"
class="op-files-tab--storage-info-box"
- data-qa-selector="op-files-tab--storage-information"
+ data-qa-selector="op-storage--information"
[content]="infoBox"
></op-storage-information>
@@ -66,15 +66,15 @@
(dragover)="onDragOver($event)"
(dragleave)="onDragLeave($event)"
(drop)="onDropFiles($event)"
+ (click)="openSelectLocationDialog()"
>
- <span
- class="spot-icon spot-icon_attachment op-attachments--drop-box-icon"
- ></span>
+ <span
+ class="spot-icon spot-icon_upload-arrow op-file-section--drop-box-icon"
+ ></span>
<label
class="op-file-section--drop-box-text"
>
- {{ text.dropBox.dropFiles }}<br>
- {{ text.dropBox.dropFilesHint }}
+ {{ text.dropBox.dropFiles() }}
</label>
</button>
@@ -85,8 +85,8 @@
<button
*ngIf="allowUploading"
type="button"
- class="spot-link op-file-list--action-button"
- data-qa-selector="op-file-list--upload-file-button"
+ class="spot-link"
+ data-qa-selector="op-storage--upload-file-button"
(click)="openSelectLocationDialog()"
>
<span class="spot-icon spot-icon_upload-arrow"></span>
@@ -95,8 +95,8 @@
<button
*ngIf="allowLinking"
type="button"
- class="spot-link op-file-list--action-button"
- data-qa-selector="op-file-list--link-existing-file-button"
+ class="spot-link"
+ data-qa-selector="op-storage--link-existing-file-button"
(click)="openLinkFilesDialog()"
>
<span class="spot-icon spot-icon_add-link"></span>
diff --git a/frontend/src/app/shared/components/storages/storage/storage.component.ts b/frontend/src/app/shared/components/storages/storage/storage.component.ts
index f2ba3b56a9e..2d65cf20fb5 100644
--- a/frontend/src/app/shared/components/storages/storage/storage.component.ts
+++ b/frontend/src/app/shared/components/storages/storage/storage.component.ts
@@ -118,9 +118,8 @@ export class StorageComponent extends UntilDestroyedMixin implements OnInit, OnD
uploadFile: this.i18n.t('js.storages.upload_files'),
},
dropBox: {
- uploadLabel: 'uploadLabel',
- dropFiles: 'dropFiles',
- dropFilesHint: 'dropFilesHint',
+ uploadLabel: this.i18n.t('js.storages.upload_files'),
+ dropFiles: ():string => this.i18n.t('js.storages.drop_files', { storageType: this.storageType }),
},
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/frontend/src/app/spot/icon-font/src/add-link.svg b/frontend/src/app/spot/icon-font/src/add-link.svg
index ccda583eaa9..29e6e444dc1 100644
--- a/frontend/src/app/spot/icon-font/src/add-link.svg
+++ b/frontend/src/app/spot/icon-font/src/add-link.svg
@@ -1,3 +1,3 @@
-<svg width="16" height="10" viewBox="0 0 16 10" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.8 3.07692H11.2V4.61538H4.8V3.07692ZM14.48 3.84615H16C16 1.72308 14.208 0 12 0H8.8V1.46154H12C13.368 1.46154 14.48 2.53077 14.48 3.84615ZM1.52 3.84615C1.52 2.53077 2.632 1.46154 4 1.46154H7.2V0H4C1.792 0 0 1.72308 0 3.84615C0 5.96923 1.792 7.69231 4 7.69231H7.2V6.23077H4C2.632 6.23077 1.52 5.16154 1.52 3.84615ZM13.6 3.84615H12V6.15385H9.6V7.69231H12V10H13.6V7.69231H16V6.15385H13.6V3.84615Z" fill="black"/>
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.8 6.07692H11.2V7.61538H4.8V6.07692ZM14.48 6.84615H16C16 4.72308 14.208 3 12 3H8.8V4.46154H12C13.368 4.46154 14.48 5.53077 14.48 6.84615ZM1.52 6.84615C1.52 5.53077 2.632 4.46154 4 4.46154H7.2V3H4C1.792 3 0 4.72308 0 6.84615C0 8.96923 1.792 10.6923 4 10.6923H7.2V9.23077H4C2.632 9.23077 1.52 8.16154 1.52 6.84615ZM13.6 6.84615H12V9.15385H9.6V10.6923H12V13H13.6V10.6923H16V9.15385H13.6V6.84615Z" fill="black"/>
</svg>
diff --git a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.svg b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.svg
index 8d2e14f92f2..e0b84ff0ce5 100644
--- a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.svg
+++ b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.svg
@@ -21,7 +21,7 @@
horiz-adv-x="512" d=" M99.56 -100C79.5296 -100 59.4992 -90.4544 41.472 -70.2976L38.46752 -68.176C19.438624 -48.0192 -37.648 34.7264 38.46752 119.59168C75.98592 162.46976 128.10432 216.68832 183.30848 274.1168L185.69056 276.5952L277.83008 374.192C333.9136 433.598624 374.976 419.807776 439.0752 355.09696C514.1888 279.7776 528.208 204.45856 495.1584 165.20768C486.0096 153.93952 471.4368 137.26112 454.0928 117.9088L420.3648 151.63424C437.2704 170.43232 451.3824 186.47104 460.1056 197.03264C470.1216 209.76256 471.1232 254.31776 407.0272 319.02848C401.2512 324.98016 396.1088 330.77728 391.36 336.13088C365.6352 365.128 351.4624 381.107712 310.88032 338.12352C279.83328 305.23776 248.78624 272.35168 218.74048 241.58752C162.65568 183.24192 110.57664 128.0784 72.51904 85.6448C28.452288 35.7856 50.48576 -10.8896 71.51744 -32.1088L74.52224 -35.2896C91.54784 -53.3248 105.56928 -58.6272 130.60704 -32.1088C133.29984 -29.2544 137.1744 -25.3088 141.94752 -20.4448C149.60128 -12.6464 159.56448 -2.496 170.66784 9.264C221.74528 61.2448 315.888 158.84256 334.9152000000001 184.30272C340.9248 191.72832 349.9392000000001 211.88416 340.9248 219.31008C329.9104 229.9184 307.87584 208.70176 301.86656 201.27584C240.54144 133.36608 161.97536 52.672 150.14464 40.5216L148.63424 38.9696C139.6208 29.4208 124.59808 29.4208 115.58432 38.9696C106.57056 49.5776 106.57056 64.4288 115.58432 73.9744L117.10272 75.5392C128.95872 87.7152 207.43392 168.31328 267.81504 235.22272C310.88032 282.96032 349.9392000000001 277.656 371.9744 256.43936C400.016 230.9792 393.0048 181.12 371.9744 152.47744C355.2 131.15648 300.49696 74.1248 239.62976 10.6656C227.8144 -1.6544 215.76544 -14.2144 203.71776 -26.8032C184.68896 -44.8384 170.66784 -59.6896 163.65728 -67.1136C142.62528 -89.392 121.59328 -100 99.56 -100z M408 92H360V20H288V-28H360V-100H408V-28H480V20H408V92z" />
<glyph glyph-name="add-link"
unicode="&#xF105;"
- horiz-adv-x="819.2" d=" M245.76 254.461696H573.4399999999999V175.692544H245.76V254.461696zM741.3760000000001 215.07712H819.2C819.2 323.778304 727.4496 412 614.4000000000001 412H450.5600000000001V337.169152H614.4000000000001C684.4416000000001 337.169152 741.3760000000001 282.424576 741.3760000000001 215.07712zM77.824 215.07712C77.824 282.424576 134.7584 337.169152 204.8 337.169152H368.6400000000001V412H204.8C91.7504 412 0 323.778304 0 215.07712C0 106.375424 91.7504 18.153728 204.8 18.153728H368.6400000000001V92.984576H204.8C134.7584 92.984576 77.824 147.729152 77.824 215.07712zM696.32 215.07712H614.4000000000001V96.92288H491.52V18.153728H614.4000000000001V-100H696.32V18.153728H819.2V96.92288H696.32V215.07712z" />
+ horiz-adv-x="512" d=" M153.6 217.53856H358.4V168.30784H153.6V217.53856zM463.36 192.9232H512C512 260.86144 454.656 316 384 316H281.6V269.23072H384C427.776 269.23072 463.36 235.01536 463.36 192.9232zM48.64 192.9232C48.64 235.01536 84.224 269.23072 128 269.23072H230.4V316H128C57.344 316 0 260.86144 0 192.9232C0 124.98464 57.344 69.8464 128 69.8464H230.4V116.61536H128C84.224 116.61536 48.64 150.83072 48.64 192.9232zM435.2 192.9232H384V119.0768H307.2V69.8464H384V-4H435.2V69.8464H512V119.0768H435.2V192.9232z" />
<glyph glyph-name="add"
unicode="&#xF106;"
horiz-adv-x="512" d=" M288 220V444H224V220H0V156H224V-68H288V156H512V220z" />
diff --git a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.ttf b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.ttf
index ba69df184ff..cf7bbdb51ae 100644
Binary files a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.ttf and b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.ttf differ
diff --git a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff
index 41cb528f1a3..a8e0c439c77 100644
Binary files a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff and b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff differ
diff --git a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff2 b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff2
index a971e27caad..af929810775 100644
Binary files a/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff2 and b/frontend/src/assets/fonts/openproject_icon/openproject-icon-font.woff2 differ
diff --git a/frontend/src/global_styles/content/work_packages/shared/_file_list.sass b/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
index 06a7a3b9cc3..d1a030a1c02 100644
--- a/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
+++ b/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
@@ -27,8 +27,6 @@
//++
.op-file-list
- margin-bottom: $spot-spacing-0_75
-
&--item
&-action
text-decoration: none
diff --git a/frontend/src/global_styles/content/work_packages/shared/_file_section.sass b/frontend/src/global_styles/content/work_packages/shared/_file_section.sass
index 2cc7d66e9fd..39cc2d04bec 100644
--- a/frontend/src/global_styles/content/work_packages/shared/_file_section.sass
+++ b/frontend/src/global_styles/content/work_packages/shared/_file_section.sass
@@ -114,10 +114,7 @@
min-height: $spot-spacing-4
&--empty-list-hint
- //@include spot-body-small($style: italic)
- //margin: $spot-spacing-0_75 $spot-spacing-0_5 0
-
- @include spot-body-small()
+ @include spot-body-small($style: italic)
margin-top: $spot-spacing-0_75
color: $spot-color-basic-gray-3
diff --git a/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass b/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass
index bce605436d5..28aa5232f66 100644
--- a/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass
+++ b/frontend/src/global_styles/content/work_packages/tabs/_tab_content.sass
@@ -37,12 +37,6 @@
.op-files-tab--storage-info-box:not(:last-child)
margin-bottom: $spot-spacing-1
- .op-file-list--actions
- margin-top: $spot-spacing-0_75
-
- > .op-file-list--action-button:not(:first-child)
- margin-left: $spot-spacing-1
-
&--header
border-bottom: 1px solid #ddd
padding-bottom: $spot-spacing-0_75
diff --git a/modules/storages/config/locales/js-en.yml b/modules/storages/config/locales/js-en.yml
index c8bdd3797ab..d5c7770a50e 100644
--- a/modules/storages/config/locales/js-en.yml
+++ b/modules/storages/config/locales/js-en.yml
@@ -5,6 +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}.
login: "%{storageType} login"
login_to: "Login to %{storageType}"
no_connection: "No %{storageType} connection"
diff --git a/modules/storages/spec/features/show_file_links_spec.rb b/modules/storages/spec/features/show_file_links_spec.rb
index 5c3b210abdf..aad1d9d24aa 100644
--- a/modules/storages/spec/features/show_file_links_spec.rb
+++ b/modules/storages/spec/features/show_file_links_spec.rb
@@ -28,7 +28,7 @@
require_relative '../spec_helper'
-describe 'Showing of file links in work package', type: :feature, js: true do
+describe 'Showing of file links in work package', js: true do
let(:permissions) { %i(view_work_packages edit_work_packages view_file_links manage_file_links) }
let(:project) { create(:project) }
let(:current_user) { create(:user, member_in_project: project, member_with_permissions: permissions) }
@@ -56,7 +56,7 @@ describe 'Showing of file links in work package', type: :feature, js: true do
.and_return(ServiceResult.success(result: oauth_client_token))
allow(connection_manager)
.to receive(:authorization_state)
- .and_return(:connected)
+ .and_return(:connected)
# Mock FileLinkSyncService as if Nextcloud would respond with origin_permission=nil
allow(::Storages::FileLinkSyncService)
@@ -103,7 +103,7 @@ describe 'Showing of file links in work package', type: :feature, js: true do
end
it 'must show storage information box with login button' do
- expect(page.find('[data-qa-selector="op-files-tab--storage-information"]')).to have_selector('button', count: 1)
+ expect(page.find('[data-qa-selector="op-storage--information"]')).to have_button(count: 1)
end
end
@@ -113,7 +113,7 @@ describe 'Showing of file links in work package', type: :feature, js: true do
end
it 'must show storage information box' do
- expect(page).to have_selector('[data-qa-selector="op-files-tab--storage-information"]', count: 1)
+ expect(page).to have_selector('[data-qa-selector="op-storage--information"]', count: 1)
end
end
end