Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(files): Partly revert 32c1aeb and show correct quota again #42293

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/files/src/components/NavigationQuota.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions apps/files/src/views/Navigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ describe('Quota rendering', () => {

it('Unlimited quota', () => {
cy.mockInitialState('files', 'storageStats', {
used: 1000 * 1000 * 1000,
used: 1024 * 1024 * 1024,
quota: -1,
})

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

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

Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

Loading