From 9cbb738d4ba9f6c6415a246cfd6755fdd2a03cdb Mon Sep 17 00:00:00 2001 From: junjiequan <a331998513@gmail.com> Date: Wed, 20 Nov 2024 11:35:30 +0100 Subject: [PATCH] fixes based on AI PR review --- src/app/datasets/datafiles/datafiles.component.ts | 7 +++---- src/app/shared/services/attachment.service.ts | 12 +++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/datasets/datafiles/datafiles.component.ts b/src/app/datasets/datafiles/datafiles.component.ts index 854af36a9..f6b76ec3b 100644 --- a/src/app/datasets/datafiles/datafiles.component.ts +++ b/src/app/datasets/datafiles/datafiles.component.ts @@ -207,10 +207,9 @@ export class DatafilesComponent } replace_dynamic_values() { - const fileTooLargeMessage = `Some files are too big, but they can be downloaded at our sftp server: <strong>${this.sftpHost}</strong> at the folder: - <strong>${this.customSourcefolder || this.sourcefolder}</strong>`; - - return fileTooLargeMessage; + return `Some files are too big, but they can be downloaded + at our sftp server: <strong>${this.sftpHost}</strong> + at the folder: <strong>${this.customSourcefolder || this.sourcefolder}</strong>`; } ngAfterViewInit() { diff --git a/src/app/shared/services/attachment.service.ts b/src/app/shared/services/attachment.service.ts index 8dde4815e..9ad1f9ab8 100644 --- a/src/app/shared/services/attachment.service.ts +++ b/src/app/shared/services/attachment.service.ts @@ -3,7 +3,9 @@ import { Injectable } from "@angular/core"; @Injectable() export class AttachmentService { base64MimeType(encoded: string): string { - if (!encoded) return null; + if (!encoded) { + return null; + } let result = null; @@ -21,7 +23,9 @@ export class AttachmentService { } getImageUrl(encoded: string) { - if (!encoded) return null; + if (!encoded) { + return null; + } const mimeType = this.base64MimeType(encoded); if (mimeType === "application/pdf") { @@ -31,7 +35,9 @@ export class AttachmentService { } openAttachment(encoded: string) { - if (!encoded) return null; + if (!encoded) { + return null; + } const mimeType = this.base64MimeType(encoded); const strippedData = encoded.replace(