From af181656ab0ac85d70fc5972ad8a6ea4067ba38b Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Wed, 22 Jun 2022 12:09:25 +0800 Subject: [PATCH 01/14] ui update --- lib/pages/parasNew/crowdLoanList.dart | 2 ++ lib/pages/stakingNew/overView.dart | 48 ++++++++++++++++----------- lib/utils/i18n/zh/gov.dart | 6 ++-- lib/utils/i18n/zh/staking.dart | 2 +- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/lib/pages/parasNew/crowdLoanList.dart b/lib/pages/parasNew/crowdLoanList.dart index 03f0f6c60..1385ef25f 100644 --- a/lib/pages/parasNew/crowdLoanList.dart +++ b/lib/pages/parasNew/crowdLoanList.dart @@ -107,6 +107,8 @@ class _CrowdLoanListItemState extends State { children: [ Container( margin: EdgeInsets.only(right: 8), + height: 30, + width: 30, child: ClipRRect( borderRadius: BorderRadius.circular(30), child: Container( diff --git a/lib/pages/stakingNew/overView.dart b/lib/pages/stakingNew/overView.dart index d5ba69231..3756ebc1f 100644 --- a/lib/pages/stakingNew/overView.dart +++ b/lib/pages/stakingNew/overView.dart @@ -179,8 +179,7 @@ class _OverViewWidgetState extends State .textTheme .headline4 ?.copyWith( - fontWeight: FontWeight.bold, - fontSize: UI.getTextSize(22, context), + fontWeight: FontWeight.w600, color: Colors.white)) ], ), @@ -220,27 +219,36 @@ class _OverViewWidgetState extends State height: 2.0), content: Fmt.ratio(overview['stakedReturn'] / 100), + crossAxisAlignment: CrossAxisAlignment.start, + contentCrossAxisAlignment: + CrossAxisAlignment.start, ), ], ), - InfoItemRow( - dicStaking['v3.lastReward']!, - "${Fmt.balance((overview['lastReward'] ?? 0).toString(), decimals)} $symbol", - labelStyle: labelStyle, - contentStyle: labelStyle, - ), - InfoItemRow( - dicStaking['v3.minThreshold']!, - "${Fmt.balance(overview['minNominatorBond'], decimals)} $symbol", - labelStyle: labelStyle, - contentStyle: labelStyle, - ), - InfoItemRow( - dicStaking['v3.unbondingPeriod']!, - "≈ ${widget.plugin.basic.name == network_name_kusama ? '7' : '28'} ${dicStaking['reward.days']}", - labelStyle: labelStyle, - contentStyle: labelStyle, - ), + Padding( + padding: EdgeInsets.only(bottom: 8), + child: InfoItemRow( + dicStaking['v3.lastReward']!, + "${Fmt.balance((overview['lastReward'] ?? 0).toString(), decimals)} $symbol", + labelStyle: labelStyle, + contentStyle: labelStyle, + )), + Padding( + padding: EdgeInsets.only(bottom: 8), + child: InfoItemRow( + dicStaking['v3.minThreshold']!, + "${Fmt.balance(overview['minNominatorBond'], decimals)} $symbol", + labelStyle: labelStyle, + contentStyle: labelStyle, + )), + Padding( + padding: EdgeInsets.only(bottom: 8), + child: InfoItemRow( + dicStaking['v3.unbondingPeriod']!, + "≈ ${widget.plugin.basic.name == network_name_kusama ? '7' : '28'} ${dicStaking['reward.days']}", + labelStyle: labelStyle, + contentStyle: labelStyle, + )), InfoItemRow( dicStaking['v3.activeNominators']!, Fmt.balance( diff --git a/lib/utils/i18n/zh/gov.dart b/lib/utils/i18n/zh/gov.dart index 3bea1db8c..8ded3746e 100644 --- a/lib/utils/i18n/zh/gov.dart +++ b/lib/utils/i18n/zh/gov.dart @@ -17,7 +17,7 @@ const Map zhGov = { 'treasury.approval': '赞成', 'treasury.available': '总余额', 'treasury.spendable': '可用', - 'treasury.period': '花费周期', + 'treasury.period': '支出周期', 'treasury.day': '天', 'treasury.value': '金额', 'treasury.proposer': '申请人', @@ -96,11 +96,11 @@ const Map zhGov = { 'v3.voteVaule': '投票数量', 'v3.votingAccount': '投票帐号', 'v3.votingBond': '投票绑定', - 'v3.votingMessage': '此金额将保留至您投票期间', + 'v3.votingMessage': '在您投票期间,这笔金额将被锁定', 'v3.externals': '外部提案', 'v3.treasury.payment': '支付', 'v3.treasury.pending': '等待', 'v3.treasury.Approved': '通过', - 'v3.treasury.nextBurn': '次回灼烧', + 'v3.treasury.nextBurn': '下次销毁', 'v3.end': '结束' }; diff --git a/lib/utils/i18n/zh/staking.dart b/lib/utils/i18n/zh/staking.dart index 1b8037d0d..887321998 100644 --- a/lib/utils/i18n/zh/staking.dart +++ b/lib/utils/i18n/zh/staking.dart @@ -110,7 +110,7 @@ const Map zhStaking = { 'v3.controllerError': '当前账号不是储值帐号,权限受限。', 'v3.stashError': '当前账号不是控制帐号,权限受限。', 'v3.noNomination': '当前暂无提名,赶紧提名验证人来享受质押获得收益吧!', - 'v3.noStaked': '你还没质押呢', + 'v3.noStaked': '您尚未质押', 'v3.totalUnbonding': '总解绑中', 'v3.rebondAmount': '重新绑定数量' }; From 131a3e7e60283068433efa09e8870e11eaa2422e Mon Sep 17 00:00:00 2001 From: gxhx Date: Wed, 22 Jun 2022 14:45:05 +0800 Subject: [PATCH 02/14] add account info --- lib/pages/governanceNew/governancePage.dart | 2 ++ lib/pages/parasNew/parasPage.dart | 2 ++ lib/pages/stakingNew/stakingPage.dart | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index d8f5cf2bf..3338716a8 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -16,6 +16,7 @@ import 'package:polkawallet_sdk/storage/keyring.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/addressIcon.dart'; import 'package:polkawallet_ui/components/infoItemRow.dart'; +import 'package:polkawallet_ui/components/v3/plugin/pluginAccountInfoAction.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInfoItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginScaffold.dart'; @@ -451,6 +452,7 @@ class _GovernancePageState extends State { appBar: PluginAppBar( title: Text(I18n.of(context)! .getDic(i18n_full_dic_kusama, 'common')!['governance']!), + actions: [PluginAccountInfoAction(widget.keyring)], ), body: Observer(builder: (_) { final list = _tabIndex == 0 diff --git a/lib/pages/parasNew/parasPage.dart b/lib/pages/parasNew/parasPage.dart index 0ea32a248..a0051b7e5 100644 --- a/lib/pages/parasNew/parasPage.dart +++ b/lib/pages/parasNew/parasPage.dart @@ -16,6 +16,7 @@ import 'package:polkawallet_sdk/storage/keyring.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/listTail.dart'; import 'package:polkawallet_ui/components/v3/infoItemRow.dart'; +import 'package:polkawallet_ui/components/v3/plugin/pluginAccountInfoAction.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInfoItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginLoadingWidget.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginScaffold.dart'; @@ -126,6 +127,7 @@ class _ParasPageState extends State { appBar: PluginAppBar( title: Text(I18n.of(context)! .getDic(i18n_full_dic_kusama, 'common')!['parachain']!), + actions: [PluginAccountInfoAction(widget.keyring)], ), body: _loaded ? RefreshIndicator( diff --git a/lib/pages/stakingNew/stakingPage.dart b/lib/pages/stakingNew/stakingPage.dart index 84b859db0..791b788de 100644 --- a/lib/pages/stakingNew/stakingPage.dart +++ b/lib/pages/stakingNew/stakingPage.dart @@ -8,6 +8,7 @@ import 'package:polkawallet_plugin_kusama/utils/i18n/index.dart'; import 'package:polkawallet_sdk/storage/keyring.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/connectionChecker.dart'; +import 'package:polkawallet_ui/components/v3/plugin/pluginAccountInfoAction.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginIconButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginLoadingWidget.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginScaffold.dart'; @@ -38,7 +39,7 @@ class _StakingPageState extends State { title: Text(dic['staking']!), actions: [ Container( - margin: EdgeInsets.only(right: 16), + margin: EdgeInsets.only(right: 12), child: PluginIconButton( onPressed: () => Navigator.of(context).pushNamed(StakingHistoryPage.route), @@ -48,7 +49,8 @@ class _StakingPageState extends State { color: Color(0xFF17161F), ), ), - ) + ), + PluginAccountInfoAction(widget.keyring) ], ), body: Observer(builder: (_) { From cbbcd8c895a02e9ab7e1cd14977f803c12705bd1 Mon Sep 17 00:00:00 2001 From: shawn Date: Wed, 22 Jun 2022 18:51:46 +0800 Subject: [PATCH 03/14] update cdn endpoint --- lib/service/walletApi.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/walletApi.dart b/lib/service/walletApi.dart index ac0f60a95..9a3319446 100644 --- a/lib/service/walletApi.dart +++ b/lib/service/walletApi.dart @@ -4,7 +4,7 @@ import 'package:http/http.dart'; class WalletApi { static const String _endpoint = 'https://api.polkawallet.io'; - static const String _configEndpoint = 'https://acala.subdao.com'; + static const String _configEndpoint = 'https://acala.polkawallet-cloud.com'; static const String _cdnEndpoint = 'https://cdn.polkawallet-cloud.com'; static Future getTokenPrice() async { From b895563d77a4c956d68a7149ce459719d89497bf Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Wed, 22 Jun 2022 16:29:08 +0800 Subject: [PATCH 04/14] dialog update --- example/pubspec.lock | 70 +++++++++++++++---- example/pubspec.yaml | 6 +- lib/pages/governanceNew/councilPage.dart | 3 +- lib/pages/staking/actions/nominateForm.dart | 3 +- .../staking/actions/setControllerPage.dart | 7 +- lib/pages/staking/actions/setPayeePage.dart | 4 +- lib/pages/stakingNew/stakingView.dart | 10 ++- pubspec.lock | 22 +++--- 8 files changed, 89 insertions(+), 36 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index d60230fb2..d0d0a6fd7 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,13 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - aes_ecb_pkcs5_flutter: - dependency: transitive - description: - name: aes_ecb_pkcs5_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2" async: dependency: transitive description: @@ -125,6 +118,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_aes_ecb_pkcs5: + dependency: transitive + description: + name: flutter_aes_ecb_pkcs5 + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" flutter_inappwebview: dependency: transitive description: @@ -316,7 +316,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" mobx: dependency: transitive description: @@ -428,21 +428,21 @@ packages: path: ".." relative: true source: path - version: "0.4.6" + version: "0.4.8" polkawallet_sdk: dependency: transitive description: name: polkawallet_sdk url: "https://pub.dartlang.org" source: hosted - version: "0.4.7" + version: "0.4.8" polkawallet_ui: dependency: "direct main" description: - name: polkawallet_ui - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.7" + path: "../../ui" + relative: true + source: path + version: "0.4.8" process: dependency: transitive description: @@ -471,6 +471,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.3" + share_plus: + dependency: transitive + description: + name: share_plus + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.9" + share_plus_linux: + dependency: transitive + description: + name: share_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_macos: + dependency: transitive + description: + name: share_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.3" + share_plus_web: + dependency: transitive + description: + name: share_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_windows: + dependency: transitive + description: + name: share_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" shared_preferences: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 693809ff2..8a1f7d038 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -32,9 +32,9 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 -#dependency_overrides: -# polkawallet_ui: -# path: ../../ui +dependency_overrides: + polkawallet_ui: + path: ../../ui dev_dependencies: polkawallet_plugin_kusama: diff --git a/lib/pages/governanceNew/councilPage.dart b/lib/pages/governanceNew/councilPage.dart index bc08cd766..4f3189b69 100644 --- a/lib/pages/governanceNew/councilPage.dart +++ b/lib/pages/governanceNew/councilPage.dart @@ -8,6 +8,7 @@ import 'package:polkawallet_plugin_kusama/utils/i18n/index.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/addressIcon.dart'; import 'package:polkawallet_ui/components/connectionChecker.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInfoItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginLoadingWidget.dart'; @@ -67,7 +68,7 @@ class _CouncilPageState extends State { showCupertinoDialog( context: context, builder: (BuildContext context) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( title: Container(), content: Text(I18n.of(context)! .getDic(i18n_full_dic_kusama, 'gov')!['vote.remove.confirm']!), diff --git a/lib/pages/staking/actions/nominateForm.dart b/lib/pages/staking/actions/nominateForm.dart index a925cc904..e1fa00b22 100644 --- a/lib/pages/staking/actions/nominateForm.dart +++ b/lib/pages/staking/actions/nominateForm.dart @@ -14,6 +14,7 @@ import 'package:polkawallet_sdk/storage/keyring.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/txButton.dart'; import 'package:polkawallet_ui/components/v3/addressIcon.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginRadioButton.dart'; import 'package:polkawallet_ui/utils/consts.dart'; @@ -168,7 +169,7 @@ class _NominateFormState extends State { showCupertinoDialog( context: context, builder: (_) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( title: Container(), content: Text( '${dicStaking['nominate.max']} $maxNomination'), diff --git a/lib/pages/staking/actions/setControllerPage.dart b/lib/pages/staking/actions/setControllerPage.dart index 79d0eeece..a64814bfb 100644 --- a/lib/pages/staking/actions/setControllerPage.dart +++ b/lib/pages/staking/actions/setControllerPage.dart @@ -8,6 +8,7 @@ import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginAddressFormItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginScaffold.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginTxButton.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; class SetControllerPage extends StatefulWidget { SetControllerPage(this.plugin, this.keyring); @@ -95,7 +96,8 @@ class _SetControllerPageState extends State { showCupertinoDialog( context: context, builder: (_) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, content: Text(dic['v3.controllerError']!), actions: [ CupertinoDialogAction( @@ -115,7 +117,8 @@ class _SetControllerPageState extends State { showCupertinoDialog( context: context, builder: (BuildContext context) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, title: Container(), content: Text(dic['controller.warn']!), actions: [ diff --git a/lib/pages/staking/actions/setPayeePage.dart b/lib/pages/staking/actions/setPayeePage.dart index 639e095dd..1f0ff27b1 100644 --- a/lib/pages/staking/actions/setPayeePage.dart +++ b/lib/pages/staking/actions/setPayeePage.dart @@ -9,6 +9,7 @@ import 'package:polkawallet_sdk/storage/keyring.dart'; import 'package:polkawallet_sdk/storage/types/keyPairData.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/textTag.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginAddressFormItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginAddressTextFormField.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInputItem.dart'; @@ -52,7 +53,8 @@ class _SetPayeePageState extends State { showCupertinoDialog( context: context, builder: (BuildContext context) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, title: Container(), content: Text('${dic!['reward.warn']}'), actions: [ diff --git a/lib/pages/stakingNew/stakingView.dart b/lib/pages/stakingNew/stakingView.dart index 8d6939df7..13082939a 100644 --- a/lib/pages/stakingNew/stakingView.dart +++ b/lib/pages/stakingNew/stakingView.dart @@ -26,6 +26,7 @@ import 'package:polkawallet_sdk/storage/types/keyPairData.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; import 'package:polkawallet_ui/components/connectionChecker.dart'; import 'package:polkawallet_ui/components/v3/addressIcon.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; import 'package:polkawallet_ui/components/v3/infoItemRow.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginLoadingWidget.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginOutlinedButtonSmall.dart'; @@ -599,7 +600,8 @@ class _StakingViewState extends State { showCupertinoDialog( context: context, builder: (_) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, content: Text(dic['v3.stashError']!), actions: [ CupertinoDialogAction( @@ -692,7 +694,8 @@ class _StakingViewState extends State { showCupertinoDialog( context: context, builder: (_) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, content: Text( dic['v3.stashError']!), actions: [ @@ -763,7 +766,8 @@ class _StakingViewState extends State { showCupertinoDialog( context: context, builder: (_) { - return CupertinoAlertDialog( + return PolkawalletAlertDialog( + type: DialogType.warn, content: Text(dic['v3.stashError']!), actions: [ CupertinoDialogAction( diff --git a/pubspec.lock b/pubspec.lock index 2b717b5da..734fd8ecc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -257,7 +257,7 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.4.3+7" + version: "5.3.2" flutter_mobx: dependency: "direct main" description: @@ -421,7 +421,7 @@ packages: name: jaguar url: "https://pub.dartlang.org" source: hosted - version: "3.0.12" + version: "3.1.3" jaguar_common: dependency: transitive description: @@ -491,7 +491,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" mobx: dependency: "direct main" description: @@ -621,17 +621,17 @@ packages: polkawallet_sdk: dependency: "direct main" description: - path: "../sdk" - relative: true - source: path - version: "0.4.7" + name: polkawallet_sdk + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.8" polkawallet_ui: dependency: "direct main" description: - path: "../ui" - relative: true - source: path - version: "0.4.7" + name: polkawallet_ui + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.8" pool: dependency: transitive description: From 639f4fdcb1776ce3cb8e143ce450d11c4bf6e566 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Thu, 23 Jun 2022 12:52:40 +0800 Subject: [PATCH 05/14] update dialog --- lib/pages/governanceNew/referendumPanel.dart | 17 +- .../validators/validatorListFilter.dart | 7 +- lib/pages/stakingNew/stakingView.dart | 10 +- pubspec.lock | 165 +++++++++++++----- pubspec.yaml | 10 +- 5 files changed, 144 insertions(+), 65 deletions(-) diff --git a/lib/pages/governanceNew/referendumPanel.dart b/lib/pages/governanceNew/referendumPanel.dart index 6f58d8f6d..395708810 100644 --- a/lib/pages/governanceNew/referendumPanel.dart +++ b/lib/pages/governanceNew/referendumPanel.dart @@ -8,6 +8,7 @@ import 'package:polkawallet_ui/components/infoItemRow.dart'; import 'package:polkawallet_ui/utils/consts.dart'; import 'package:polkawallet_ui/utils/format.dart'; import 'package:polkawallet_ui/utils/index.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; class ReferendumPanel extends StatefulWidget { ReferendumPanel({ @@ -81,18 +82,18 @@ class _ReferendumPanelState extends State { context: context, barrierDismissible: true, builder: (BuildContext context) { - return CupertinoActionSheet( + return PolkawalletActionSheet( title: Text(dic['vote']!), message: Text(dic['v3.voteMessage.nay']!), actions: [ - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text(dic['v3.continueVote']!), onPressed: () { Navigator.of(context).pop(); _referendumAction(false); }, ), - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text(dic['v3.cancelMyVote']!), onPressed: () { Navigator.of(context).pop(); @@ -101,7 +102,7 @@ class _ReferendumPanelState extends State { }, ) ], - cancelButton: CupertinoActionSheetAction( + cancelButton: PolkawalletActionSheetAction( onPressed: () { Navigator.pop(context); }, @@ -195,18 +196,18 @@ class _ReferendumPanelState extends State { context: context, barrierDismissible: true, builder: (BuildContext context) { - return CupertinoActionSheet( + return PolkawalletActionSheet( title: Text(dic['vote']!), message: Text(dic['v3.voteMessage.aye']!), actions: [ - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text(dic['v3.continueVote']!), onPressed: () { Navigator.of(context).pop(); _referendumAction(true); }, ), - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text(dic['v3.cancelMyVote']!), onPressed: () { Navigator.of(context).pop(); @@ -215,7 +216,7 @@ class _ReferendumPanelState extends State { }, ) ], - cancelButton: CupertinoActionSheetAction( + cancelButton: PolkawalletActionSheetAction( onPressed: () { Navigator.pop(context); }, diff --git a/lib/pages/staking/validators/validatorListFilter.dart b/lib/pages/staking/validators/validatorListFilter.dart index 958318da8..f04663094 100644 --- a/lib/pages/staking/validators/validatorListFilter.dart +++ b/lib/pages/staking/validators/validatorListFilter.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:polkawallet_plugin_kusama/utils/i18n/index.dart'; import 'package:polkawallet_sdk/utils/i18n.dart'; +import 'package:polkawallet_ui/components/v3/dialog.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginIconButton.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginInputItem.dart'; import 'package:polkawallet_ui/components/v3/plugin/pluginOutlinedButtonSmall.dart'; @@ -27,9 +28,9 @@ class ValidatorListFilter extends StatelessWidget { final dic = I18n.of(context)!.getDic(i18n_full_dic_kusama, 'common'); showCupertinoModalPopup( context: context, - builder: (BuildContext context) => CupertinoActionSheet( + builder: (BuildContext context) => PolkawalletActionSheet( actions: ValidatorSortOptions.values - .map((i) => CupertinoActionSheetAction( + .map((i) => PolkawalletActionSheetAction( child: Text(dicStaking![i.toString().split('.')[1]] ?? ''), onPressed: () { Navigator.of(context).pop(); @@ -39,7 +40,7 @@ class ValidatorListFilter extends StatelessWidget { }, )) .toList(), - cancelButton: CupertinoActionSheetAction( + cancelButton: PolkawalletActionSheetAction( child: Text(dic!['cancel']!), onPressed: () { Navigator.pop(context); diff --git a/lib/pages/stakingNew/stakingView.dart b/lib/pages/stakingNew/stakingView.dart index 13082939a..c6b8d648c 100644 --- a/lib/pages/stakingNew/stakingView.dart +++ b/lib/pages/stakingNew/stakingView.dart @@ -504,10 +504,10 @@ class _StakingViewState extends State { showCupertinoModalPopup( context: context, builder: (BuildContext context) => - CupertinoActionSheet( + PolkawalletActionSheet( actions: [ /// disable bondExtra button if account is not stash - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text( dic['action.bondExtra']!, style: TextStyle( @@ -528,7 +528,7 @@ class _StakingViewState extends State { ), /// disable unbond button if account is not controller - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text( dic['action.unbond']!, style: TextStyle( @@ -549,7 +549,7 @@ class _StakingViewState extends State { ), // redeem unlocked - CupertinoActionSheetAction( + PolkawalletActionSheetAction( child: Text( dic['action.redeem']!, style: TextStyle( @@ -571,7 +571,7 @@ class _StakingViewState extends State { }, ), ], - cancelButton: CupertinoActionSheetAction( + cancelButton: PolkawalletActionSheetAction( child: Text(I18n.of(context)!.getDic( i18n_full_dic_kusama, 'common')!['cancel']!), diff --git a/pubspec.lock b/pubspec.lock index 734fd8ecc..26d8466e5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,13 +29,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.8.2" - auth_header: + bip32: dependency: transitive description: - name: auth_header + name: bip32 url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "2.0.0" + bip39: + dependency: transitive + description: + name: bip39 + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.6" boolean_selector: dependency: transitive description: @@ -43,6 +50,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + bs58check: + dependency: transitive + description: + name: bs58check + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" build: dependency: transitive description: @@ -190,6 +204,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" + decimal: + dependency: transitive + description: + name: decimal + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" dropdown_search: dependency: transitive description: @@ -204,6 +225,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.3" + ethers: + dependency: transitive + description: + name: ethers + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+3" fake_async: dependency: transitive description: @@ -352,6 +380,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + hex: + dependency: transitive + description: + name: hex + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" http: dependency: "direct main" description: @@ -373,13 +408,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" - http_server: - dependency: transitive - description: - name: http_server - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" image_picker: dependency: transitive description: @@ -415,27 +443,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" - jaguar: - dependency: transitive - description: - name: jaguar - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.3" - jaguar_common: - dependency: transitive - description: - name: jaguar_common - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - jaguar_flutter_asset: - dependency: transitive - description: - name: jaguar_flutter_asset - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" js: dependency: transitive description: @@ -450,6 +457,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.1.0" + json_rpc_2: + dependency: transitive + description: + name: json_rpc_2 + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" json_serializable: dependency: "direct dev" description: @@ -569,13 +583,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.3" - path_tree: - dependency: transitive - description: - name: path_tree - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" pedantic: dependency: transitive description: @@ -618,19 +625,26 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.2" - polkawallet_sdk: - dependency: "direct main" + pointycastle: + dependency: transitive description: - name: polkawallet_sdk + name: pointycastle url: "https://pub.dartlang.org" source: hosted + version: "3.6.0" + polkawallet_sdk: + dependency: "direct main" + description: + path: "../sdk" + relative: true + source: path version: "0.4.8" polkawallet_ui: dependency: "direct main" description: - name: polkawallet_ui - url: "https://pub.dartlang.org" - source: hosted + path: "../ui" + relative: true + source: path version: "0.4.8" pool: dependency: transitive @@ -674,6 +688,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" + rational: + dependency: transitive + description: + name: rational + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" scrollable_positioned_list: dependency: transitive description: @@ -681,6 +702,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.3" + share_plus: + dependency: transitive + description: + name: share_plus + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.9" + share_plus_linux: + dependency: transitive + description: + name: share_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_macos: + dependency: transitive + description: + name: share_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.3" + share_plus_web: + dependency: transitive + description: + name: share_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + share_plus_windows: + dependency: transitive + description: + name: share_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" shared_preferences: dependency: transitive description: @@ -882,6 +945,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.2" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" vector_math: dependency: transitive description: @@ -896,6 +966,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" + web3dart: + dependency: transitive + description: + name: web3dart + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.5" web_socket_channel: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d48506b23..ba082d2c1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,11 +30,11 @@ dev_dependencies: flutter_test: sdk: flutter -#dependency_overrides: -# polkawallet_ui: -# path: ../ui -# polkawallet_sdk: -# path: ../sdk +dependency_overrides: + polkawallet_ui: + path: ../ui + polkawallet_sdk: + path: ../sdk # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec From 19c9c155cf673aaa21c92b1c7912e8632dfaf8be Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Mon, 27 Jun 2022 14:52:15 +0800 Subject: [PATCH 06/14] ui update --- lib/pages/governanceNew/councilPage.dart | 5 +++-- lib/pages/staking/actions/nominateForm.dart | 2 +- lib/pages/staking/actions/setControllerPage.dart | 4 ++-- lib/pages/staking/actions/setPayeePage.dart | 2 +- lib/pages/stakingNew/stakingView.dart | 6 +++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/pages/governanceNew/councilPage.dart b/lib/pages/governanceNew/councilPage.dart index 4f3189b69..9434d3c21 100644 --- a/lib/pages/governanceNew/councilPage.dart +++ b/lib/pages/governanceNew/councilPage.dart @@ -73,13 +73,14 @@ class _CouncilPageState extends State { content: Text(I18n.of(context)! .getDic(i18n_full_dic_kusama, 'gov')!['vote.remove.confirm']!), actions: [ - CupertinoButton( + PolkawalletActionSheetAction( child: Text(dic!['cancel']!), onPressed: () { Navigator.of(context).pop(); }, ), - CupertinoButton( + PolkawalletActionSheetAction( + isDefaultAction: true, child: Text(dic['ok']!), onPressed: () { Navigator.of(context).pop(); diff --git a/lib/pages/staking/actions/nominateForm.dart b/lib/pages/staking/actions/nominateForm.dart index e1fa00b22..8f2e77909 100644 --- a/lib/pages/staking/actions/nominateForm.dart +++ b/lib/pages/staking/actions/nominateForm.dart @@ -174,7 +174,7 @@ class _NominateFormState extends State { content: Text( '${dicStaking['nominate.max']} $maxNomination'), actions: [ - CupertinoButton( + PolkawalletActionSheetAction( child: Text(I18n.of(context)!.getDic( i18n_full_dic_kusama, 'common')!['ok']!), onPressed: () { diff --git a/lib/pages/staking/actions/setControllerPage.dart b/lib/pages/staking/actions/setControllerPage.dart index a64814bfb..4e55ac342 100644 --- a/lib/pages/staking/actions/setControllerPage.dart +++ b/lib/pages/staking/actions/setControllerPage.dart @@ -100,7 +100,7 @@ class _SetControllerPageState extends State { type: DialogType.warn, content: Text(dic['v3.controllerError']!), actions: [ - CupertinoDialogAction( + PolkawalletActionSheetAction( child: Text(dic['v3.iUnderstand']!), onPressed: () => Navigator.of(context).pop(), ), @@ -122,7 +122,7 @@ class _SetControllerPageState extends State { title: Container(), content: Text(dic['controller.warn']!), actions: [ - CupertinoButton( + PolkawalletActionSheetAction( child: Text(I18n.of(context)!.getDic( i18n_full_dic_kusama, 'common')!['ok']!), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/staking/actions/setPayeePage.dart b/lib/pages/staking/actions/setPayeePage.dart index 1f0ff27b1..63e2908ee 100644 --- a/lib/pages/staking/actions/setPayeePage.dart +++ b/lib/pages/staking/actions/setPayeePage.dart @@ -58,7 +58,7 @@ class _SetPayeePageState extends State { title: Container(), content: Text('${dic!['reward.warn']}'), actions: [ - CupertinoButton( + PolkawalletActionSheetAction( child: Text(I18n.of(context)! .getDic(i18n_full_dic_kusama, 'common')!['ok']!), onPressed: () => Navigator.of(context).pop(), diff --git a/lib/pages/stakingNew/stakingView.dart b/lib/pages/stakingNew/stakingView.dart index c6b8d648c..bc16e4d90 100644 --- a/lib/pages/stakingNew/stakingView.dart +++ b/lib/pages/stakingNew/stakingView.dart @@ -604,7 +604,7 @@ class _StakingViewState extends State { type: DialogType.warn, content: Text(dic['v3.stashError']!), actions: [ - CupertinoDialogAction( + PolkawalletActionSheetAction( child: Text(dic['v3.iUnderstand']!), onPressed: () => @@ -699,7 +699,7 @@ class _StakingViewState extends State { content: Text( dic['v3.stashError']!), actions: [ - CupertinoDialogAction( + PolkawalletActionSheetAction( child: Text(dic[ 'v3.iUnderstand']!), onPressed: () => @@ -770,7 +770,7 @@ class _StakingViewState extends State { type: DialogType.warn, content: Text(dic['v3.stashError']!), actions: [ - CupertinoDialogAction( + PolkawalletActionSheetAction( child: Text(dic['v3.iUnderstand']!), onPressed: () => Navigator.of(context).pop(), ), From 5828f56ce6e1f516e5c582eacf84a69480a5b637 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Mon, 27 Jun 2022 18:20:42 +0800 Subject: [PATCH 07/14] ui update --- lib/pages/governanceNew/governancePage.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index 3338716a8..3e1a9f5de 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -519,8 +519,11 @@ class _GovernancePageState extends State { onTap: () => Navigator.of(context).pushNamed( DAppWrapperPage.route, - arguments: - 'https://${widget.plugin.basic.name}.polkassembly.io/', + arguments: { + "url": + 'https://${widget.plugin.basic.name}.polkassembly.io/', + "isPlugin": true + }, ), ), ], From fc553a4ec8717fcd11bffcbbb1f21b379fe82cda Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Fri, 1 Jul 2022 15:04:02 +0800 Subject: [PATCH 08/14] ui update --- lib/pages/governanceNew/governancePage.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index 3e1a9f5de..c3ff0be08 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -270,7 +270,7 @@ class _GovernancePageState extends State { child: Swiper( itemCount: locks.length, itemWidth: double.infinity, - loop: locks.length == 1 ? false : true, + loop: false, itemBuilder: (BuildContext context, int index) { var unlockAt = locks[index]['unlockAt']; final int blockDuration = BigInt.parse(widget.plugin From 04eab1e97eba3befcc02bf32dc117ef178adbff8 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Tue, 19 Jul 2022 18:44:02 +0800 Subject: [PATCH 09/14] fix dark theme bug --- lib/pages/governanceNew/governancePage.dart | 2 ++ lib/pages/governanceNew/treasuryPage.dart | 2 ++ lib/pages/parasNew/parasPage.dart | 2 ++ lib/pages/staking/validators/validatorChartsPage.dart | 9 ++++++--- lib/pages/stakingNew/stakingPage.dart | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index c3ff0be08..d62c4388e 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -467,6 +467,8 @@ class _GovernancePageState extends State { return RefreshIndicator( key: _refreshKey, onRefresh: _freshData, + color: Colors.black, + backgroundColor: Colors.white, child: ListView.builder( physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(vertical: 16), diff --git a/lib/pages/governanceNew/treasuryPage.dart b/lib/pages/governanceNew/treasuryPage.dart index 741defab2..583d48730 100644 --- a/lib/pages/governanceNew/treasuryPage.dart +++ b/lib/pages/governanceNew/treasuryPage.dart @@ -122,6 +122,8 @@ class _TreasuryPageState extends State { return RefreshIndicator( key: _refreshKey, + color: Colors.black, + backgroundColor: Colors.white, child: ListView.builder( padding: EdgeInsets.symmetric(horizontal: 16), // itemCount: (_tab == 0 ? proposals.length : tips.length) + 1, diff --git a/lib/pages/parasNew/parasPage.dart b/lib/pages/parasNew/parasPage.dart index a0051b7e5..ecda59827 100644 --- a/lib/pages/parasNew/parasPage.dart +++ b/lib/pages/parasNew/parasPage.dart @@ -133,6 +133,8 @@ class _ParasPageState extends State { ? RefreshIndicator( key: _refreshKey, onRefresh: _getCrowdLoans, + color: Colors.black, + backgroundColor: Colors.white, child: Observer( builder: (_) { final auction = widget.plugin.store.paras.auctionData; diff --git a/lib/pages/staking/validators/validatorChartsPage.dart b/lib/pages/staking/validators/validatorChartsPage.dart index 923e9ea5b..d59eef22b 100644 --- a/lib/pages/staking/validators/validatorChartsPage.dart +++ b/lib/pages/staking/validators/validatorChartsPage.dart @@ -83,7 +83,8 @@ class ValidatorChartsPage extends StatelessWidget { padding: EdgeInsets.all(8), margin: EdgeInsets.only(bottom: 16), child: rewardsChartData == null - ? CupertinoActivityIndicator() + ? CupertinoActivityIndicator( + color: const Color(0xFF3C3C44)) : RewardsChart.withData( pointsChartLines, rewardsChartData['points'][0], @@ -116,7 +117,8 @@ class ValidatorChartsPage extends StatelessWidget { padding: EdgeInsets.all(8), margin: EdgeInsets.only(bottom: 16), child: rewardsChartData == null - ? CupertinoActivityIndicator() + ? CupertinoActivityIndicator( + color: const Color(0xFF3C3C44)) : RewardsChart.withData( rewardChartLines, rewardsChartData['rewards'][0], @@ -145,7 +147,8 @@ class ValidatorChartsPage extends StatelessWidget { padding: EdgeInsets.all(8), margin: EdgeInsets.only(bottom: 16), child: rewardsChartData == null - ? CupertinoActivityIndicator() + ? CupertinoActivityIndicator( + color: const Color(0xFF3C3C44)) : RewardsChart.withData( stakesChartLines, List.from([ diff --git a/lib/pages/stakingNew/stakingPage.dart b/lib/pages/stakingNew/stakingPage.dart index 791b788de..a9b6493f6 100644 --- a/lib/pages/stakingNew/stakingPage.dart +++ b/lib/pages/stakingNew/stakingPage.dart @@ -46,7 +46,7 @@ class _StakingPageState extends State { icon: Icon( Icons.history, size: 22, - color: Color(0xFF17161F), + color: Colors.white, ), ), ), From dd0aa585ef21c0d9f0debb3d7816a1c4dbff8d83 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Tue, 19 Jul 2022 18:52:54 +0800 Subject: [PATCH 10/14] ui update --- lib/pages/governanceNew/governancePage.dart | 2 +- lib/pages/governanceNew/treasuryPage.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/governanceNew/governancePage.dart b/lib/pages/governanceNew/governancePage.dart index d62c4388e..ca844b10c 100644 --- a/lib/pages/governanceNew/governancePage.dart +++ b/lib/pages/governanceNew/governancePage.dart @@ -481,7 +481,7 @@ class _GovernancePageState extends State { padding: EdgeInsets.symmetric(horizontal: 16), child: StickyHeader( header: Container( - color: Colors.transparent, + color: const Color(0xFF212224), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/pages/governanceNew/treasuryPage.dart b/lib/pages/governanceNew/treasuryPage.dart index 583d48730..58f1c766e 100644 --- a/lib/pages/governanceNew/treasuryPage.dart +++ b/lib/pages/governanceNew/treasuryPage.dart @@ -188,7 +188,7 @@ class _TreasuryPageState extends State { 0 ? Padding( padding: EdgeInsets.only(left: 13), - child: Divider(), + child: Divider(height: 1), ) : Container(), itemCount: _tab == 0 From e25c58c1c30a679d8a56c81168b1b0dd2d3edbb0 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Wed, 20 Jul 2022 18:48:07 +0800 Subject: [PATCH 11/14] fix ui bug --- example/lib/pages/profileContent.dart | 4 +++- lib/pages/governanceNew/referendumVotePage.dart | 4 +++- lib/pages/staking/actions/payoutPage.dart | 4 +++- lib/pages/staking/actions/setPayeePage.dart | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/example/lib/pages/profileContent.dart b/example/lib/pages/profileContent.dart index 93ea3d3a4..ee3cf7d15 100644 --- a/example/lib/pages/profileContent.dart +++ b/example/lib/pages/profileContent.dart @@ -66,7 +66,9 @@ class _ProfileContentState extends State { initialItem: _langOptions.indexOf(langCurrent)), children: _langOptions.map((i) { return Padding( - padding: EdgeInsets.all(16), child: Text(_getLang(i))); + padding: EdgeInsets.all(16), + child: + Text(_getLang(i), style: TextStyle(color: Colors.black))); }).toList(), onSelectedItemChanged: (v) { setState(() { diff --git a/lib/pages/governanceNew/referendumVotePage.dart b/lib/pages/governanceNew/referendumVotePage.dart index cfe8f0cd9..701f79a5c 100644 --- a/lib/pages/governanceNew/referendumVotePage.dart +++ b/lib/pages/governanceNew/referendumVotePage.dart @@ -121,7 +121,9 @@ class _ReferendumVoteState extends State { padding: EdgeInsets.all(16), child: Text( _getConvictionLabel(i)!, - style: TextStyle(fontSize: UI.getTextSize(16, context)), + style: TextStyle( + fontSize: UI.getTextSize(16, context), + color: Colors.black), )); }).toList(), onSelectedItemChanged: (v) { diff --git a/lib/pages/staking/actions/payoutPage.dart b/lib/pages/staking/actions/payoutPage.dart index f3feea677..68d69d59a 100644 --- a/lib/pages/staking/actions/payoutPage.dart +++ b/lib/pages/staking/actions/payoutPage.dart @@ -79,7 +79,9 @@ class _PayoutPageState extends State { padding: EdgeInsets.all(16), child: Text( _getEraText(i), - style: TextStyle(fontSize: UI.getTextSize(16, context)), + style: TextStyle( + fontSize: UI.getTextSize(16, context), + color: Colors.black), ), ); }).toList(), diff --git a/lib/pages/staking/actions/setPayeePage.dart b/lib/pages/staking/actions/setPayeePage.dart index 63e2908ee..4db7d03b8 100644 --- a/lib/pages/staking/actions/setPayeePage.dart +++ b/lib/pages/staking/actions/setPayeePage.dart @@ -231,7 +231,8 @@ class _PayeeSelectorState extends State { child: Text( i!, style: TextStyle( - fontSize: UI.getTextSize(14, context)), + fontSize: UI.getTextSize(14, context), + color: Colors.black), ), )) .toList(), From a1e7d8d0b395f79b142fb0759d3f51ac996f9dd6 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Thu, 21 Jul 2022 11:37:42 +0800 Subject: [PATCH 12/14] ui update --- lib/pages/stakingNew/stakingView.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/stakingNew/stakingView.dart b/lib/pages/stakingNew/stakingView.dart index bc16e4d90..ee637b3b9 100644 --- a/lib/pages/stakingNew/stakingView.dart +++ b/lib/pages/stakingNew/stakingView.dart @@ -88,7 +88,7 @@ class _StakingViewState extends State { Theme.of(context).textTheme.headline5?.copyWith(color: Colors.white); final Color actionButtonColor = Color(0xFF007AFE); - final Color disabledColor = Theme.of(context).unselectedWidgetColor; + final Color disabledColor = Color(0xFF858380); return Observer(builder: (_) { final isDataLoading = widget.plugin.store.staking.marketPrices.length == 0; From 988c302128902f59c172e51136c37e7febb35bb5 Mon Sep 17 00:00:00 2001 From: dingzuhua Date: Fri, 29 Jul 2022 11:16:48 +0800 Subject: [PATCH 13/14] ui update --- lib/pages/governanceNew/treasuryPage.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pages/governanceNew/treasuryPage.dart b/lib/pages/governanceNew/treasuryPage.dart index 58f1c766e..5990f0d53 100644 --- a/lib/pages/governanceNew/treasuryPage.dart +++ b/lib/pages/governanceNew/treasuryPage.dart @@ -489,10 +489,11 @@ class _ProgressBar extends StatelessWidget { AnimationCircularProgressBar( progress: progress, width: 10, - lineColor: [Color(0x4DFFFFFF), Color(0xFF81FEB9)], + bgWidth: 7, + lineColor: [Color(0xFF60FFA7), Color(0xFF60FFA7)], size: 96, startAngle: pi * 3 / 2, - bgColor: Colors.white.withAlpha(38)), + bgColor: const Color(0x4cFFFFFF)), Text( Fmt.ratio(progress), style: Theme.of(context) From c97bccd7db6c5775720a359b6207bd155cb260f8 Mon Sep 17 00:00:00 2001 From: shawn Date: Mon, 8 Aug 2022 17:37:33 +0800 Subject: [PATCH 14/14] release 0.4.9 --- CHANGELOG.md | 5 +++++ pubspec.yaml | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbdd9e75a..c4ec900ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [0.4.9] - 20220808. + +* bump polkawallet_sdk: 0.4.9. +* ui update & bug fix. + ## [0.4.8] - 20220621. * bump polkawallet_sdk: 0.4.8. diff --git a/pubspec.yaml b/pubspec.yaml index ba082d2c1..188f676a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: polkawallet_plugin_kusama description: The kusama/polkadot network flutter plugin for polkawallet app. -version: 0.4.8 +version: 0.4.9 homepage: environment: @@ -17,8 +17,8 @@ dependencies: flutter_svg: ^1.0.3 get_storage: ^2.0.3 json_annotation: ^4.0.1 - polkawallet_sdk: ^0.4.8 - polkawallet_ui: ^0.4.8 + polkawallet_sdk: ^0.4.9 + polkawallet_ui: ^0.4.9 fl_chart: ^0.40.2 sticky_headers: ^0.2.0 flutter_swiper: ^1.1.6