web/satellite: change project limit upperbound
This change makes the upperbound of the project limit slider the max between the current project limit and the default limit for paid tier. Issue: https://github.com/storj/storj/issues/5553 Change-Id: I6ca31ec86810ee3577370ab5cd042fce8daf1b90
This commit is contained in:
parent
66541e600b
commit
ff88404d32
@ -323,18 +323,22 @@ const bandwidthMeasurementFormatted = computed((): string => {
|
||||
* Gets current default limit for paid accounts.
|
||||
*/
|
||||
const paidBandwidthLimit = computed((): number => {
|
||||
const limitVal = getLimitValue(MetaUtils.getMetaContent('default-paid-bandwidth-limit'));
|
||||
const maxLimit = Math.max(currentLimits.value.bandwidthLimit / Memory.TB, limitVal);
|
||||
if (activeBandwidthMeasurement.value === Dimensions.GB) {
|
||||
return toGB(getLimitValue(MetaUtils.getMetaContent('default-paid-bandwidth-limit')));
|
||||
return toGB(maxLimit);
|
||||
} else {
|
||||
return getLimitValue(MetaUtils.getMetaContent('default-paid-bandwidth-limit'));
|
||||
return maxLimit;
|
||||
}
|
||||
});
|
||||
|
||||
const paidStorageLimit = computed((): number => {
|
||||
const limitVal = getLimitValue(MetaUtils.getMetaContent('default-paid-storage-limit'));
|
||||
const maxLimit = Math.max(currentLimits.value.storageLimit / Memory.TB, limitVal);
|
||||
if (activeStorageMeasurement.value === Dimensions.GB) {
|
||||
return toGB(getLimitValue(MetaUtils.getMetaContent('default-paid-storage-limit')));
|
||||
return toGB(maxLimit);
|
||||
} else {
|
||||
return getLimitValue(MetaUtils.getMetaContent('default-paid-storage-limit'));
|
||||
return maxLimit;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user