TF-1118 Apply new design for Forwarding on web

This commit is contained in:
dab246
2022-11-04 00:33:59 +07:00
committed by Dat H. Pham
parent bd78732fe9
commit b153de5c90
22 changed files with 936 additions and 414 deletions
@@ -133,7 +133,7 @@ extension AppColor on Color {
static const colorBackgroundSnackBar = Color(0xFF343438);
static const colorBackgroundHeaderListRuleFilter = Color(0xFFFAF7F7);
static const colorBorderListRuleFilter = Color(0xFFE7E8EC);
static const colorBackgroundHeaderListForwards = Color(0xFFFAF7F7);
static const colorBackgroundHeaderListForwards = Color(0xFFF8F9FA);
static const colorBorderListForwardsFilter = Color(0xFFE7E8EC);
static const colorBackgroundFieldConditionRulesFilter = Color(0xFFF2F3F5);
static const colorDividerRuleFilter = Color(0xFFE7E8EC);
@@ -157,6 +157,9 @@ extension AppColor on Color {
static const colorDividerDestinationPicker = Color(0x1F000000);
static const colorItemAlreadySelected = Color(0xFF818C99);
static const colorItemSelected = Color(0xFFF2F3F5);
static const colorBorderSettingContentWeb = Color(0xFFE7E8EC);
static const colorDividerHeaderSetting = Color(0xFFE4E4E4);
static const colorSettingExplanation = Color(0xFF686E76);
static const mapGradientColor = [
[Color(0xFF21D4FD), Color(0xFFB721FF)],
@@ -19,8 +19,17 @@ extension StringExtension on String {
}
} else {
final regexLetter = RegExp("([A-Za-z])");
final firstLetter = regexLetter.firstMatch(trim())?.group(0);
return firstLetter != null ? '${firstLetter.toUpperCase()}${firstLetter.toUpperCase()}' : '';
final listMatch = regexLetter.allMatches(trim()).toList();
if (listMatch.length > 1) {
final firstLetter = listMatch[0].group(0);
final secondLetter = listMatch[1].group(0);
return firstLetter != null && secondLetter != null
? '${firstLetter.toUpperCase()}${secondLetter.toUpperCase()}'
: '';
} else {
final firstLetter = listMatch[0].group(0);
return firstLetter != null ? firstLetter.toUpperCase() : '';
}
}
}
}