Web:Common:CurrentQoutaStore: add showRoomQuotaBar and showStorageQuotaBar

This commit is contained in:
TimofeyBoyko 2022-10-17 16:01:51 +05:00
parent e5ab98c0d9
commit df2630ca47

View File

@ -162,6 +162,19 @@ class QuotasStore {
return result.value;
}
get showRoomQuotaBar() {
return (
(this.usedRoomsCount / this.maxCountRoomsByQuota) * 100 >= 90 ||
this.maxCountRoomsByQuota - this.usedRoomsCount === 1
);
}
get showStorageQuotaBar() {
return (
(this.usedTotalStorageSizeCount / this.maxTotalSizeByQuota) * 100 >= 90
);
}
setPortalQuotaValue = (res) => {
this.currentPortalQuota = res;
this.currentPortalQuotaFeatures = res.features;