mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Fix UI issues
Add missing translation
This commit is contained in:
parent
05b1bb05c4
commit
f00dc9132c
13 changed files with 188 additions and 184 deletions
|
@ -7,7 +7,7 @@ import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/buy/pre_order_page.dart';
|
import 'package:cake_wallet/src/screens/buy/pre_order_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart';
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/desktop_settings/dashboard_settings_page.dart';
|
import 'package:cake_wallet/src/screens/settings/desktop_settings/desktop_settings_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/privacy_page.dart';
|
import 'package:cake_wallet/src/screens/settings/privacy_page.dart';
|
||||||
|
|
|
@ -29,13 +29,13 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
|
||||||
final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
|
final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
|
||||||
final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
|
final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
|
||||||
final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
|
final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
|
||||||
Image _getNewWalletImage(BuildContext context) => Image.asset(
|
Image _newWalletImage(BuildContext context) => Image.asset(
|
||||||
'assets/images/new_wallet.png',
|
'assets/images/new_wallet.png',
|
||||||
height: 12,
|
height: 12,
|
||||||
width: 12,
|
width: 12,
|
||||||
color: Theme.of(context).primaryTextTheme.headline6!.color!,
|
color: Theme.of(context).primaryTextTheme.headline6!.color!,
|
||||||
);
|
);
|
||||||
Image _getRestoreWalletImage(BuildContext context) => Image.asset(
|
Image _restoreWalletImage(BuildContext context) => Image.asset(
|
||||||
'assets/images/restore_wallet.png',
|
'assets/images/restore_wallet.png',
|
||||||
height: 12,
|
height: 12,
|
||||||
width: 12,
|
width: 12,
|
||||||
|
@ -65,14 +65,14 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
|
||||||
onSelected: () => _navigateToCreateWallet(),
|
onSelected: () => _navigateToCreateWallet(),
|
||||||
child: DropDownItemWidget(
|
child: DropDownItemWidget(
|
||||||
title: S.of(context).create_new,
|
title: S.of(context).create_new,
|
||||||
image: _getNewWalletImage(context),
|
image: _newWalletImage(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
DesktopDropdownItem(
|
DesktopDropdownItem(
|
||||||
onSelected: () => _navigateToRestoreWallet(),
|
onSelected: () => _navigateToRestoreWallet(),
|
||||||
child: DropDownItemWidget(
|
child: DropDownItemWidget(
|
||||||
title: S.of(context).restore_wallet,
|
title: S.of(context).restore_wallet,
|
||||||
image: _getRestoreWalletImage(context),
|
image: _restoreWalletImage(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
@ -95,6 +95,7 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
|
||||||
value: dropDownItems.firstWhere((element) => element.isSelected),
|
value: dropDownItems.firstWhere((element) => element.isSelected),
|
||||||
underline: const SizedBox(),
|
underline: const SizedBox(),
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
|
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||||
|
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||||
import 'package:cw_core/wallet_type.dart';
|
import 'package:cw_core/wallet_type.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -23,10 +24,8 @@ import 'package:cake_wallet/core/seed_validator.dart';
|
||||||
|
|
||||||
class WalletRestorePage extends BasePage {
|
class WalletRestorePage extends BasePage {
|
||||||
WalletRestorePage(this.walletRestoreViewModel)
|
WalletRestorePage(this.walletRestoreViewModel)
|
||||||
: walletRestoreFromSeedFormKey =
|
: walletRestoreFromSeedFormKey = GlobalKey<WalletRestoreFromSeedFormState>(),
|
||||||
GlobalKey<WalletRestoreFromSeedFormState>(),
|
walletRestoreFromKeysFormKey = GlobalKey<WalletRestoreFromKeysFromState>(),
|
||||||
walletRestoreFromKeysFormKey =
|
|
||||||
GlobalKey<WalletRestoreFromKeysFromState>(),
|
|
||||||
_pages = [],
|
_pages = [],
|
||||||
_blockHeightFocusNode = FocusNode(),
|
_blockHeightFocusNode = FocusNode(),
|
||||||
_controller = PageController(initialPage: 0) {
|
_controller = PageController(initialPage: 0) {
|
||||||
|
@ -36,9 +35,8 @@ class WalletRestorePage extends BasePage {
|
||||||
_pages.add(WalletRestoreFromSeedForm(
|
_pages.add(WalletRestoreFromSeedForm(
|
||||||
displayBlockHeightSelector:
|
displayBlockHeightSelector:
|
||||||
walletRestoreViewModel.hasBlockchainHeightLanguageSelector,
|
walletRestoreViewModel.hasBlockchainHeightLanguageSelector,
|
||||||
displayLanguageSelector:
|
displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector,
|
||||||
walletRestoreViewModel.hasSeedLanguageSelector,
|
type: walletRestoreViewModel.type,
|
||||||
type: walletRestoreViewModel.type!,
|
|
||||||
key: walletRestoreFromSeedFormKey,
|
key: walletRestoreFromSeedFormKey,
|
||||||
blockHeightFocusNode: _blockHeightFocusNode,
|
blockHeightFocusNode: _blockHeightFocusNode,
|
||||||
onHeightOrDateEntered: (value) {
|
onHeightOrDateEntered: (value) {
|
||||||
|
@ -48,26 +46,22 @@ class WalletRestorePage extends BasePage {
|
||||||
},
|
},
|
||||||
onSeedChange: (String seed) {
|
onSeedChange: (String seed) {
|
||||||
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
||||||
final hasHeight = walletRestoreFromSeedFormKey
|
final hasHeight = walletRestoreFromSeedFormKey.currentState!.blockchainHeightKey
|
||||||
.currentState!.blockchainHeightKey.currentState!.restoreHeightController
|
.currentState!.restoreHeightController.text.isNotEmpty;
|
||||||
.text
|
|
||||||
.isNotEmpty;
|
|
||||||
if (hasHeight) {
|
if (hasHeight) {
|
||||||
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLanguageChange: (_) {
|
onLanguageChange: (_) {
|
||||||
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
||||||
final hasHeight = walletRestoreFromSeedFormKey
|
final hasHeight = walletRestoreFromSeedFormKey.currentState!.blockchainHeightKey
|
||||||
.currentState!.blockchainHeightKey.currentState!.restoreHeightController
|
.currentState!.restoreHeightController.text.isNotEmpty;
|
||||||
.text
|
|
||||||
.isNotEmpty;
|
|
||||||
|
|
||||||
if (hasHeight) {
|
if (hasHeight) {
|
||||||
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
walletRestoreViewModel.isButtonEnabled = _isValidSeed();
|
||||||
|
@ -78,8 +72,7 @@ class WalletRestorePage extends BasePage {
|
||||||
_pages.add(WalletRestoreFromKeysFrom(
|
_pages.add(WalletRestoreFromKeysFrom(
|
||||||
key: walletRestoreFromKeysFormKey,
|
key: walletRestoreFromKeysFormKey,
|
||||||
walletRestoreViewModel: walletRestoreViewModel,
|
walletRestoreViewModel: walletRestoreViewModel,
|
||||||
onHeightOrDateEntered: (value) =>
|
onHeightOrDateEntered: (value) => walletRestoreViewModel.isButtonEnabled = value));
|
||||||
walletRestoreViewModel.isButtonEnabled = value));
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -97,8 +90,7 @@ class WalletRestorePage extends BasePage {
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontFamily: 'Lato',
|
fontFamily: 'Lato',
|
||||||
color: titleColor ??
|
color: titleColor ?? Theme.of(context).primaryTextTheme.headline6!.color!),
|
||||||
Theme.of(context).primaryTextTheme!.headline6!.color!),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
final WalletRestoreViewModel walletRestoreViewModel;
|
final WalletRestoreViewModel walletRestoreViewModel;
|
||||||
|
@ -129,134 +121,134 @@ class WalletRestorePage extends BasePage {
|
||||||
reaction((_) => walletRestoreViewModel.mode, (WalletRestoreMode mode) {
|
reaction((_) => walletRestoreViewModel.mode, (WalletRestoreMode mode) {
|
||||||
walletRestoreViewModel.isButtonEnabled = false;
|
walletRestoreViewModel.isButtonEnabled = false;
|
||||||
|
|
||||||
walletRestoreFromSeedFormKey.currentState!.blockchainHeightKey.currentState
|
walletRestoreFromSeedFormKey
|
||||||
!.restoreHeightController.text = '';
|
.currentState!.blockchainHeightKey.currentState!.restoreHeightController.text = '';
|
||||||
walletRestoreFromSeedFormKey.currentState!.blockchainHeightKey.currentState
|
walletRestoreFromSeedFormKey
|
||||||
!.dateController.text = '';
|
.currentState!.blockchainHeightKey.currentState!.dateController.text = '';
|
||||||
walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.text = '';
|
walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.text = '';
|
||||||
|
|
||||||
walletRestoreFromKeysFormKey.currentState!.blockchainHeightKey.currentState
|
walletRestoreFromKeysFormKey
|
||||||
!.restoreHeightController.text = '';
|
.currentState!.blockchainHeightKey.currentState!.restoreHeightController.text = '';
|
||||||
walletRestoreFromKeysFormKey.currentState!.blockchainHeightKey.currentState
|
walletRestoreFromKeysFormKey
|
||||||
!.dateController.text = '';
|
.currentState!.blockchainHeightKey.currentState!.dateController.text = '';
|
||||||
walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.text = '';
|
walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.text = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
return KeyboardActions(
|
return KeyboardActions(
|
||||||
config: KeyboardActionsConfig(
|
config: KeyboardActionsConfig(
|
||||||
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
||||||
keyboardBarColor: Theme.of(context).accentTextTheme!.bodyText1!
|
keyboardBarColor: Theme.of(context).accentTextTheme.bodyText1!.backgroundColor!,
|
||||||
.backgroundColor!,
|
nextFocus: false,
|
||||||
nextFocus: false,
|
actions: [
|
||||||
actions: [
|
KeyboardActionsItem(
|
||||||
KeyboardActionsItem(
|
focusNode: _blockHeightFocusNode,
|
||||||
focusNode: _blockHeightFocusNode,
|
toolbarButtons: [(_) => KeyboardDoneButton()],
|
||||||
toolbarButtons: [(_) => KeyboardDoneButton()],
|
)
|
||||||
)
|
],
|
||||||
]),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 0,
|
height: 0,
|
||||||
color: Theme.of(context).backgroundColor,
|
color: Theme.of(context).backgroundColor,
|
||||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
child: Center(
|
||||||
Expanded(
|
child: ConstrainedBox(
|
||||||
child: PageView.builder(
|
constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint),
|
||||||
onPageChanged: (page) {
|
child: Column(
|
||||||
walletRestoreViewModel.mode =
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
page == 0 ? WalletRestoreMode.seed : WalletRestoreMode.keys;
|
children: [
|
||||||
},
|
Expanded(
|
||||||
controller: _controller,
|
child: PageView.builder(
|
||||||
itemCount: _pages.length,
|
onPageChanged: (page) {
|
||||||
itemBuilder: (_, index) =>
|
walletRestoreViewModel.mode =
|
||||||
SingleChildScrollView(child: _pages[index]))),
|
page == 0 ? WalletRestoreMode.seed : WalletRestoreMode.keys;
|
||||||
if (_pages.length > 1)
|
},
|
||||||
Padding(
|
controller: _controller,
|
||||||
padding: EdgeInsets.only(top: 10),
|
itemCount: _pages.length,
|
||||||
child: SmoothPageIndicator(
|
itemBuilder: (_, index) => SingleChildScrollView(child: _pages[index]),
|
||||||
controller: _controller,
|
),
|
||||||
count: _pages.length,
|
),
|
||||||
effect: ColorTransitionEffect(
|
if (_pages.length > 1)
|
||||||
spacing: 6.0,
|
Padding(
|
||||||
radius: 6.0,
|
padding: EdgeInsets.only(top: 10),
|
||||||
dotWidth: 6.0,
|
child: SmoothPageIndicator(
|
||||||
dotHeight: 6.0,
|
controller: _controller,
|
||||||
dotColor: Theme.of(context).hintColor.withOpacity(0.5),
|
count: _pages.length,
|
||||||
activeDotColor: Theme.of(context).hintColor),
|
effect: ColorTransitionEffect(
|
||||||
)),
|
spacing: 6.0,
|
||||||
Padding(
|
radius: 6.0,
|
||||||
padding: EdgeInsets.only(top: 20, bottom: 24, left: 24, right: 24),
|
dotWidth: 6.0,
|
||||||
child: Observer(
|
dotHeight: 6.0,
|
||||||
builder: (context) {
|
dotColor: Theme.of(context).hintColor.withOpacity(0.5),
|
||||||
return LoadingPrimaryButton(
|
activeDotColor: Theme.of(context).hintColor,
|
||||||
onPressed: _confirmForm,
|
),
|
||||||
text: S.of(context).restore_recover,
|
),
|
||||||
color:
|
),
|
||||||
Theme.of(context).accentTextTheme!.subtitle2!.decorationColor!,
|
Padding(
|
||||||
textColor:
|
padding: EdgeInsets.only(top: 20, bottom: 24, left: 24, right: 24),
|
||||||
Theme.of(context).accentTextTheme!.headline5!.decorationColor!,
|
child: Observer(
|
||||||
isLoading: walletRestoreViewModel.state is IsExecutingState,
|
builder: (context) {
|
||||||
isDisabled: !walletRestoreViewModel.isButtonEnabled,
|
return LoadingPrimaryButton(
|
||||||
);
|
onPressed: _confirmForm,
|
||||||
},
|
text: S.of(context).restore_recover,
|
||||||
))
|
color: Theme.of(context).accentTextTheme.subtitle2!.decorationColor!,
|
||||||
])));
|
textColor: Theme.of(context).accentTextTheme.headline5!.decorationColor!,
|
||||||
|
isLoading: walletRestoreViewModel.state is IsExecutingState,
|
||||||
|
isDisabled: !walletRestoreViewModel.isButtonEnabled,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isValidSeed() {
|
bool _isValidSeed() {
|
||||||
final seedWords = walletRestoreFromSeedFormKey
|
final seedWords =
|
||||||
.currentState
|
walletRestoreFromSeedFormKey.currentState!.seedWidgetStateKey.currentState!.text.split(' ');
|
||||||
!.seedWidgetStateKey
|
|
||||||
.currentState
|
|
||||||
!.text
|
|
||||||
.split(' ');
|
|
||||||
|
|
||||||
if ((walletRestoreViewModel.type == WalletType.monero || walletRestoreViewModel.type == WalletType.haven) &&
|
if ((walletRestoreViewModel.type == WalletType.monero ||
|
||||||
|
walletRestoreViewModel.type == WalletType.haven) &&
|
||||||
seedWords.length != WalletRestoreViewModelBase.moneroSeedMnemonicLength) {
|
seedWords.length != WalletRestoreViewModelBase.moneroSeedMnemonicLength) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((walletRestoreViewModel.type == WalletType.bitcoin ||
|
if ((walletRestoreViewModel.type == WalletType.bitcoin ||
|
||||||
walletRestoreViewModel.type == WalletType.litecoin) &&
|
walletRestoreViewModel.type == WalletType.litecoin) &&
|
||||||
(seedWords.length != WalletRestoreViewModelBase.electrumSeedMnemonicLength &&
|
(seedWords.length != WalletRestoreViewModelBase.electrumSeedMnemonicLength &&
|
||||||
seedWords.length != WalletRestoreViewModelBase.electrumShortSeedMnemonicLength)) {
|
seedWords.length != WalletRestoreViewModelBase.electrumShortSeedMnemonicLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final words = walletRestoreFromSeedFormKey
|
final words =
|
||||||
.currentState
|
walletRestoreFromSeedFormKey.currentState!.seedWidgetStateKey.currentState!.words.toSet();
|
||||||
!.seedWidgetStateKey
|
return seedWords.toSet().difference(words).toSet().isEmpty;
|
||||||
.currentState
|
|
||||||
!.words
|
|
||||||
.toSet();
|
|
||||||
return seedWords
|
|
||||||
.toSet()
|
|
||||||
.difference(words)
|
|
||||||
.toSet()
|
|
||||||
.isEmpty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> _credentials() {
|
Map<String, dynamic> _credentials() {
|
||||||
final credentials = <String, dynamic>{};
|
final credentials = <String, dynamic>{};
|
||||||
|
|
||||||
if (walletRestoreViewModel.mode == WalletRestoreMode.seed) {
|
if (walletRestoreViewModel.mode == WalletRestoreMode.seed) {
|
||||||
credentials['seed'] = walletRestoreFromSeedFormKey
|
credentials['seed'] =
|
||||||
.currentState!.seedWidgetStateKey.currentState!.text;
|
walletRestoreFromSeedFormKey.currentState!.seedWidgetStateKey.currentState!.text;
|
||||||
|
|
||||||
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
if (walletRestoreViewModel.hasBlockchainHeightLanguageSelector) {
|
||||||
credentials['height'] = walletRestoreFromSeedFormKey
|
credentials['height'] =
|
||||||
.currentState!.blockchainHeightKey.currentState!.height;
|
walletRestoreFromSeedFormKey.currentState!.blockchainHeightKey.currentState!.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
credentials['name'] = walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.text;
|
credentials['name'] =
|
||||||
|
walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.text;
|
||||||
} else {
|
} else {
|
||||||
credentials['address'] =
|
credentials['address'] = walletRestoreFromKeysFormKey.currentState!.addressController.text;
|
||||||
walletRestoreFromKeysFormKey.currentState!.addressController.text;
|
credentials['viewKey'] = walletRestoreFromKeysFormKey.currentState!.viewKeyController.text;
|
||||||
credentials['viewKey'] =
|
credentials['spendKey'] = walletRestoreFromKeysFormKey.currentState!.spendKeyController.text;
|
||||||
walletRestoreFromKeysFormKey.currentState!.viewKeyController.text;
|
credentials['height'] =
|
||||||
credentials['spendKey'] =
|
walletRestoreFromKeysFormKey.currentState!.blockchainHeightKey.currentState!.height;
|
||||||
walletRestoreFromKeysFormKey.currentState!.spendKeyController.text;
|
credentials['name'] =
|
||||||
credentials['height'] = walletRestoreFromKeysFormKey
|
walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.text;
|
||||||
.currentState!.blockchainHeightKey.currentState!.height;
|
|
||||||
credentials['name'] = walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return credentials;
|
return credentials;
|
||||||
|
@ -272,10 +264,8 @@ class WalletRestorePage extends BasePage {
|
||||||
: walletRestoreFromKeysFormKey.currentState!.formKey;
|
: walletRestoreFromKeysFormKey.currentState!.formKey;
|
||||||
|
|
||||||
final name = walletRestoreViewModel.mode == WalletRestoreMode.seed
|
final name = walletRestoreViewModel.mode == WalletRestoreMode.seed
|
||||||
? walletRestoreFromSeedFormKey
|
? walletRestoreFromSeedFormKey.currentState!.nameTextEditingController.value.text
|
||||||
.currentState!.nameTextEditingController.value.text
|
: walletRestoreFromKeysFormKey.currentState!.nameTextEditingController.value.text;
|
||||||
: walletRestoreFromKeysFormKey
|
|
||||||
.currentState!.nameTextEditingController.value.text;
|
|
||||||
|
|
||||||
if (!formKey.currentState!.validate()) {
|
if (!formKey.currentState!.validate()) {
|
||||||
return;
|
return;
|
||||||
|
@ -301,5 +291,3 @@ class WalletRestorePage extends BasePage {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class DesktopSettingsPage extends StatefulWidget {
|
||||||
|
|
||||||
class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
|
class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
|
||||||
final int itemCount = SettingActions.desktopSettings.length;
|
final int itemCount = SettingActions.desktopSettings.length;
|
||||||
|
|
||||||
int? currentPage;
|
int? currentPage;
|
||||||
|
|
||||||
void _onItemChange(int index) {
|
void _onItemChange(int index) {
|
||||||
|
@ -79,25 +79,30 @@ class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Flexible(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Column(
|
child: ConstrainedBox(
|
||||||
mainAxisSize: MainAxisSize.min,
|
constraints: BoxConstraints(maxWidth: 500),
|
||||||
children: [
|
child: Column(
|
||||||
SizedBox(height: 100),
|
mainAxisSize: MainAxisSize.min,
|
||||||
Flexible(
|
children: [
|
||||||
child: Navigator(
|
SizedBox(height: 100),
|
||||||
key: _settingsNavigatorKey,
|
Flexible(
|
||||||
initialRoute: Routes.empty_no_route,
|
child: Navigator(
|
||||||
onGenerateRoute: (settings) => Router.createRoute(settings),
|
key: _settingsNavigatorKey,
|
||||||
onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) {
|
initialRoute: Routes.empty_no_route,
|
||||||
return [
|
onGenerateRoute: (settings) => Router.createRoute(settings),
|
||||||
navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))!
|
onGenerateInitialRoutes:
|
||||||
];
|
(NavigatorState navigator, String initialRouteName) {
|
||||||
},
|
return [
|
||||||
|
navigator
|
||||||
|
.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))!
|
||||||
|
];
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
|
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_link_provider_cell.dart';
|
import 'package:cake_wallet/src/screens/settings/widgets/settings_link_provider_cell.dart';
|
||||||
import 'package:cake_wallet/src/widgets/standard_list.dart';
|
import 'package:cake_wallet/src/widgets/standard_list.dart';
|
||||||
|
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||||
import 'package:cake_wallet/view_model/settings/link_list_item.dart';
|
import 'package:cake_wallet/view_model/settings/link_list_item.dart';
|
||||||
import 'package:cake_wallet/view_model/settings/regular_list_item.dart';
|
import 'package:cake_wallet/view_model/settings/regular_list_item.dart';
|
||||||
import 'package:cake_wallet/view_model/support_view_model.dart';
|
import 'package:cake_wallet/view_model/support_view_model.dart';
|
||||||
|
@ -18,32 +19,34 @@ class SupportPage extends BasePage {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) {
|
Widget body(BuildContext context) {
|
||||||
final iconColor =
|
final iconColor = Theme.of(context).accentTextTheme!.headline1!.backgroundColor!;
|
||||||
Theme.of(context).accentTextTheme!.headline1!.backgroundColor!;
|
|
||||||
// FIX-ME: Added `context` it was not used here before, maby bug ?
|
// FIX-ME: Added `context` it was not used here before, maby bug ?
|
||||||
return SectionStandardList(
|
return Center(
|
||||||
context: context,
|
child: ConstrainedBox(
|
||||||
sectionCount: 1,
|
constraints: BoxConstraints(maxWidth: 500),
|
||||||
itemCounter: (int _) => supportViewModel.items.length,
|
child: SectionStandardList(
|
||||||
itemBuilder: (_, __, index) {
|
context: context,
|
||||||
final item = supportViewModel.items[index];
|
sectionCount: 1,
|
||||||
|
itemCounter: (int _) => supportViewModel.items.length,
|
||||||
|
itemBuilder: (_, __, index) {
|
||||||
|
final item = supportViewModel.items[index];
|
||||||
|
|
||||||
if (item is RegularListItem) {
|
if (item is RegularListItem) {
|
||||||
return SettingsCellWithArrow(
|
return SettingsCellWithArrow(title: item.title, handler: item.handler);
|
||||||
title: item.title, handler: item.handler);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (item is LinkListItem) {
|
if (item is LinkListItem) {
|
||||||
return SettingsLinkProviderCell(
|
return SettingsLinkProviderCell(
|
||||||
title: item.title,
|
title: item.title,
|
||||||
icon: item.icon,
|
icon: item.icon,
|
||||||
iconColor: item.hasIconColor ? iconColor : null,
|
iconColor: item.hasIconColor ? iconColor : null,
|
||||||
link: item.link,
|
link: item.link,
|
||||||
linkTitle: item.linkTitle);
|
linkTitle: item.linkTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container();
|
return Container();
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -433,7 +433,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 7;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
||||||
|
@ -567,7 +567,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 7;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
||||||
|
@ -595,7 +595,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 7;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
INFOPLIST_KEY_CFBundleDisplayName = "Cake Wallet";
|
||||||
|
|
|
@ -682,5 +682,6 @@
|
||||||
"send_to_this_address" : "أرسل ${currency} ${tag}إلى هذا العنوان",
|
"send_to_this_address" : "أرسل ${currency} ${tag}إلى هذا العنوان",
|
||||||
"arrive_in_this_address" : "سيصل ${currency} ${tag}إلى هذا العنوان",
|
"arrive_in_this_address" : "سيصل ${currency} ${tag}إلى هذا العنوان",
|
||||||
"do_not_send": "لا ترسل",
|
"do_not_send": "لا ترسل",
|
||||||
"error_dialog_content": "عفوًا ، لقد حصلنا على بعض الخطأ.\n\nيرجى إرسال تقرير التعطل إلى فريق الدعم لدينا لتحسين التطبيق."
|
"error_dialog_content": "عفوًا ، لقد حصلنا على بعض الخطأ.\n\nيرجى إرسال تقرير التعطل إلى فريق الدعم لدينا لتحسين التطبيق.",
|
||||||
|
"settings": "إعدادات"
|
||||||
}
|
}
|
||||||
|
|
|
@ -684,5 +684,6 @@
|
||||||
"send_to_this_address" : "इस पते पर ${currency} ${tag}भेजें",
|
"send_to_this_address" : "इस पते पर ${currency} ${tag}भेजें",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}इस पते पर पहुंचेंगे",
|
"arrive_in_this_address" : "${currency} ${tag}इस पते पर पहुंचेंगे",
|
||||||
"do_not_send": "मत भेजो",
|
"do_not_send": "मत भेजो",
|
||||||
"error_dialog_content": "ओह, हमसे कुछ गड़बड़ी हुई है.\n\nएप्लिकेशन को बेहतर बनाने के लिए कृपया क्रैश रिपोर्ट हमारी सहायता टीम को भेजें।"
|
"error_dialog_content": "ओह, हमसे कुछ गड़बड़ी हुई है.\n\nएप्लिकेशन को बेहतर बनाने के लिए कृपया क्रैश रिपोर्ट हमारी सहायता टीम को भेजें।",
|
||||||
|
"settings": "समायोजन"
|
||||||
}
|
}
|
||||||
|
|
|
@ -684,5 +684,6 @@
|
||||||
"send_to_this_address" : "${currency} ${tag}をこのアドレスに送金",
|
"send_to_this_address" : "${currency} ${tag}をこのアドレスに送金",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}はこの住所に到着します",
|
"arrive_in_this_address" : "${currency} ${tag}はこの住所に到着します",
|
||||||
"do_not_send": "送信しない",
|
"do_not_send": "送信しない",
|
||||||
"error_dialog_content": "Spiacenti, abbiamo riscontrato un errore.\n\nSi prega di inviare il rapporto sull'arresto anomalo al nostro team di supporto per migliorare l'applicazione."
|
"error_dialog_content": "Spiacenti, abbiamo riscontrato un errore.\n\nSi prega di inviare il rapporto sull'arresto anomalo al nostro team di supporto per migliorare l'applicazione.",
|
||||||
|
"settings": "設定"
|
||||||
}
|
}
|
||||||
|
|
|
@ -684,5 +684,6 @@
|
||||||
"send_to_this_address" : "ဤလိပ်စာသို့ ${currency} ${tag}သို့ ပို့ပါ။",
|
"send_to_this_address" : "ဤလိပ်စာသို့ ${currency} ${tag}သို့ ပို့ပါ။",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}ဤလိပ်စာသို့ ရောက်ရှိပါမည်။",
|
"arrive_in_this_address" : "${currency} ${tag}ဤလိပ်စာသို့ ရောက်ရှိပါမည်။",
|
||||||
"do_not_send": "မပို့ပါနှင့်",
|
"do_not_send": "မပို့ပါနှင့်",
|
||||||
"error_dialog_content": "အိုး၊ ကျွန်ုပ်တို့တွင် အမှားအယွင်းအချို့ရှိသည်။\n\nအပလီကေးရှင်းကို ပိုမိုကောင်းမွန်စေရန်အတွက် ပျက်စီးမှုအစီရင်ခံစာကို ကျွန်ုပ်တို့၏ပံ့ပိုးကူညီရေးအဖွဲ့ထံ ပေးပို့ပါ။"
|
"error_dialog_content": "အိုး၊ ကျွန်ုပ်တို့တွင် အမှားအယွင်းအချို့ရှိသည်။\n\nအပလီကေးရှင်းကို ပိုမိုကောင်းမွန်စေရန်အတွက် ပျက်စီးမှုအစီရင်ခံစာကို ကျွန်ုပ်တို့၏ပံ့ပိုးကူညီရေးအဖွဲ့ထံ ပေးပို့ပါ။",
|
||||||
|
"settings": "ဆက်တင်များ"
|
||||||
}
|
}
|
||||||
|
|
|
@ -682,5 +682,6 @@
|
||||||
"send_to_this_address" : "ส่ง ${currency} ${tag}ไปยังที่อยู่นี้",
|
"send_to_this_address" : "ส่ง ${currency} ${tag}ไปยังที่อยู่นี้",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}จะมาถึงที่อยู่นี้",
|
"arrive_in_this_address" : "${currency} ${tag}จะมาถึงที่อยู่นี้",
|
||||||
"do_not_send": "อย่าส่ง",
|
"do_not_send": "อย่าส่ง",
|
||||||
"error_dialog_content": "อ๊ะ เราพบข้อผิดพลาดบางอย่าง\n\nโปรดส่งรายงานข้อขัดข้องไปยังทีมสนับสนุนของเราเพื่อปรับปรุงแอปพลิเคชันให้ดียิ่งขึ้น"
|
"error_dialog_content": "อ๊ะ เราพบข้อผิดพลาดบางอย่าง\n\nโปรดส่งรายงานข้อขัดข้องไปยังทีมสนับสนุนของเราเพื่อปรับปรุงแอปพลิเคชันให้ดียิ่งขึ้น",
|
||||||
|
"settings": "การตั้งค่า"
|
||||||
}
|
}
|
||||||
|
|
|
@ -684,5 +684,6 @@
|
||||||
"send_to_this_address" : "Bu adrese ${currency} ${tag}gönder",
|
"send_to_this_address" : "Bu adrese ${currency} ${tag}gönder",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}bu adrese ulaşacak",
|
"arrive_in_this_address" : "${currency} ${tag}bu adrese ulaşacak",
|
||||||
"do_not_send": "Gönderme",
|
"do_not_send": "Gönderme",
|
||||||
"error_dialog_content": "Hay aksi, bir hatamız var.\n\nUygulamayı daha iyi hale getirmek için lütfen kilitlenme raporunu destek ekibimize gönderin."
|
"error_dialog_content": "Hay aksi, bir hatamız var.\n\nUygulamayı daha iyi hale getirmek için lütfen kilitlenme raporunu destek ekibimize gönderin.",
|
||||||
|
"settings": "ayarlar"
|
||||||
}
|
}
|
||||||
|
|
|
@ -682,5 +682,6 @@
|
||||||
"send_to_this_address" : "发送 ${currency} ${tag}到这个地址",
|
"send_to_this_address" : "发送 ${currency} ${tag}到这个地址",
|
||||||
"arrive_in_this_address" : "${currency} ${tag}将到达此地址",
|
"arrive_in_this_address" : "${currency} ${tag}将到达此地址",
|
||||||
"do_not_send": "不要发送",
|
"do_not_send": "不要发送",
|
||||||
"error_dialog_content": "糟糕,我们遇到了一些错误。\n\n请将崩溃报告发送给我们的支持团队,以改进应用程序。"
|
"error_dialog_content": "糟糕,我们遇到了一些错误。\n\n请将崩溃报告发送给我们的支持团队,以改进应用程序。",
|
||||||
|
"settings": "设置"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue