Merge pull request #42293 from nextcloud/backport/28-files-sizes

This commit is contained in:
John Molakvoæ 2023-12-15 15:27:11 +01:00 committed by GitHub
commit f2e156668c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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