fix(files): Partly revert 32c1aeb and show correct quota again

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2023-12-13 02:47:10 +01:00 committed by John Molakvoæ
parent 261de22ce9
commit a510d5375b
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
4 changed files with 10 additions and 10 deletions

View file

@ -51,8 +51,8 @@ export default {
computed: {
storageStatsTitle() {
const usedQuotaByte = formatFileSize(this.storageStats?.used, false, false, true)
const quotaByte = formatFileSize(this.storageStats?.quota, false, false, true)
const usedQuotaByte = formatFileSize(this.storageStats?.used, false, false)
const quotaByte = formatFileSize(this.storageStats?.quota, false, false)
// If no quota set
if (this.storageStats?.quota < 0) {

View file

@ -178,7 +178,7 @@ describe('Quota rendering', () => {
it('Unlimited quota', () => {
cy.mockInitialState('files', 'storageStats', {
used: 1000 * 1000 * 1000,
used: 1024 * 1024 * 1024,
quota: -1,
})
@ -200,8 +200,8 @@ describe('Quota rendering', () => {
it('Non-reached quota', () => {
cy.mockInitialState('files', 'storageStats', {
used: 1000 * 1000 * 1000,
quota: 5 * 1000 * 1000 * 1000,
used: 1024 * 1024 * 1024,
quota: 5 * 1024 * 1024 * 1024,
relative: 20, // percent
})
@ -224,8 +224,8 @@ describe('Quota rendering', () => {
it('Reached quota', () => {
cy.mockInitialState('files', 'storageStats', {
used: 5 * 1000 * 1000 * 1000,
quota: 1000 * 1000 * 1000,
used: 5 * 1024 * 1024 * 1024,
quota: 1024 * 1024 * 1024,
relative: 500, // percent
})

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long