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

[#43209] Unlink action sometimes missing on hover

Eric Schubert3fefa8978b68
diff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts
index 5885edf1a1f..f00296a71ae 100644
--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts
+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts
@@ -68,7 +68,7 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInit
fileLinks$:Observable<IFileLink[]>;
- allowEditing = false;
+ allowEditing$:Observable<boolean>;
disabled = false;
@@ -131,12 +131,9 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInit
this.showLinkFilesAction.next(!this.disabled && fileLinks.length > 0);
});
- this.currentUserService
+ this.allowEditing$ = this.currentUserService
.hasCapabilities$('file_links/manage', (this.resource.project as unknown&{ id:string }).id)
- .pipe(this.untilDestroyed())
- .subscribe((value) => {
- this.allowEditing = value;
- });
+ .pipe(this.untilDestroyed());
}
public removeFileLink(fileLink:IFileLink):void {
diff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html
index 381255275b4..8124a914ec5 100644
--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html
+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.html
@@ -19,7 +19,7 @@
op-file-link-list-item
[fileLink]="fileLink"
[disabled]="disabled"
- [allowEditing]="allowEditing"
+ [allowEditing]="allowEditing$ | async"
(removeFileLink)="removeFileLink(fileLink)"
></li>
</ul>