mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #53693 from nextcloud/fix/files-navigation-quota-total
fix: Correctly show free space if lower than quota in Files navigation
This commit is contained in:
commit
b880ec33ae
4 changed files with 7 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ describe('Quota rendering', () => {
|
|||
cy.mockInitialState('files', 'storageStats', {
|
||||
used: 1024 * 1024 * 1024,
|
||||
quota: -1,
|
||||
total: 50 * 1024 * 1024 * 1024,
|
||||
})
|
||||
|
||||
cy.mount(NavigationView, {
|
||||
|
|
@ -210,6 +211,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
|
||||
})
|
||||
|
||||
|
|
@ -233,6 +235,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
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue