Skip to content

Commit b880ec3

Browse files
authored
Merge pull request #53693 from nextcloud/fix/files-navigation-quota-total
fix: Correctly show free space if lower than quota in Files navigation
2 parents 0c087ec + 97e8756 commit b880ec3

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

apps/files/src/components/NavigationQuota.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
computed: {
5959
storageStatsTitle() {
6060
const usedQuotaByte = formatFileSize(this.storageStats?.used, false, false)
61-
const quotaByte = formatFileSize(this.storageStats?.quota, false, false)
61+
const quotaByte = formatFileSize(this.storageStats?.total, false, false)
6262
6363
// If no quota set
6464
if (this.storageStats?.quota < 0) {

apps/files/src/views/Navigation.cy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ describe('Quota rendering', () => {
190190
cy.mockInitialState('files', 'storageStats', {
191191
used: 1024 * 1024 * 1024,
192192
quota: -1,
193+
total: 50 * 1024 * 1024 * 1024,
193194
})
194195

195196
cy.mount(NavigationView, {
@@ -210,6 +211,7 @@ describe('Quota rendering', () => {
210211
cy.mockInitialState('files', 'storageStats', {
211212
used: 1024 * 1024 * 1024,
212213
quota: 5 * 1024 * 1024 * 1024,
214+
total: 5 * 1024 * 1024 * 1024,
213215
relative: 20, // percent
214216
})
215217

@@ -233,6 +235,7 @@ describe('Quota rendering', () => {
233235
cy.mockInitialState('files', 'storageStats', {
234236
used: 5 * 1024 * 1024 * 1024,
235237
quota: 1024 * 1024 * 1024,
238+
total: 1024 * 1024 * 1024,
236239
relative: 500, // percent
237240
})
238241

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)