Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(photos):show-effective-account-storage

Aswin Asok9c8e7a2a9940
diff --git a/web/apps/photos/src/components/sidebar/Sidebar.tsx b/web/apps/photos/src/components/sidebar/Sidebar.tsx
index 00ad48d33c..9ddc405750 100644
--- a/web/apps/photos/src/components/sidebar/Sidebar.tsx
+++ b/web/apps/photos/src/components/sidebar/Sidebar.tsx
@@ -104,9 +104,11 @@ import {
import { get2FAStatus } from "ente-new/photos/services/user";
import {
familyAdminEmail,
+ familyMemberStorageLimit,
hasExceededStorageQuota,
isFamilyAdmin,
isPartOfFamily,
+ isPartOfFamilyWithOtherMembers,
isSubscriptionActive,
isSubscriptionActivePaid,
isSubscriptionCancelled,
@@ -972,7 +974,14 @@ const Account: React.FC<AccountProps> = ({
);
const planSubtext = userDetails
? [
- formattedStorageByteSize(userDetails.subscription.storage),
+ formattedStorageByteSize(
+ isPartOfFamilyWithOtherMembers(userDetails)
+ ? familyMemberStorageLimit(userDetails) ||
+ (userDetails.familyData?.storage ?? 0) +
+ userDetails.storageBonus
+ : userDetails.subscription.storage +
+ userDetails.storageBonus,
+ ),
userDetails.subscription.period
? t(
userDetails.subscription.period == "year"