mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Merge branch 'main' into CW-529-Modify-2FA-introduction-screens
This commit is contained in:
@@ -135,6 +135,7 @@ class ContactListPage extends BasePage {
|
||||
await showBar<void>(context, S.of(context).copied_to_clipboard);
|
||||
}
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24),
|
||||
child: Row(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
|
||||
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
|
||||
@@ -91,7 +92,7 @@ class HomeSettingsPage extends BasePage {
|
||||
fillColor: Theme.of(context).cardColor,
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||
size: 22.0,
|
||||
),
|
||||
padding: EdgeInsets.all(12),
|
||||
|
||||
@@ -18,6 +18,7 @@ class HomeScreenAccountWidget extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (_) => getIt.get<MoneroAccountListPage>());
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
height: 100.0,
|
||||
child: Row(
|
||||
|
||||
@@ -176,7 +176,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||
);
|
||||
launchUri = null;
|
||||
} else {
|
||||
_nonETHWalletErrorToast(S.current.switchToETHWallet);
|
||||
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||
String? _getRouteToGo() {
|
||||
if (isWalletConnectLink) {
|
||||
if (isEVMCompatibleChain(widget.appStore.wallet!.type)) {
|
||||
_nonETHWalletErrorToast(S.current.switchToETHWallet);
|
||||
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
|
||||
return null;
|
||||
}
|
||||
return Routes.walletConnectConnectionsListing;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:cake_wallet/core/wallet_connect/web3wallet_service.dart';
|
||||
import 'package:cake_wallet/reactions/wallet_connect.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
|
||||
@@ -18,12 +17,11 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
|
||||
class ConnectionSyncPage extends BasePage {
|
||||
ConnectionSyncPage(this.dashboardViewModel, this.web3walletService);
|
||||
ConnectionSyncPage(this.dashboardViewModel);
|
||||
|
||||
@override
|
||||
String get title => S.current.connection_sync;
|
||||
|
||||
final Web3WalletService? web3walletService;
|
||||
final DashboardViewModel dashboardViewModel;
|
||||
|
||||
@override
|
||||
|
||||
@@ -76,7 +76,7 @@ class DisplaySettingsPage extends BasePage {
|
||||
},
|
||||
),
|
||||
if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile)
|
||||
SettingsThemeChoicesCell(_displaySettingsViewModel),
|
||||
Semantics(label: S.current.color_theme, child: SettingsThemeChoicesCell(_displaySettingsViewModel)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -31,42 +31,43 @@ class SettingsChoicesCell extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Center(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: choicesListItem.items.map((dynamic e) {
|
||||
final isSelected = choicesListItem.selectedItem == e;
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: choicesListItem.items.map((dynamic e) {
|
||||
final isSelected = choicesListItem.selectedItem == e;
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
choicesListItem.onItemSelected.call(e);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 8),
|
||||
padding: EdgeInsets.symmetric(vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: isSelected
|
||||
? Theme.of(context).primaryColor
|
||||
: null,
|
||||
),
|
||||
child: Text(
|
||||
choicesListItem.displayItem.call(e),
|
||||
style: TextStyle(
|
||||
color: isSelected
|
||||
? Colors.white
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
|
||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
|
||||
child: Center(
|
||||
child: Text(
|
||||
choicesListItem.displayItem.call(e),
|
||||
style: TextStyle(
|
||||
color: isSelected
|
||||
? Colors.white
|
||||
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
|
||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -54,57 +54,61 @@ class SettingsThemeChoicesCell extends StatelessWidget {
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.all(5),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_displaySettingsViewModel.setTheme(e);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(cellRadius),
|
||||
border: isSelected
|
||||
? Border.all(
|
||||
color: Theme.of(context).primaryColor)
|
||||
: null,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.secondaryTextColor
|
||||
.withOpacity(
|
||||
currentTheme.brightness == Brightness.light
|
||||
? 0.1
|
||||
: 0.3),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(cellRadius),
|
||||
bottomLeft: Radius.circular(cellRadius)),
|
||||
color: e.themeData.primaryColor,
|
||||
child: Semantics(
|
||||
label: e.toString(),
|
||||
selected: isSelected,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_displaySettingsViewModel.setTheme(e);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(cellRadius),
|
||||
border: isSelected
|
||||
? Border.all(
|
||||
color: Theme.of(context).primaryColor)
|
||||
: null,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.secondaryTextColor
|
||||
.withOpacity(
|
||||
currentTheme.brightness == Brightness.light
|
||||
? 0.1
|
||||
: 0.3),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(cellRadius),
|
||||
bottomLeft: Radius.circular(cellRadius)),
|
||||
color: e.themeData.primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
color: e.themeData.colorScheme.background,
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
color: e.themeData.colorScheme.background,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(cellRadius),
|
||||
bottomRight: Radius.circular(cellRadius)),
|
||||
color: e.themeData.cardColor,
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: cellWidth, vertical: cellHeight),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(cellRadius),
|
||||
bottomRight: Radius.circular(cellRadius)),
|
||||
color: e.themeData.cardColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,25 +14,29 @@ class StandardSwitch extends StatefulWidget {
|
||||
class StandardSwitchState extends State<StandardSwitch> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: widget.onTaped,
|
||||
child: AnimatedContainer(
|
||||
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
||||
alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft,
|
||||
duration: Duration(milliseconds: 250),
|
||||
width: 50,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.value
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).disabledColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
||||
child: Container(
|
||||
width: 24.0,
|
||||
height: 24.0,
|
||||
|
||||
return Semantics(
|
||||
toggled: widget.value,
|
||||
child: GestureDetector(
|
||||
onTap: widget.onTaped,
|
||||
child: AnimatedContainer(
|
||||
padding: EdgeInsets.only(left: 2.0, right: 2.0),
|
||||
alignment: widget.value ? Alignment.centerRight : Alignment.centerLeft,
|
||||
duration: Duration(milliseconds: 250),
|
||||
width: 50,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle),
|
||||
color: widget.value
|
||||
? Theme.of(context).primaryColor
|
||||
: Theme.of(context).disabledColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(14.0))),
|
||||
child: Container(
|
||||
width: 24.0,
|
||||
height: 24.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
shape: BoxShape.circle),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user