mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
CW-506-Add-a-switch-to-enable-disable-domain-lookups (#1155)
* looks up domain ui * update address resolv func * add localization * minor fixes * Revert "Merge branch 'main' into CW-506-Add-a-switch-to-enable-disable-domain-lookups" This reverts commit 92924a90e828cc9adf0ac8d517ae32ef316353fd, reversing changes made to 5a2a20305404ed8e83e0b5974c0a58d703264bcd. * Revert "Revert "Merge branch 'main' into CW-506-Add-a-switch-to-enable-disable-domain-lookups"" This reverts commit 00cf6a1cadb5bca4798d42c1a3566cd8772bb6bb. * fix merge commit
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
|
||||
import 'package:cake_wallet/view_model/settings/privacy_settings_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
|
||||
class DomainLookupsPage extends BasePage {
|
||||
DomainLookupsPage(this._privacySettingsViewModel);
|
||||
|
||||
@override
|
||||
String get title => S.current.domain_looks_up;
|
||||
|
||||
final PrivacySettingsViewModel _privacySettingsViewModel;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Observer(builder: (_) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
SettingsSwitcherCell(
|
||||
title: 'Twitter',
|
||||
value: _privacySettingsViewModel.lookupTwitter,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsTwitter(value)),
|
||||
SettingsSwitcherCell(
|
||||
title: 'Mastodon',
|
||||
value: _privacySettingsViewModel.looksUpMastodon,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsMastodon(value)),
|
||||
SettingsSwitcherCell(
|
||||
title: 'Yat service',
|
||||
value: _privacySettingsViewModel.looksUpYatService,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsYatService(value)),
|
||||
SettingsSwitcherCell(
|
||||
title: 'Unstoppable Domains',
|
||||
value: _privacySettingsViewModel.looksUpUnstoppableDomains,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsUnstoppableDomains(value)),
|
||||
SettingsSwitcherCell(
|
||||
title: 'OpenAlias,',
|
||||
value: _privacySettingsViewModel.looksUpOpenAlias,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsOpenAlias(value)),
|
||||
SettingsSwitcherCell(
|
||||
title: 'Ethereum Name Service',
|
||||
value: _privacySettingsViewModel.looksUpENS,
|
||||
onValueChange: (_, bool value) => _privacySettingsViewModel.setLookupsENS(value)),
|
||||
|
||||
//if (!isHaven) it does not work correctly
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'package:cake_wallet/entities/exchange_api_mode.dart';
|
||||
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_choices_cell.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
|
||||
import 'package:cake_wallet/utils/device_info.dart';
|
||||
@@ -84,6 +86,10 @@ class PrivacyPage extends BasePage {
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setUseEtherscan(value);
|
||||
}),
|
||||
SettingsCellWithArrow(
|
||||
title: S.current.domain_looks_up,
|
||||
handler: (context) => Navigator.of(context).pushNamed(Routes.domainLookupsPage),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user