Client: Added a banner when room and storage limits have been reached.
This commit is contained in:
parent
470ee21171
commit
e70099c09c
@ -14,7 +14,8 @@
|
||||
"RemoveFilesOrClickToUpgrade": "Remove the unnecessary files or <1>click here</1> to upgrade your tariff plan.",
|
||||
"RemoveFilesOrContactToUpgrade": "Remove the unnecessary files or contact the {{productName}} administrator to upgrade the tariff plan.",
|
||||
"RemoveFilesOrContactToUpgradeQuota": "Remove the unnecessary files or contact the {{productName}} administrator to increase the storage quota.",
|
||||
"StorageAndRoomHeader": "The limit for storage space and the number of rooms is about to be exceeded.",
|
||||
"StorageAndRoomHeader": "The limit for storage space and the number of rooms is about to be exceeded",
|
||||
"StorageAndRoomLimitHeader": "The limit is reached for storage space and the number of rooms",
|
||||
"StorageAndUserHeader": "The limit for storage space and the number of admins/power users is about to be exceeded.",
|
||||
"StorageAndUserTariffLimitHeader": "The limit is reached for storage space and the number of admins/power users",
|
||||
"StorageQuotaHeader": "Storage space amount is about to be exceeded: {{currentValue}} / {{maxValue}}",
|
||||
|
@ -82,6 +82,7 @@ const Bar = (props) => {
|
||||
isStorageQuotaAlmostLimit,
|
||||
isStorageQuotaLimit,
|
||||
isRoomTariffAlmostLimit,
|
||||
isRoomsTariffLimit,
|
||||
} = props;
|
||||
|
||||
const navigate = useNavigate();
|
||||
@ -97,6 +98,7 @@ const Bar = (props) => {
|
||||
storageAndUserTariff: false,
|
||||
storageAndUserTariffLimit: false,
|
||||
roomsAndStorageTariff: false,
|
||||
roomsAndStorageTariffLimit: false,
|
||||
storageAndRoomQuota: false,
|
||||
confirmEmail: false,
|
||||
personalUserQuota: false,
|
||||
@ -147,6 +149,9 @@ const Bar = (props) => {
|
||||
roomsAndStorageTariff: closed.includes(
|
||||
QuotaBarTypes.RoomsAndStorageTariff,
|
||||
),
|
||||
roomsAndStorageTariffLimit: closed.includes(
|
||||
QuotaBarTypes.RoomsAndStorageTariffLimit,
|
||||
),
|
||||
storageAndUserTariffLimit: !closed.includes(
|
||||
QuotaBarTypes.UserAndStorageTariffLimit,
|
||||
),
|
||||
@ -183,6 +188,7 @@ const Bar = (props) => {
|
||||
usersTariffLimit: isAdmin | isRoomAdmin,
|
||||
storageAndUserTariff: isAdmin | isRoomAdmin,
|
||||
roomsAndStorageTariff: isAdmin | isRoomAdmin,
|
||||
roomsAndStorageTariffLimit: isAdmin | isRoomAdmin,
|
||||
storageAndUserTariffLimit: isAdmin | isRoomAdmin,
|
||||
storageAndRoomQuota: isAdmin,
|
||||
confirmEmail: true,
|
||||
@ -298,6 +304,12 @@ const Bar = (props) => {
|
||||
case QuotaBarTypes.RoomsAndStorageTariff:
|
||||
setBarVisible((value) => ({ ...value, roomsAndStorageTariff: false }));
|
||||
break;
|
||||
case QuotaBarTypes.RoomsAndStorageTariffLimit:
|
||||
setBarVisible((value) => ({
|
||||
...value,
|
||||
roomsAndStorageTariffLimit: false,
|
||||
}));
|
||||
break;
|
||||
case QuotaBarTypes.PersonalUserQuota:
|
||||
setBarVisible((value) => ({ ...value, personalUserQuota: false }));
|
||||
break;
|
||||
@ -344,6 +356,18 @@ const Bar = (props) => {
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
isRoomsTariffLimit &&
|
||||
isStorageTariffLimit &&
|
||||
barVisible.roomsAndStorageTariffLimit
|
||||
) {
|
||||
return {
|
||||
type: QuotaBarTypes.RoomsAndStorageTariffLimit,
|
||||
maxValue: null,
|
||||
currentValue: null,
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
isUserTariffAlmostLimit &&
|
||||
isStorageTariffAlmostLimit &&
|
||||
@ -510,6 +534,7 @@ export default inject(
|
||||
isStorageQuotaAlmostLimit,
|
||||
isStorageQuotaLimit,
|
||||
isRoomTariffAlmostLimit,
|
||||
isRoomsTariffLimit,
|
||||
} = currentQuotaStore;
|
||||
|
||||
const { currentColorScheme, setMainBarVisible } = settingsStore;
|
||||
@ -547,6 +572,7 @@ export default inject(
|
||||
isStorageQuotaAlmostLimit,
|
||||
isStorageQuotaLimit,
|
||||
isRoomTariffAlmostLimit,
|
||||
isRoomsTariffLimit,
|
||||
};
|
||||
},
|
||||
)(withTranslation(["Profile", "Common"])(observer(Bar)));
|
||||
|
@ -269,6 +269,11 @@ const QuotasBar = ({
|
||||
header: t("StorageAndRoomHeader"),
|
||||
description: getUpgradeTariffDescription(),
|
||||
};
|
||||
case QuotaBarTypes.RoomsAndStorageTariffLimit:
|
||||
return {
|
||||
header: t("StorageAndRoomLimitHeader"),
|
||||
description: getUpgradeTariffDescription(),
|
||||
};
|
||||
case QuotaBarTypes.PersonalUserQuota:
|
||||
return {
|
||||
header: getPersonalQuotaHeader(),
|
||||
|
@ -104,6 +104,7 @@ export const QuotaBarTypes = Object.freeze({
|
||||
UserAndStorageTariff: "user-storage-quota",
|
||||
UserAndStorageTariffLimit: "user-storage-quota-limit",
|
||||
RoomsAndStorageTariff: "room-storage-quota",
|
||||
RoomsAndStorageTariffLimit: "room-storage-quota-limit",
|
||||
PersonalUserQuota: "personal-user-quota",
|
||||
StorageQuota: "tenant-custom-quota",
|
||||
StorageQuotaLimit: "tenant-custom-quota-limit",
|
||||
|
@ -335,11 +335,6 @@ class CurrentQuotasStore {
|
||||
};
|
||||
|
||||
get isWarningRoomsDialog() {
|
||||
console.log(
|
||||
"isRoomsTariffLimit",
|
||||
this.currentTariffStatusStore?.isGracePeriod,
|
||||
this.isRoomsTariffLimit,
|
||||
);
|
||||
return (
|
||||
this.currentTariffStatusStore?.isGracePeriod || this.isRoomsTariffLimit
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user