mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Merge quota requests into folders request
This commit is contained in:
parent
20eb01de08
commit
8d3bcdc2f2
9 changed files with 45 additions and 51 deletions
|
|
@ -27,6 +27,9 @@ export const FolderUserStore = new class {
|
|||
listStatusSupported: false,
|
||||
// sortMode: '',
|
||||
|
||||
quotaLimit: 0,
|
||||
quotaUsage: 0,
|
||||
|
||||
sentFolder: '',
|
||||
draftFolder: '',
|
||||
spamFolder: '',
|
||||
|
|
@ -103,6 +106,11 @@ export const FolderUserStore = new class {
|
|||
trashFolder: fSetSystemFolderType(FolderType.Trash),
|
||||
archiveFolder: fSetSystemFolderType(FolderType.Archive)
|
||||
});
|
||||
|
||||
this.quotaPercentage = ko.computed(() => {
|
||||
const quota = this.quotaLimit(), usage = this.quotaUsage();
|
||||
return 0 < quota ? Math.ceil((usage / quota) * 100) : 0;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue