redesign | merged with dev branch

This commit is contained in:
OleksandrSobol 2020-09-14 22:07:44 +03:00
parent cc4a1f1d80
commit 18ccd5de35
6 changed files with 301 additions and 294 deletions

View file

@ -257,8 +257,8 @@ Future setup(
getIt.registerFactory(
() => SendPage(sendViewModel: getIt.get<SendViewModel>()));
// getIt.registerFactory(
// () => SendTemplatePage(sendViewModel: getIt.get<SendViewModel>()));
getIt.registerFactory(
() => SendTemplatePage(sendViewModel: getIt.get<SendViewModel>()));
getIt.registerFactory(() => WalletListViewModel(
walletInfoSource, getIt.get<AppStore>(), getIt.get<KeyService>()));

View file

@ -24,8 +24,8 @@ import 'package:cake_wallet/store/dashboard/fiat_convertation_store.dart';
// FIXME: move me
Future<void> loadCurrentWallet() async {
final appStore = getIt.get<AppStore>();
final name = 'test';
getIt.get<SharedPreferences>().getString('current_wallet_name');
//final name = 'test';
final name = getIt.get<SharedPreferences>().getString('current_wallet_name');
final typeRaw =
getIt.get<SharedPreferences>().getInt('current_wallet_type') ?? 0;
final type = deserializeFromInt(typeRaw);

View file

@ -104,9 +104,12 @@ class DashboardPage extends BasePage {
)),
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 44, right: 0, bottom: 24),
padding: EdgeInsets.only(
left: 45,
right: 45,
bottom: 24
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
child: ActionButton(
@ -120,7 +123,16 @@ class DashboardPage extends BasePage {
child: ActionButton(
image: exchangeImage,
title: S.of(context).exchange,
route: Routes.exchange),
route: Routes.exchange
),
),
Flexible(
child: ActionButton(
image: receiveImage,
title: S.of(context).receive,
route: Routes.receive,
alignment: Alignment.centerRight,
),
)
],
),

View file

@ -79,13 +79,13 @@ class WalletMenu {
return AlertWithTwoActions(
alertTitle: S.of(context).reconnection,
alertContent: S.of(context).reconnect_alert_text,
leftButtonText: S.of(context).ok,
rightButtonText: S.of(context).cancel,
actionLeftButton: () async {
rightButtonText: S.of(context).ok,
leftButtonText: S.of(context).cancel,
actionRightButton: () async {
await reconnect?.call();
Navigator.of(context).pop();
},
actionRightButton: () => Navigator.of(context).pop());
actionLeftButton: () => Navigator.of(context).pop());
});
}
}

View file

@ -10,6 +10,7 @@ import 'package:cake_wallet/view_model/send/send_view_model.dart';
import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/widgets/address_text_field.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/top_panel.dart';
@ -96,8 +97,9 @@ class BaseSendWidget extends StatelessWidget {
padding: EdgeInsets.only(top: isTemplate ? 20 : 0),
child: AddressTextField(
controller: _addressController,
placeholder: S.of(context).send_address(
sendViewModel.cryptoCurrencyTitle),
// placeholder: S
// .of(context)
// .send_address(sendViewModel.cryptoCurrencyTitle),
focusNode: _focusNode,
onURIScanned: (uri) {
var address = '';
@ -410,40 +412,40 @@ class BaseSendWidget extends StatelessWidget {
// itemBuilder: (context, index) {
// final template = templates[index];
return TemplateTile(
key: UniqueKey(),
to: template.name,
amount: template.amount,
from: template.cryptoCurrency,
onTap: () {
_addressController.text = template.address;
_cryptoAmountController.text = template.amount;
getOpenaliasRecord(context);
},
onRemove: () {
showDialog<void>(
context: context,
builder: (dialogContext) {
return AlertWithTwoActions(
alertTitle: S.of(context).template,
alertContent: S.of(context).confirm_delete_template,
rightButtonText: S.of(context).delete,
leftButtonText: S.of(context).cancel,
actionRightButton: () {
Navigator.of(dialogContext).pop();
sendViewModel.sendTemplateStore.remove(template: template);
sendViewModel.sendTemplateStore.update();
},
actionLeftButton: () => Navigator.of(dialogContext).pop()
);
}
);
},
);
}
);
}
)
// return TemplateTile(
// key: UniqueKey(),
// to: template.name,
// amount: template.amount,
// from: template.cryptoCurrency,
// onTap: () {
// _addressController.text = template.address;
// _cryptoAmountController.text = template.amount;
// getOpenaliasRecord(context);
// },
// onRemove: () {
// showDialog<void>(
// context: context,
// builder: (dialogContext) {
// return AlertWithTwoActions(
// alertTitle: S.of(context).template,
// alertContent: S.of(context).confirm_delete_template,
// leftButtonText: S.of(context).delete,
// rightButtonText: S.of(context).cancel,
// actionLeftButton: () {
// Navigator.of(dialogContext).pop();
// sendViewModel.sendTemplateStore.remove(template: template);
// sendViewModel.sendTemplateStore.update();
// },
// actionRightButton: () => Navigator.of(dialogContext).pop()
// );
// }
// );
// },
// );
// }
// );
// }
// )
],
),
),

View file

@ -42,7 +42,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
version: "2.4.1"
auto_size_text:
dependency: "direct main"
description:
@ -210,7 +210,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.13"
version: "1.14.12"
convert:
dependency: transitive
description:
@ -224,7 +224,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
version: "2.1.4"
csslib:
dependency: transitive
description:
@ -302,13 +302,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
ffi:
dependency: transitive
description:
@ -475,7 +468,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.14"
version: "2.1.12"
intl:
dependency: "direct main"
description:
@ -524,7 +517,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
version: "0.12.6"
meta:
dependency: transitive
description:
@ -594,7 +587,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.6.4"
path_drawing:
dependency: transitive
description:
@ -650,7 +643,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
version: "2.4.0"
platform:
dependency: transitive
description:
@ -830,7 +823,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
version: "1.9.3"
stream_channel:
dependency: transitive
description:
@ -865,7 +858,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
version: "0.2.15"
time:
dependency: transitive
description:
@ -886,7 +879,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.1.6"
url_launcher:
dependency: "direct main"
description:
@ -963,7 +956,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
version: "3.6.1"
yaml:
dependency: "direct main"
description:
@ -972,5 +965,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.9.0-14.0.dev <3.0.0"
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"