Skip to content

Commit

Permalink
Merge pull request #117 from waifuvault/move-local-string
Browse files Browse the repository at this point in the history
move to js file
  • Loading branch information
VictoriqueMoe committed Mar 16, 2024
2 parents b0848e0 + 86e4fa6 commit 0fde9fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/public/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ public class Example {
function loadSocket(){
socket.on("record", ({recordCount, recordSize}) => {
fileCountSpan.innerText = recordCount;
fileCountSpan.innerText = recordCount.toLocaleString();
totalFileSizeSpan.innerText = recordSize;
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/services/socket/recordInfoSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export class RecordInfoSocket {
}

private async getPayload(): Promise<RecordInfoPayload> {
const records = await this.repo.getRecordCount();
const recordCount = await this.repo.getRecordCount();
const size = (await this.repo.getTotalFileSize()) ?? 0;
return {
recordCount: records.toLocaleString(),
recordCount,
recordSize: ObjectUtils.sizeToHuman(size),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/typeings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export type ProtectionLevel = "Encrypted" | "Password" | "None";
export type Awaitable<T> = Promise<T> | T;

export type RecordInfoPayload = {
recordCount: string;
recordCount: number;
recordSize: string;
};

0 comments on commit 0fde9fd

Please sign in to comment.