Skip to content

Commit 6865f39

Browse files
authored
Merge pull request #53813 from nextcloud/backport/53693/stable31
[stable31] fix: Correctly show free space if lower than quota in Files navigation
2 parents 5eb7ad0 + a23f10f commit 6865f39

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
@@ -174,6 +174,7 @@ describe('Quota rendering', () => {
174174
cy.mockInitialState('files', 'storageStats', {
175175
used: 1024 * 1024 * 1024,
176176
quota: -1,
177+
total: 50 * 1024 * 1024 * 1024,
177178
})
178179

179180
cy.mount(NavigationView, {
@@ -193,6 +194,7 @@ describe('Quota rendering', () => {
193194
cy.mockInitialState('files', 'storageStats', {
194195
used: 1024 * 1024 * 1024,
195196
quota: 5 * 1024 * 1024 * 1024,
197+
total: 5 * 1024 * 1024 * 1024,
196198
relative: 20, // percent
197199
})
198200

@@ -215,6 +217,7 @@ describe('Quota rendering', () => {
215217
cy.mockInitialState('files', 'storageStats', {
216218
used: 5 * 1024 * 1024 * 1024,
217219
quota: 1024 * 1024 * 1024,
220+
total: 1024 * 1024 * 1024,
218221
relative: 500, // percent
219222
})
220223

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)