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

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/42186/head
Ferdinand Thiessen 2 years ago committed by Eduardo Morales
parent bac05cae5b
commit 2d5d782f7f
  1. 4
      apps/files/src/components/NavigationQuota.vue
  2. 10
      apps/files/src/views/Navigation.cy.ts
  3. 4
      dist/files-main.js
  4. 2
      dist/files-main.js.map

@ -52,8 +52,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) {

@ -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
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save