From 42cad9de613f1540db1c1f3ecf950ef494e2f917 Mon Sep 17 00:00:00 2001 From: Facinorous-420 Date: Mon, 4 Apr 2022 13:28:28 -0400 Subject: [PATCH] Switch "file" type to "audio" type, whoops --- src/Pager.ts | 8 ++++---- views/pages/user/main.ejs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Pager.ts b/src/Pager.ts index c453b4f..2e9f1db 100644 --- a/src/Pager.ts +++ b/src/Pager.ts @@ -90,12 +90,12 @@ export class Pager { data: usersData, allImages: usersData.filter(item=> item.type.includes('image')), allVideos: usersData.filter(item=> item.type.includes('video')), - allFiles: usersData.filter(item=> item.type.includes('file')), + allAudio: usersData.filter(item=> item.type.includes('audio')), allOthers: usersData.filter(item=> item.type.includes('other')), totalSize:formatSize(usersData.map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalImageSize: formatSize(usersData.filter(item=> item.type.includes('image')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalVideosSize: formatSize(usersData.filter(item=> item.type.includes('video')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), - totalFilesSize: formatSize(usersData.filter(item=> item.type.includes('file')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), + totalAudioSize: formatSize(usersData.filter(item=> item.type.includes('audio')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalOthersSize: formatSize(usersData.filter(item=> item.type.includes('other')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)) } @@ -108,12 +108,12 @@ export class Pager { data: targetData, allImages: targetData.filter(item=> item.type.includes('image')), allVideos: targetData.filter(item=> item.type.includes('video')), - allFiles: targetData.filter(item=> item.type.includes('file')), + allAudio: targetData.filter(item=> item.type.includes('audio')), allOthers: targetData.filter(item=> item.type.includes('other')), totalSize:formatSize(targetData.map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalImageSize: formatSize(targetData.filter(item=> item.type.includes('image')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalVideosSize: formatSize(targetData.filter(item=> item.type.includes('video')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), - totalFilesSize: formatSize(targetData.filter(item=> item.type.includes('file')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), + totalAudioSize: formatSize(targetData.filter(item=> item.type.includes('file')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)), totalOthersSize: formatSize(targetData.filter(item=> item.type.includes('other')).map(item => item.size).reduce((prev, curr) => prev + curr, 0)) } } diff --git a/views/pages/user/main.ejs b/views/pages/user/main.ejs index e65da33..d3fa23c 100644 --- a/views/pages/user/main.ejs +++ b/views/pages/user/main.ejs @@ -85,14 +85,14 @@

- <%= usersDataObj.totalFilesSize %> + <%= usersDataObj.totalAudioSize %>

- <%= usersDataObj.allFiles.length %> + <%= usersDataObj.allAudio.length %>
- <% if(usersDataObj.allFiles.length==1){ %> File <% } else { %> Files <% } %> + <% if(usersDataObj.allAudio.length==1){ %> Audio File <% } else { %> Audio Files <% } %>
@@ -109,7 +109,7 @@ <%= usersDataObj.allOthers.length %>
- <% if(usersDataObj.allOthers.length==1){ %> Other <% } else { %> Others <% } %> + <% if(usersDataObj.allOthers.length==1){ %> Other File <% } else { %> Other Files <% } %>