Display used and reserved limits capacity
This commit is contained in:
1 parent
ec43d34b4b
commit
2e81c43091
14 files changed
+287
-5
No files matched your search
@@ -991,6 +991,36 @@ abstract class AppLocalizations {
|
||||
/// In en, this message translates to:
|
||||
/// **'Status could not be refreshed. The status shown is the last known result.'**
|
||||
String get kycStatusStale;
|
||||
|
||||
/// No description provided for @kycUsed.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Used'**
|
||||
String get kycUsed;
|
||||
|
||||
/// No description provided for @kycReserved.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Reserved'**
|
||||
String get kycReserved;
|
||||
|
||||
/// No description provided for @kycUsageHelp.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Used is completed activity. Reserved is held for pending transactions. Both count toward your limit.'**
|
||||
String get kycUsageHelp;
|
||||
|
||||
/// No description provided for @kycOccupied.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Used + reserved'**
|
||||
String get kycOccupied;
|
||||
|
||||
/// No description provided for @kycNoCapacity.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No capacity available'**
|
||||
String get kycNoCapacity;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
||||
@@ -502,4 +502,20 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get kycStatusStale =>
|
||||
'Status could not be refreshed. The status shown is the last known result.';
|
||||
|
||||
@override
|
||||
String get kycUsed => 'Used';
|
||||
|
||||
@override
|
||||
String get kycReserved => 'Reserved';
|
||||
|
||||
@override
|
||||
String get kycUsageHelp =>
|
||||
'Used is completed activity. Reserved is held for pending transactions. Both count toward your limit.';
|
||||
|
||||
@override
|
||||
String get kycOccupied => 'Used + reserved';
|
||||
|
||||
@override
|
||||
String get kycNoCapacity => 'No capacity available';
|
||||
}
|
||||
@@ -503,4 +503,20 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get kycStatusStale =>
|
||||
'Не удалось обновить статус. Показан последний известный результат.';
|
||||
|
||||
@override
|
||||
String get kycUsed => 'Использовано';
|
||||
|
||||
@override
|
||||
String get kycReserved => 'Зарезервировано';
|
||||
|
||||
@override
|
||||
String get kycUsageHelp =>
|
||||
'Использовано — завершённые операции. Зарезервировано — суммы, удержанные для ожидающих операций. Обе суммы учитываются в лимите.';
|
||||
|
||||
@override
|
||||
String get kycOccupied => 'Использовано + зарезервировано';
|
||||
|
||||
@override
|
||||
String get kycNoCapacity => 'Доступный объём исчерпан';
|
||||
}
|
||||
@@ -49,6 +49,8 @@ class LimitsPanel extends StatelessWidget {
|
||||
),
|
||||
if (data.simulated)
|
||||
Text(l.kycLimitsDemo, style: t.textTheme.bodySmall),
|
||||
const SizedBox(height: 12),
|
||||
Text(l.kycUsageHelp, style: t.textTheme.bodySmall),
|
||||
if (data.rows.isEmpty) Text(l.kycLimitsEmpty),
|
||||
for (final row in data.rows) ...[
|
||||
const Divider(height: 32),
|
||||
@@ -67,6 +69,13 @@ class LimitsPanel extends StatelessWidget {
|
||||
row.currentMinor,
|
||||
row.currency,
|
||||
),
|
||||
_amount(context, l.kycUsed, row.usedMinor, row.currency),
|
||||
_amount(
|
||||
context,
|
||||
l.kycReserved,
|
||||
row.reservedMinor,
|
||||
row.currency,
|
||||
),
|
||||
_amount(
|
||||
context,
|
||||
l.kycRemaining,
|
||||
@@ -82,6 +91,22 @@ class LimitsPanel extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
LinearProgressIndicator(
|
||||
key: ValueKey('usage-${row.period.name}'),
|
||||
value: row.occupiedFraction,
|
||||
minHeight: 8,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
semanticsLabel:
|
||||
'${row.period == LimitPeriod.day ? l.kycDay : l.kycMonth}: ${l.kycOccupied}',
|
||||
),
|
||||
if (row.remainingMinor <= 0) ...[
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
l.kycNoCapacity,
|
||||
style: TextStyle(color: t.colorScheme.error),
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -148,5 +148,10 @@
|
||||
"kycDemoDeny": "Decline",
|
||||
"kycPreview": "Explore verification & limits",
|
||||
"kycChooseFirst": "Choose a photo to continue.",
|
||||
"kycStatusStale": "Status could not be refreshed. The status shown is the last known result."
|
||||
"kycStatusStale": "Status could not be refreshed. The status shown is the last known result.",
|
||||
"kycUsed": "Used",
|
||||
"kycReserved": "Reserved",
|
||||
"kycUsageHelp": "Used is completed activity. Reserved is held for pending transactions. Both count toward your limit.",
|
||||
"kycOccupied": "Used + reserved",
|
||||
"kycNoCapacity": "No capacity available"
|
||||
}
|
||||
@@ -148,5 +148,10 @@
|
||||
"kycDemoDeny": "Отклонить",
|
||||
"kycPreview": "Посмотреть верификацию и лимиты",
|
||||
"kycChooseFirst": "Выберите фото для продолжения.",
|
||||
"kycStatusStale": "Не удалось обновить статус. Показан последний известный результат."
|
||||
"kycStatusStale": "Не удалось обновить статус. Показан последний известный результат.",
|
||||
"kycUsed": "Использовано",
|
||||
"kycReserved": "Зарезервировано",
|
||||
"kycUsageHelp": "Использовано — завершённые операции. Зарезервировано — суммы, удержанные для ожидающих операций. Обе суммы учитываются в лимите.",
|
||||
"kycOccupied": "Использовано + зарезервировано",
|
||||
"kycNoCapacity": "Доступный объём исчерпан"
|
||||
}
|
||||
Reference in new issue
Block a user