Skip to content

Commit

Permalink
Merge pull request #12 from polkawallet-io/develop
Browse files Browse the repository at this point in the history
Release 0.4.9
  • Loading branch information
RomeroYang authored Aug 8, 2022
2 parents db4a165 + c97bccd commit c80eca5
Show file tree
Hide file tree
Showing 25 changed files with 317 additions and 143 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion example/lib/pages/profileContent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ class _ProfileContentState extends State<ProfileContent> {
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(() {
Expand Down
70 changes: 56 additions & 14 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions lib/pages/governanceNew/councilPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -67,18 +68,19 @@ class _CouncilPageState extends State<CouncilPage> {
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']!),
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();
Expand Down
15 changes: 11 additions & 4 deletions lib/pages/governanceNew/governancePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -269,7 +270,7 @@ class _GovernancePageState extends State<GovernancePage> {
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
Expand Down Expand Up @@ -451,6 +452,7 @@ class _GovernancePageState extends State<GovernancePage> {
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
Expand All @@ -465,6 +467,8 @@ class _GovernancePageState extends State<GovernancePage> {
return RefreshIndicator(
key: _refreshKey,
onRefresh: _freshData,
color: Colors.black,
backgroundColor: Colors.white,
child: ListView.builder(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.symmetric(vertical: 16),
Expand All @@ -477,7 +481,7 @@ class _GovernancePageState extends State<GovernancePage> {
padding: EdgeInsets.symmetric(horizontal: 16),
child: StickyHeader(
header: Container(
color: Colors.transparent,
color: const Color(0xFF212224),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down Expand Up @@ -517,8 +521,11 @@ class _GovernancePageState extends State<GovernancePage> {
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
},
),
),
],
Expand Down
17 changes: 9 additions & 8 deletions lib/pages/governanceNew/referendumPanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -81,18 +82,18 @@ class _ReferendumPanelState extends State<ReferendumPanel> {
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();
Expand All @@ -101,7 +102,7 @@ class _ReferendumPanelState extends State<ReferendumPanel> {
},
)
],
cancelButton: CupertinoActionSheetAction(
cancelButton: PolkawalletActionSheetAction(
onPressed: () {
Navigator.pop(context);
},
Expand Down Expand Up @@ -195,18 +196,18 @@ class _ReferendumPanelState extends State<ReferendumPanel> {
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();
Expand All @@ -215,7 +216,7 @@ class _ReferendumPanelState extends State<ReferendumPanel> {
},
)
],
cancelButton: CupertinoActionSheetAction(
cancelButton: PolkawalletActionSheetAction(
onPressed: () {
Navigator.pop(context);
},
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/governanceNew/referendumVotePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ class _ReferendumVoteState extends State<ReferendumVotePage> {
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) {
Expand Down
9 changes: 6 additions & 3 deletions lib/pages/governanceNew/treasuryPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ class _TreasuryPageState extends State<TreasuryPage> {

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,
Expand Down Expand Up @@ -186,7 +188,7 @@ class _TreasuryPageState extends State<TreasuryPage> {
0
? Padding(
padding: EdgeInsets.only(left: 13),
child: Divider(),
child: Divider(height: 1),
)
: Container(),
itemCount: _tab == 0
Expand Down Expand Up @@ -487,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)
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/parasNew/crowdLoanList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class _CrowdLoanListItemState extends State<CrowdLoanListItem> {
children: [
Container(
margin: EdgeInsets.only(right: 8),
height: 30,
width: 30,
child: ClipRRect(
borderRadius: BorderRadius.circular(30),
child: Container(
Expand Down
4 changes: 4 additions & 0 deletions lib/pages/parasNew/parasPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -126,11 +127,14 @@ class _ParasPageState extends State<ParasPage> {
appBar: PluginAppBar(
title: Text(I18n.of(context)!
.getDic(i18n_full_dic_kusama, 'common')!['parachain']!),
actions: [PluginAccountInfoAction(widget.keyring)],
),
body: _loaded
? RefreshIndicator(
key: _refreshKey,
onRefresh: _getCrowdLoans,
color: Colors.black,
backgroundColor: Colors.white,
child: Observer(
builder: (_) {
final auction = widget.plugin.store.paras.auctionData;
Expand Down
Loading

0 comments on commit c80eca5

Please sign in to comment.