Skip to content

Commit

Permalink
fixes based on AI PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Nov 20, 2024
1 parent b6d0a82 commit 9cbb738
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/app/datasets/datafiles/datafiles.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
12 changes: 9 additions & 3 deletions src/app/shared/services/attachment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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") {
Expand All @@ -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(
Expand Down

0 comments on commit 9cbb738

Please sign in to comment.