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
[chore] removec floating error text
Eric Schubertd93863c0b43a
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex ef7d3fc9922..9533bf1f3cc 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -400,7 +400,6 @@ en:label_export: "Export"label_export_preparing: "The export is being prepared and will be downloaded shortly."label_file_link_no_permission: "You have no permission to see this file."- label_file_link_error: "Error fetching view permissions."label_filename: "File"label_filesize: "Size"label_general: "General"diff --git a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.component.ts b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.component.tsindex 42b64913e72..2112ecd15d1 100644--- a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.component.ts+++ b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.component.ts@@ -46,11 +46,7 @@ import { TimezoneService } from 'core-app/core/datetime/timezone.service';import { I18nService } from 'core-app/core/i18n/i18n.service';import { PrincipalRendererService } from 'core-app/shared/components/principal/principal-renderer.service';import { IFileIcon } from 'core-app/shared/components/file-links/file-link-icons/icon-mappings';-import {- fileLinkViewAllowed,- fileLinkViewError,- fileLinkViewNotAllowed,-} from 'core-app/shared/components/file-links/file-links-constants.const';+import { fileLinkViewAllowed } from 'core-app/shared/components/file-links/file-links-constants.const';@Component({// eslint-disable-next-line @angular-eslint/component-selector@@ -71,15 +67,13 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {@ViewChild('avatar') avatar:ElementRef;- public infoTimestampText:string;-- public fileLinkIcon:IFileIcon;+ infoTimestampText:string;- public showFloatingActions:boolean;+ fileLinkIcon:IFileIcon;- public floatingText:string;+ showFloatingActions:boolean;- public text = {+ text = {title: {openFile: this.i18n.t('js.label_open_file_link'),openFileLocation: this.i18n.t('js.label_open_file_link_location'),@@ -87,7 +81,6 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {},floatingText: {noViewPermission: this.i18n.t('js.label_file_link_no_permission'),- error: this.i18n.t('js.label_file_link_error'),},};@@ -108,7 +101,7 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {this.fileLinkIcon = getIconForMimeType(this.originData.mimeType);- this.derivePermissionState();+ this.showFloatingActions = this.fileLink._links.permission.href === fileLinkViewAllowed;}ngAfterViewInit():void {@@ -119,26 +112,13 @@ export class FileLinkListItemComponent implements OnInit, AfterViewInit {{ hide: true, link: false },{ hide: false, size: 'mini' },);- }- }-- private derivePermissionState():void {- switch (this.fileLink._links.permission.href) {- case fileLinkViewAllowed:- this.showFloatingActions = true;- this.floatingText = '';- break;- case fileLinkViewNotAllowed:- this.showFloatingActions = false;- this.floatingText = this.text.floatingText.noViewPermission;- break;- case fileLinkViewError:- this.showFloatingActions = false;- this.floatingText = this.text.floatingText.error;- break;- default:- this.showFloatingActions = true;- this.floatingText = '';+ } else {+ this.principalRendererService.render(+ this.avatar.nativeElement,+ { name: 'Not Available', href: '/placeholder_users/1' },+ { hide: true, link: false },+ { hide: false, size: 'mini' },+ );}}}diff --git a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.htmlindex e2ae259650c..f9f2c43c63f 100644--- a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html+++ b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html@@ -51,6 +51,6 @@class="spot-list--item-floating-actions op-files-tab--file-list-item-floating-text"><span class="spot-icon spot-icon_info2"></span>- <span [textContent]="floatingText"></span>+ <span [textContent]="text.floatingText.noViewPermission"></span></div></div>