From 6ef911538edb07e4f4f49254ebf6d377b4a4cb6a Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Thu, 30 Jun 2022 19:41:47 +0700 Subject: [PATCH] fix: home not showing pretty bytes when private --- src/js/home.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/home.js b/src/js/home.js index 50a63a4..23e01b8 100644 --- a/src/js/home.js +++ b/src/js/home.js @@ -177,6 +177,8 @@ page.checkIfPublic = () => { page.maxSize = parseInt(response.data.maxSize) page.maxSizeBytes = page.maxSize * 1e6 + document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes) + page.chunkSizeConfig = { max: (response.data.chunkSize && parseInt(response.data.chunkSize.max)) || 95, default: response.data.chunkSize && parseInt(response.data.chunkSize.default) @@ -263,8 +265,7 @@ page.prepareUpload = () => { // Prepare & generate config tab page.prepareUploadConfig() - // Update elements wherever applicable - document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes) + // Hide login button document.querySelector('#loginToUpload').classList.add('is-hidden') // Prepare & generate files upload tab