mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Comments.
This commit is contained in:
parent
aa120c33b1
commit
cba4188665
6 changed files with 23 additions and 15 deletions
|
@ -285,7 +285,7 @@ class S implements WidgetsLocalizations {
|
|||
String get transaction_sent => "Transaction sent!";
|
||||
String get transactions => "Transactions";
|
||||
String get transactions_by_date => "Transactions by date";
|
||||
String get use => "Use ";
|
||||
String get use => "Switch to ";
|
||||
String get view_key_private => "View key (private)";
|
||||
String get view_key_public => "View key (public)";
|
||||
String get wallet_keys => "Wallet keys";
|
||||
|
|
|
@ -15,7 +15,7 @@ class DateSectionRaw extends StatelessWidget {
|
|||
final isToday = nowDate.day == date.day &&
|
||||
nowDate.month == date.month &&
|
||||
nowDate.year == date.year;
|
||||
final dateSectionDateFormat = DateFormatter.withCurrentLocal();
|
||||
final dateSectionDateFormat = DateFormatter.withCurrentLocal(hasTime: false);
|
||||
var title = "";
|
||||
|
||||
if (isToday) {
|
||||
|
|
|
@ -165,7 +165,7 @@ class WalletListBodyState extends State<WalletListBody> {
|
|||
bottomSection: Column(children: <Widget>[
|
||||
PrimaryImageButton(
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pushNamed(Routes.newWalletType),
|
||||
Navigator.of(context).pushNamed(Routes.newWallet),
|
||||
image: newWalletImage,
|
||||
text: S.of(context).wallet_list_create_new_wallet,
|
||||
color: Theme.of(context).accentTextTheme.subtitle.decorationColor,
|
||||
|
|
|
@ -3,13 +3,21 @@ import 'package:cake_wallet/di.dart';
|
|||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
|
||||
class DateFormatter {
|
||||
static String get currentLocalFormat {
|
||||
static String currentLocalFormat({bool hasTime = true}) {
|
||||
final isUSA = getIt.get<SettingsStore>().languageCode.toLowerCase() == 'en';
|
||||
final format = isUSA ? 'yyyy.MM.dd, HH:mm' : 'dd.MM.yyyy, HH:mm';
|
||||
final format =
|
||||
isUSA ? usaStyleFormat(hasTime) : regularStyleFormat(hasTime);
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
static DateFormat withCurrentLocal() =>
|
||||
DateFormat(currentLocalFormat, getIt.get<SettingsStore>().languageCode);
|
||||
static DateFormat withCurrentLocal({bool hasTime = true}) => DateFormat(
|
||||
currentLocalFormat(hasTime: hasTime),
|
||||
getIt.get<SettingsStore>().languageCode);
|
||||
|
||||
static String usaStyleFormat(bool hasTime) =>
|
||||
hasTime ? 'yyyy.MM.dd, HH:mm' : 'yyyy.MM.dd';
|
||||
|
||||
static String regularStyleFormat(bool hasTime) =>
|
||||
hasTime ? 'dd.MM.yyyy, HH:mm' : 'dd.MM.yyyy';
|
||||
}
|
||||
|
|
14
pubspec.lock
14
pubspec.lock
|
@ -133,7 +133,7 @@ packages:
|
|||
name: build_resolvers
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
version: "1.4.2"
|
||||
build_runner:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -273,7 +273,7 @@ packages:
|
|||
name: dart_style
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.7"
|
||||
version: "1.3.8"
|
||||
dartx:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -930,14 +930,14 @@ packages:
|
|||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.7.5"
|
||||
version: "5.7.6"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.1+1"
|
||||
version: "0.0.1+3"
|
||||
url_launcher_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -951,14 +951,14 @@ packages:
|
|||
name: url_launcher_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.8"
|
||||
version: "1.0.9"
|
||||
url_launcher_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.4+1"
|
||||
version: "0.1.5"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1024,4 +1024,4 @@ packages:
|
|||
version: "2.2.1"
|
||||
sdks:
|
||||
dart: ">=2.10.0-110 <2.11.0"
|
||||
flutter: ">=1.12.13+hotfix.5 <2.0.0"
|
||||
flutter: ">=1.22.0 <2.0.0"
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
"add_new_node" : "Add new node",
|
||||
|
||||
|
||||
"use" : "Use ",
|
||||
"use" : "Switch to ",
|
||||
"digit_pin" : "-digit PIN",
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue