Merge pull request #53812 from nextcloud/backport/53693/stable30

[stable30] fix: Correctly show free space if lower than quota in Files navigation
This commit is contained in:
Côme Chilliet 2025-07-29 12:45:47 +02:00 committed by GitHub
commit a137a5183c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

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

View file

@ -174,6 +174,7 @@ describe('Quota rendering', () => {
cy.mockInitialState('files', 'storageStats', {
used: 1024 * 1024 * 1024,
quota: -1,
total: 50 * 1024 * 1024 * 1024,
})
cy.mount(NavigationView, {
@ -193,6 +194,7 @@ describe('Quota rendering', () => {
cy.mockInitialState('files', 'storageStats', {
used: 1024 * 1024 * 1024,
quota: 5 * 1024 * 1024 * 1024,
total: 5 * 1024 * 1024 * 1024,
relative: 20, // percent
})
@ -215,6 +217,7 @@ describe('Quota rendering', () => {
cy.mockInitialState('files', 'storageStats', {
used: 5 * 1024 * 1024 * 1024,
quota: 1024 * 1024 * 1024,
total: 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