TF-3985 Change icons and style to be consistent with Twake drive storage
This commit is contained in:
@@ -231,6 +231,7 @@ extension AppColor on Color {
|
|||||||
static const colorContactViewClearFilterButton = Color(0x001C3D0D);
|
static const colorContactViewClearFilterButton = Color(0x001C3D0D);
|
||||||
static const steelGrayA540 = Color(0xFF55687D);
|
static const steelGrayA540 = Color(0xFF55687D);
|
||||||
static const steelGray200 = Color(0xFFAEB7C2);
|
static const steelGray200 = Color(0xFFAEB7C2);
|
||||||
|
static const steelGray80 = Color(0xFFE7E8EC);
|
||||||
static const blue700 = Color(0xFF208BFF);
|
static const blue700 = Color(0xFF208BFF);
|
||||||
static const steelGray400 = Color(0xFF818C99);
|
static const steelGray400 = Color(0xFF818C99);
|
||||||
static const steelGray600 = Color(0xFF4E5966);
|
static const steelGray600 = Color(0xFF4E5966);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
|||||||
|
|
||||||
class IncreaseSpaceButtonWidget extends StatelessWidget {
|
class IncreaseSpaceButtonWidget extends StatelessWidget {
|
||||||
final ImagePaths imagePaths;
|
final ImagePaths imagePaths;
|
||||||
|
final bool isDesktop;
|
||||||
final VoidCallback onTapAction;
|
final VoidCallback onTapAction;
|
||||||
final EdgeInsetsGeometry? margin;
|
final EdgeInsetsGeometry? margin;
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ class IncreaseSpaceButtonWidget extends StatelessWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.imagePaths,
|
required this.imagePaths,
|
||||||
required this.onTapAction,
|
required this.onTapAction,
|
||||||
|
this.isDesktop = false,
|
||||||
this.margin,
|
this.margin,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -22,6 +24,7 @@ class IncreaseSpaceButtonWidget extends StatelessWidget {
|
|||||||
return Container(
|
return Container(
|
||||||
constraints: const BoxConstraints(minWidth: 193),
|
constraints: const BoxConstraints(minWidth: 193),
|
||||||
height: 44,
|
height: 44,
|
||||||
|
width: !isDesktop ? double.infinity : null,
|
||||||
margin: margin,
|
margin: margin,
|
||||||
child: ConfirmDialogButton(
|
child: ConfirmDialogButton(
|
||||||
label: AppLocalizations.of(context).increaseYourSpace,
|
label: AppLocalizations.of(context).increaseYourSpace,
|
||||||
|
|||||||
@@ -40,14 +40,17 @@ class MailboxView extends BaseMailboxView {
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
final isPremiumAvailable =
|
final isPremiumAvailable =
|
||||||
controller.mailboxDashBoardController.isPremiumAvailable;
|
controller.mailboxDashBoardController.isPremiumAvailable;
|
||||||
|
final isDesktop = controller.responsiveUtils.isDesktop(context);
|
||||||
|
|
||||||
if (isPremiumAvailable) {
|
if (isPremiumAvailable) {
|
||||||
return IncreaseSpaceButtonWidget(
|
return IncreaseSpaceButtonWidget(
|
||||||
imagePaths: controller.imagePaths,
|
imagePaths: controller.imagePaths,
|
||||||
margin: const EdgeInsetsDirectional.only(
|
margin: EdgeInsetsDirectional.only(
|
||||||
start: 26,
|
start: isDesktop ? 26 : 24,
|
||||||
bottom: 8,
|
bottom: 8,
|
||||||
|
end: isDesktop ? 0 : 24,
|
||||||
),
|
),
|
||||||
|
isDesktop: isDesktop,
|
||||||
onTapAction: () {},
|
onTapAction: () {},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ extension QuotasExtensions on Quota {
|
|||||||
|
|
||||||
String get hardLimitStorageAsString => presentationHardLimit != null ? filesize(presentationHardLimit!.value) : '';
|
String get hardLimitStorageAsString => presentationHardLimit != null ? filesize(presentationHardLimit!.value) : '';
|
||||||
|
|
||||||
|
String get quotaAvailableStorageAsString {
|
||||||
|
if (used != null &&
|
||||||
|
presentationHardLimit != null &&
|
||||||
|
presentationHardLimit!.value > used!.value) {
|
||||||
|
return filesize(presentationHardLimit!.value - used!.value);
|
||||||
|
}
|
||||||
|
return '0 B';
|
||||||
|
}
|
||||||
|
|
||||||
bool get isWarnLimitReached {
|
bool get isWarnLimitReached {
|
||||||
if (used != null && warnLimit != null) {
|
if (used != null && warnLimit != null) {
|
||||||
return used!.value >= warnLimit!.value * 0.9;
|
return used!.value >= warnLimit!.value * 0.9;
|
||||||
@@ -48,7 +57,7 @@ extension QuotasExtensions on Quota {
|
|||||||
return '${AppLocalizations.of(context).textQuotasOutOfStorage}'
|
return '${AppLocalizations.of(context).textQuotasOutOfStorage}'
|
||||||
'\n${AppLocalizations.of(context).quotaStateLabel(usedStorageAsString, hardLimitStorageAsString)}';
|
'\n${AppLocalizations.of(context).quotaStateLabel(usedStorageAsString, hardLimitStorageAsString)}';
|
||||||
} else {
|
} else {
|
||||||
return AppLocalizations.of(context).quotaStateLabel(usedStorageAsString, hardLimitStorageAsString);
|
return AppLocalizations.of(context).quotaAvailableLabel(quotaAvailableStorageAsString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:core/presentation/extensions/color_extension.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
|
import 'package:core/presentation/utils/theme_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -31,8 +32,8 @@ class QuotasView extends GetWidget<QuotasController> {
|
|||||||
: const EdgeInsets.symmetric(vertical: 16),
|
: const EdgeInsets.symmetric(vertical: 16),
|
||||||
margin: isDesktop
|
margin: isDesktop
|
||||||
? const EdgeInsetsDirectional.only(start: 16)
|
? const EdgeInsetsDirectional.only(start: 16)
|
||||||
: const EdgeInsetsDirectional.only(start: 24),
|
: const EdgeInsetsDirectional.symmetric(horizontal: 24),
|
||||||
width: isDesktop ? 224 : 196,
|
width: isDesktop ? 224 : double.infinity,
|
||||||
alignment: AlignmentDirectional.centerStart,
|
alignment: AlignmentDirectional.centerStart,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -51,8 +52,11 @@ class QuotasView extends GetWidget<QuotasController> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
AppLocalizations.of(context).storageQuotas,
|
AppLocalizations.of(context).storageQuotas,
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
style: ThemeUtils.textStyleInter500().copyWith(
|
||||||
color: AppColor.steelGray400,
|
color: AppColor.steelGray400,
|
||||||
|
fontSize: 12,
|
||||||
|
height: 15.76 / 12,
|
||||||
|
letterSpacing: 0.5,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
@@ -75,21 +79,31 @@ class QuotasView extends GetWidget<QuotasController> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: QuotasViewStyles.space),
|
const SizedBox(height: QuotasViewStyles.space),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: QuotasViewStyles.progressBarMaxWidth,
|
width: isDesktop
|
||||||
|
? QuotasViewStyles.progressBarMaxWidth
|
||||||
|
: double.infinity,
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
color: octetQuota.getQuotasStateProgressBarColor(),
|
color: octetQuota.getQuotasStateProgressBarColor(),
|
||||||
minHeight: QuotasViewStyles.progressBarHeight,
|
minHeight: QuotasViewStyles.progressBarHeight,
|
||||||
backgroundColor: QuotasViewStyles.progressBarBackgroundColor,
|
backgroundColor: QuotasViewStyles.progressBarBackgroundColor,
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(
|
||||||
|
QuotasViewStyles.progressBarBorderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
value: octetQuota.usedStoragePercent,
|
value: octetQuota.usedStoragePercent,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: QuotasViewStyles.space),
|
const SizedBox(height: QuotasViewStyles.space),
|
||||||
Text(
|
Text(
|
||||||
octetQuota.getQuotasStateTitle(context),
|
octetQuota.getQuotasStateTitle(context),
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
style: ThemeUtils.textStyleInter500().copyWith(
|
||||||
color: octetQuota.getQuotasStateTitleColor(),
|
color: octetQuota.getQuotasStateTitleColor(),
|
||||||
|
fontSize: 12,
|
||||||
|
height: 15.76 / 12,
|
||||||
|
letterSpacing: 0.5,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class QuotasViewStyles {
|
|||||||
static const double space = 8;
|
static const double space = 8;
|
||||||
static const double progressBarHeight = 3;
|
static const double progressBarHeight = 3;
|
||||||
static const double progressBarMaxWidth = 193;
|
static const double progressBarMaxWidth = 193;
|
||||||
|
static const double progressBarBorderRadius = 5;
|
||||||
|
|
||||||
static const Color progressBarBackgroundColor = AppColor.colorDivider;
|
static const Color progressBarBackgroundColor = AppColor.steelGray80;
|
||||||
static const Color topLineColor = AppColor.colorDividerHorizontal;
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2025-09-09T13:12:15.883838",
|
"@@last_modified": "2025-09-09T13:40:24.145761",
|
||||||
"initializing_data": "Initializing data...",
|
"initializing_data": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -4677,5 +4677,15 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"quotaAvailableLabel": "{count} available",
|
||||||
|
"@quotaAvailableLabel": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [
|
||||||
|
"count"
|
||||||
|
],
|
||||||
|
"placeholders": {
|
||||||
|
"count": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4935,4 +4935,12 @@ class AppLocalizations {
|
|||||||
name: 'increaseYourSpace',
|
name: 'increaseYourSpace',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String quotaAvailableLabel(String count) {
|
||||||
|
return Intl.message(
|
||||||
|
'$count available',
|
||||||
|
name: 'quotaAvailableLabel',
|
||||||
|
args: [count],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user