fix: home not showing pretty bytes when private

This commit is contained in:
Bobby Wibowo 2022-06-30 19:41:47 +07:00
parent ab96bd5d99
commit 6ef911538e
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -177,6 +177,8 @@ page.checkIfPublic = () => {
page.maxSize = parseInt(response.data.maxSize) page.maxSize = parseInt(response.data.maxSize)
page.maxSizeBytes = page.maxSize * 1e6 page.maxSizeBytes = page.maxSize * 1e6
document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes)
page.chunkSizeConfig = { page.chunkSizeConfig = {
max: (response.data.chunkSize && parseInt(response.data.chunkSize.max)) || 95, max: (response.data.chunkSize && parseInt(response.data.chunkSize.max)) || 95,
default: response.data.chunkSize && parseInt(response.data.chunkSize.default) default: response.data.chunkSize && parseInt(response.data.chunkSize.default)
@ -263,8 +265,7 @@ page.prepareUpload = () => {
// Prepare & generate config tab // Prepare & generate config tab
page.prepareUploadConfig() page.prepareUploadConfig()
// Update elements wherever applicable // Hide login button
document.querySelector('#maxSize > span').innerHTML = page.getPrettyBytes(page.maxSizeBytes)
document.querySelector('#loginToUpload').classList.add('is-hidden') document.querySelector('#loginToUpload').classList.add('is-hidden')
// Prepare & generate files upload tab // Prepare & generate files upload tab