TF-4045 Remove storage information in left menu when it’s less than 80% of the total capacity

This commit is contained in:
dab246
2025-10-01 16:40:27 +07:00
committed by Dat H. Pham
parent 06783298bc
commit 2cc727c209
3 changed files with 45 additions and 44 deletions
@@ -59,32 +59,37 @@ class StorageView extends GetWidget<StorageController> {
textAlign: TextAlign.center,
),
Expanded(
child: Padding(
padding: _getPadding(isMobile: isMobile, isDesktop: isDesktop),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Obx(() {
final octetsQuota = controller.octetsQuota.value;
if (octetsQuota != null && octetsQuota.storageAvailable) {
return StorageProgressBarWidget(
imagePaths: controller.imagePaths,
quota: octetsQuota,
isMobile: isMobile,
);
} else {
return const SizedBox.shrink();
}
}),
UpgradeStorageWidget(
imagePaths: controller.imagePaths,
isMobile: isMobile,
onUpgradeStorageAction: controller.onUpgradeStorage,
)
],
),
),
child: Obx(() {
final octetsQuota = controller.octetsQuota.value;
if (octetsQuota != null && octetsQuota.storageAvailable) {
return SingleChildScrollView(
child: Padding(
padding: _getPadding(
isMobile: isMobile,
isDesktop: isDesktop,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
StorageProgressBarWidget(
imagePaths: controller.imagePaths,
quota: octetsQuota,
isMobile: isMobile,
),
UpgradeStorageWidget(
imagePaths: controller.imagePaths,
isMobile: isMobile,
onUpgradeStorageAction: controller.onUpgradeStorage,
)
],
),
),
);
} else {
return const SizedBox.shrink();
}
}),
),
],
),