Merge branch 'dev' into 'master'
MR: fix bad widget ancestor when popUntil at the end of onboarding + UX: improve certification popup See merge request clients/gecko!45
This commit is contained in:
commit
44c8cfb9bc
|
@ -71,7 +71,8 @@
|
||||||
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
||||||
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
||||||
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
||||||
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
|
"areYouSureYouWantToCertify1": "Are you sure you want to certify the identity :",
|
||||||
|
"areYouSureYouWantToCertify2": "having the address :",
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
||||||
|
@ -156,7 +157,7 @@
|
||||||
"hours": "{} hours {}",
|
"hours": "{} hours {}",
|
||||||
"days": "{} days",
|
"days": "{} days",
|
||||||
"months": "{} months",
|
"months": "{} months",
|
||||||
"certify": "Certify",
|
"certify": "Certify this\nidentity",
|
||||||
"from": "From:",
|
"from": "From:",
|
||||||
"to": "To:",
|
"to": "To:",
|
||||||
"amount": "Amount:",
|
"amount": "Amount:",
|
||||||
|
@ -199,5 +200,6 @@
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
||||||
"received": "Received",
|
"received": "Received",
|
||||||
"sent": "Sent"
|
"sent": "Sent",
|
||||||
|
"createIdentity": "Create a new \nidentity"
|
||||||
}
|
}
|
|
@ -72,6 +72,8 @@
|
||||||
"areYouSureForgetAllChests": "¿Seguro de que quieres olvidar todos tus cofres?",
|
"areYouSureForgetAllChests": "¿Seguro de que quieres olvidar todos tus cofres?",
|
||||||
"areYouSureToForgetWallet": "¿Seguro de que quieres olvidar el monedero \"{}\"?",
|
"areYouSureToForgetWallet": "¿Seguro de que quieres olvidar el monedero \"{}\"?",
|
||||||
"areYouSureYouWantToCertify": "¿Seguro de que quiere certificar a la dirección\n\n{}?",
|
"areYouSureYouWantToCertify": "¿Seguro de que quiere certificar a la dirección\n\n{}?",
|
||||||
|
"areYouSureYouWantToCertify1": "¿Seguro de que quiere certificar a la identidad :",
|
||||||
|
"areYouSureYouWantToCertify2": " a la dirección :",
|
||||||
"yes": "Sí",
|
"yes": "Sí",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"keepYourMnemonicSecret": "Intenta mantener esta frase de restauración en secreto, ya que permite a cualquiera que la conozca acceder a todas tus monederos.",
|
"keepYourMnemonicSecret": "Intenta mantener esta frase de restauración en secreto, ya que permite a cualquiera que la conozca acceder a todas tus monederos.",
|
||||||
|
@ -156,7 +158,7 @@
|
||||||
"hours": "{} horas {}",
|
"hours": "{} horas {}",
|
||||||
"days": "{} dias",
|
"days": "{} dias",
|
||||||
"months": "{} meses",
|
"months": "{} meses",
|
||||||
"certify": "Certificar",
|
"certify": "Certificar esta\nidentidad",
|
||||||
"from": "De:",
|
"from": "De:",
|
||||||
"to": "A:",
|
"to": "A:",
|
||||||
"amount": "Importe:",
|
"amount": "Importe:",
|
||||||
|
@ -199,5 +201,6 @@
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
||||||
"received": "Received",
|
"received": "Received",
|
||||||
"sent": "Sent"
|
"sent": "Sent",
|
||||||
|
"createIdentity": "Create a new \nidentity"
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,8 @@
|
||||||
"areYouSureToDeleteWallet": "Êtes-vous sûr de vouloir supprimer le coffre \"{}\" ?",
|
"areYouSureToDeleteWallet": "Êtes-vous sûr de vouloir supprimer le coffre \"{}\" ?",
|
||||||
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
|
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
|
||||||
"areYouSureToForgetWallet": "Êtes-vous sûr de vouloir oublier le portefeuille \"{}\" ?",
|
"areYouSureToForgetWallet": "Êtes-vous sûr de vouloir oublier le portefeuille \"{}\" ?",
|
||||||
"areYouSureYouWantToCertify": "Êtes-vous certain de vouloir certifier l'adresse:\n\n{}",
|
"areYouSureYouWantToCertify1": "Êtes-vous certain de vouloir certifier l'identité :",
|
||||||
|
"areYouSureYouWantToCertify2": "ayant pour adresse :",
|
||||||
"yes": "Oui",
|
"yes": "Oui",
|
||||||
"no": "Non",
|
"no": "Non",
|
||||||
"keepYourMnemonicSecret": "Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît d’accéder à tous vos portefeuilles.",
|
"keepYourMnemonicSecret": "Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît d’accéder à tous vos portefeuilles.",
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
"hours": "{} heures {}",
|
"hours": "{} heures {}",
|
||||||
"days": "{} jours",
|
"days": "{} jours",
|
||||||
"months": "{} mois",
|
"months": "{} mois",
|
||||||
"certify": "Certifier",
|
"certify": "Certifier cette\nidentité",
|
||||||
"from": "Depuis:",
|
"from": "Depuis:",
|
||||||
"to": "Vers:",
|
"to": "Vers:",
|
||||||
"amount": "Montant:",
|
"amount": "Montant:",
|
||||||
|
@ -200,5 +201,6 @@
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "Cette phrase secrète viens d'être copié dans votre presse-papier.",
|
"thisMnemonicHasBeenCopiedToClipboard": "Cette phrase secrète viens d'être copié dans votre presse-papier.",
|
||||||
"smithCantMigrateIdentity":"Vous ne pouvez pas migrer cette identité\ntant que vous êtes dans la toile forgerons",
|
"smithCantMigrateIdentity":"Vous ne pouvez pas migrer cette identité\ntant que vous êtes dans la toile forgerons",
|
||||||
"received": "Reçus",
|
"received": "Reçus",
|
||||||
"sent": "Envoyés"
|
"sent": "Envoyés",
|
||||||
|
"createIdentity": "Créer sa nouvelle\nidentité"
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,6 +288,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
result.putIfAbsent('certDelay', () => certDelayDuration);
|
result.putIfAbsent('certDelay', () => certDelayDuration);
|
||||||
} else if (toStatus == 'Created') {
|
} else if (toStatus == 'Created') {
|
||||||
result.putIfAbsent('toStatus', () => 1);
|
result.putIfAbsent('toStatus', () => 1);
|
||||||
|
} else if (toStatus == 'noid') {
|
||||||
|
result.putIfAbsent('toStatus', () => 2);
|
||||||
|
result.putIfAbsent('canCert', () => 0);
|
||||||
} else {
|
} else {
|
||||||
result.putIfAbsent('canCert', () => 0);
|
result.putIfAbsent('canCert', () => 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
|
|
||||||
if (indexerEndpoint == '') {
|
if (indexerEndpoint == '') {
|
||||||
Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
Text(
|
Text(
|
||||||
"noNetworkNoHistory".tr(),
|
"noNetworkNoHistory".tr(),
|
||||||
|
|
|
@ -27,6 +27,8 @@ class CertificationsScreen extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Accordion(
|
child: Accordion(
|
||||||
|
paddingListTop: 10,
|
||||||
|
paddingListBottom: 10,
|
||||||
maxOpenSections: 1,
|
maxOpenSections: 1,
|
||||||
headerBackgroundColorOpened: orangeC,
|
headerBackgroundColorOpened: orangeC,
|
||||||
scaleWhenAnimating: true,
|
scaleWhenAnimating: true,
|
||||||
|
|
|
@ -279,6 +279,92 @@ Future<bool?> confirmPopup(BuildContext context, String title) async {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool?> confirmPopupCertification(BuildContext context, String question1,
|
||||||
|
String username, String question2, String address) async {
|
||||||
|
return showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: true,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
// actionsPadding: const EdgeInsets.all(0.0),
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
content: SizedBox(
|
||||||
|
height: 240,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
question1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
username,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 24, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
question2,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
address,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
const Text(
|
||||||
|
'?',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
TextButton(
|
||||||
|
key: keyConfirm,
|
||||||
|
child: Text(
|
||||||
|
"yes".tr(),
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: Color(0xffD80000),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, true);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(width: 35),
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
"no".tr(),
|
||||||
|
style: const TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 120)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> infoPopup(BuildContext context, String title) async {
|
Future<void> infoPopup(BuildContext context, String title) async {
|
||||||
return showDialog<void>(
|
return showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
@ -58,24 +58,8 @@ Widget finishButton(BuildContext context) {
|
||||||
backgroundColor: orangeC, // foreground
|
backgroundColor: orangeC, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
//TODO: fix bad widget ancestor when pupUntil (multi_chest test failed)
|
|
||||||
|
|
||||||
// Navigator.popUntil(homeContext, ModalRoute.withName('/'));
|
|
||||||
// Navigator.of(homeContext, rootNavigator: true)
|
|
||||||
// .popUntil(ModalRoute.withName('/'));
|
|
||||||
// while (Navigator.of(homeContext).canPop()) {
|
|
||||||
// Navigator.of(homeContext).pop();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Navigator.pushNamed(homeContext, '/mywallets');
|
|
||||||
|
|
||||||
// final tmpConext = homeContext;
|
|
||||||
// Navigator.pushNamedAndRemoveUntil(
|
|
||||||
// context, '/mywallets', (route) => route.isFirst);
|
|
||||||
// .then((value) => homeContext = tmpConext);
|
|
||||||
|
|
||||||
Navigator.pushNamedAndRemoveUntil(
|
Navigator.pushNamedAndRemoveUntil(
|
||||||
homeContext, '/mywallets', ModalRoute.withName('/'));
|
context, '/mywallets', ModalRoute.withName('/'));
|
||||||
},
|
},
|
||||||
child: Text("accessMyChest".tr(),
|
child: Text("accessMyChest".tr(),
|
||||||
style:
|
style:
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/g1_wallets_list.dart';
|
import 'package:gecko/models/g1_wallets_list.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/cesium_plus.dart';
|
import 'package:gecko/providers/cesium_plus.dart';
|
||||||
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
import 'package:gecko/providers/wallet_options.dart';
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
|
@ -108,7 +109,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
HeaderProfile(address: address, username: username),
|
HeaderProfile(address: address, username: username),
|
||||||
SizedBox(height: isTall ? 10 : 0),
|
SizedBox(height: isTall ? 30 : 15),
|
||||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
||||||
Column(children: <Widget>[
|
Column(children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -148,6 +149,8 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
]),
|
]),
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
final duniterIndexer =
|
||||||
|
Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: sub.certState(defaultWallet.address!, address),
|
future: sub.certState(defaultWallet.address!, address),
|
||||||
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
||||||
|
@ -211,12 +214,18 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
'assets/gecko_certify.png')),
|
'assets/gecko_certify.png')),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final bool? result = await confirmPopup(
|
final bool? result =
|
||||||
context,
|
await confirmPopupCertification(
|
||||||
"areYouSureYouWantToCertify".tr(
|
context,
|
||||||
args: [
|
'areYouSureYouWantToCertify1'
|
||||||
getShortPubkey(address)
|
.tr(),
|
||||||
]));
|
duniterIndexer
|
||||||
|
.walletNameIndexer[
|
||||||
|
address] ??
|
||||||
|
"noIdentity".tr(),
|
||||||
|
'areYouSureYouWantToCertify2'
|
||||||
|
.tr(),
|
||||||
|
getShortPubkey(address));
|
||||||
|
|
||||||
if (result ?? false) {
|
if (result ?? false) {
|
||||||
String? pin;
|
String? pin;
|
||||||
|
@ -260,7 +269,9 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 9),
|
const SizedBox(height: 9),
|
||||||
Text(
|
Text(
|
||||||
"certify".tr(),
|
toStatus == 0
|
||||||
|
? "certify".tr()
|
||||||
|
: "createIdentity".tr(),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: buttonFontSize,
|
fontSize: buttonFontSize,
|
||||||
|
|
|
@ -123,14 +123,14 @@ class HeaderProfile extends StatelessWidget {
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
const SizedBox(height: 55),
|
// const SizedBox(height: 55),
|
||||||
]),
|
]),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Column(children: <Widget>[
|
Column(children: <Widget>[
|
||||||
ClipOval(
|
ClipOval(
|
||||||
child: defaultAvatar(avatarSize),
|
child: defaultAvatar(avatarSize),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 25),
|
// const SizedBox(height: 25),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.13+41
|
version: 0.0.13+42
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
Loading…
Reference in New Issue