Skip to content

Commit c5ea40c

Browse files
committed
fix(files): Partly revert 32c1aeb and show correct quota again
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 895eb19 commit c5ea40c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

apps/files/src/components/NavigationQuota.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export default {
5252
5353
computed: {
5454
storageStatsTitle() {
55-
const usedQuotaByte = formatFileSize(this.storageStats?.used, false, false, true)
56-
const quotaByte = formatFileSize(this.storageStats?.quota, false, false, true)
55+
const usedQuotaByte = formatFileSize(this.storageStats?.used, false, false)
56+
const quotaByte = formatFileSize(this.storageStats?.quota, false, false)
5757
5858
// If no quota set
5959
if (this.storageStats?.quota < 0) {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe('Quota rendering', () => {
178178

179179
it('Unlimited quota', () => {
180180
cy.mockInitialState('files', 'storageStats', {
181-
used: 1000 * 1000 * 1000,
181+
used: 1024 * 1024 * 1024,
182182
quota: -1,
183183
})
184184

@@ -200,8 +200,8 @@ describe('Quota rendering', () => {
200200

201201
it('Non-reached quota', () => {
202202
cy.mockInitialState('files', 'storageStats', {
203-
used: 1000 * 1000 * 1000,
204-
quota: 5 * 1000 * 1000 * 1000,
203+
used: 1024 * 1024 * 1024,
204+
quota: 5 * 1024 * 1024 * 1024,
205205
relative: 20, // percent
206206
})
207207

@@ -224,8 +224,8 @@ describe('Quota rendering', () => {
224224

225225
it('Reached quota', () => {
226226
cy.mockInitialState('files', 'storageStats', {
227-
used: 5 * 1000 * 1000 * 1000,
228-
quota: 1000 * 1000 * 1000,
227+
used: 5 * 1024 * 1024 * 1024,
228+
quota: 1024 * 1024 * 1024,
229229
relative: 500, // percent
230230
})
231231

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)