diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 69b1526a378a02d6c72997d1b020733e93f4bcc5..dde1e8ec904d79c3d4d1d3a8aedab40ab5f8df8d 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -359,7 +359,7 @@ "COMPUTING_PUBKEY": "Computing...", "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.", "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", - "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", + "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?", "MSG_UID_ALREADY_USED": "This pseudonym is already used by an existing member.<br/>Please choose another one.", "MSG_PUBKEY_ALREADY_USED": "Public key already used by an existing member.<br/>Please choose other connection parameters." }, diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 81c8517ad9316703c8b6c22cc190f7f6d01e71a2..081955fc4d1feffbde911d6dc4400aa00e37ed33 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -359,7 +359,7 @@ "COMPUTING_PUBKEY": "Computing...", "LAST_SLIDE_CONGRATULATION": "You completed all required fields.<br/><b>You can send the account creation request</b>.<br/><br/>For information, the public key below identifies your future account.<br/>It can be communicated to third parties to receive their payment.<br/>Once your account has been approved, you can find this key under <b>{{'ACCOUNT.TITLE'|translate}}</b>.", "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Warning:</b> your secret identifier, password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", - "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to send this account creation request?", + "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Warning:</b> your password and pseudonym can not be changed.<br/><b>Make sure you always remember it!</b><br/><b>Are you sure</b> you want to continue?", "MSG_UID_ALREADY_USED": "This pseudonym is already used by an existing member.<br/>Please choose another one.", "MSG_PUBKEY_ALREADY_USED": "Public key already used by an existing member.<br/>Please choose other connection parameters." }, diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 07a2fb2aef734544ffdcef7c40e0014ebb0a8156..bc51b2c17b9c2747fd8d7c6211ca2402bd965936 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -358,8 +358,8 @@ "SLIDE_6_TITLE": "Confirmation :", "COMPUTING_PUBKEY": "Calcul en cours...", "LAST_SLIDE_CONGRATULATION": "<b>Bravo !</b> Vous avez saisi toutes les informations nécessaires.<br/><b>Vous pouvez envoyer la demande</b> de création de compte.</b><br/><br/>Pour information, la clé publique ci-dessous identifiera votre futur compte.<br/>Elle pourra être communiquée à des tiers pour recevoir leur paiement.<br/>Cependant, <b>il n'est pas utile</b> de la noter ici.", - "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos identifiant secret, mot de passe et pseudonyme ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", - "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> vos identifiant secret et mot de passe ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", + "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> l'identifiant secret, le mot de passe et le pseudonyme ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir envoyer cette demande d'inscription ?", + "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Avertissement :</b> l'identifiant secret et le mot de passe ne pourront plus être modifiés.<br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir continuer avec ces identifiants ?", "MSG_UID_ALREADY_USED": "Pseudonyme déjà utilisé par quelqu'un d'autre.<br/>Veuillez en choisir un autre.", "MSG_PUBKEY_ALREADY_USED": "Clé publique déjà utilisée par quelqu'un d'autre.<br/>Veuillez choisir d'autres identifiants de connexion." }, diff --git a/www/js/controllers/join-controllers.js b/www/js/controllers/join-controllers.js index 46f5fc06e2581cddcf9a6eb4a5301fa7d6954135..ec1c7ca49c61ec6225763803990113a6572d1c19 100644 --- a/www/js/controllers/join-controllers.js +++ b/www/js/controllers/join-controllers.js @@ -36,7 +36,7 @@ function JoinController($timeout, Modals) { } -function JoinModalController($scope, $state, UIUtils, CryptoUtils, Modals, csWallet, csCurrency, BMA) { +function JoinModalController($scope, $state, UIUtils, CryptoUtils, csSettings, Modals, csWallet, csCurrency, BMA) { 'ngInject'; $scope.formData = { @@ -133,8 +133,6 @@ function JoinModalController($scope, $state, UIUtils, CryptoUtils, Modals, csWa } } } - - }; $scope.doNewAccount = function(confirm) { @@ -163,6 +161,9 @@ function JoinModalController($scope, $state, UIUtils, CryptoUtils, Modals, csWa csWallet.login($scope.formData.username, $scope.formData.password) .then(function() { if (!$scope.formData.isMember) { + $scope.closeModal(); + csSettings.data.wallet = csSettings.data.wallet || {}; + csSettings.data.wallet.alertIfUnusedWallet = false; // do not alert if empty // Redirect to wallet $state.go('app.view_wallet'); return; diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index 0b12841593abec743420a2f1936a5ce248448fbc..c9ae2f44b42b8f4db1f6a01fef6df4f33d22fa2e 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -638,7 +638,7 @@ function WalletTxErrorController($scope, UIUtils, csWallet) { } -function WalletSecurityModalController($scope, $rootScope, UIUtils, csWallet, $translate, CryptoUtils, $timeout){ +function WalletSecurityModalController($scope, $rootScope, UIUtils, csWallet, $translate, CryptoUtils){ $scope.slides = { slider: null, @@ -656,6 +656,8 @@ function WalletSecurityModalController($scope, $rootScope, UIUtils, csWallet, $t $scope.isValidFile = false; $scope.isLogin = csWallet.isLogin(); + $scope.hasSelf = csWallet.hasSelf(); + $scope.formData = { addQuestion: '', level: '4', diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index b3a10d2e8fb05d5468222340620a72aec0cf856e..602aa1d31af433f37e826f0622a22e29c29a4f62 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -203,6 +203,10 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser return !!data.pubkey; }, + hasSelf = function() { + return !!data.pubkey && data.requirements && !data.requirements.needSelf; + }, + isNeverUsed = function() { if (!data.loaded) return undefined; // undefined if not full loaded return !data.pubkey || @@ -1739,6 +1743,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser login: login, logout: logout, isLogin: isLogin, + hasSelf: hasSelf, isNeverUsed: isNeverUsed, isUserPubkey: isUserPubkey, getData: getData, diff --git a/www/templates/wallet/slides/slides_revocation_1.html b/www/templates/wallet/slides/slides_revocation_1.html index e6d72fe152c2bf2f0bf3225d5021f5a577440387..8d76ac730b4a12fe46d95df78f0ae2fdbec5f8b5 100644 --- a/www/templates/wallet/slides/slides_revocation_1.html +++ b/www/templates/wallet/slides/slides_revocation_1.html @@ -3,7 +3,7 @@ <h3 translate>ACCOUNT.SECURITY.REVOCATION</h3> <div class="list"> <div class="item card item-icon-right stable-bg padding ink dark" - ng-click="downloadRevokeFile()" ng-if="isLogin"> + ng-click="downloadRevokeFile()" ng-if="isLogin && hasSelf"> <i class="icon ion-android-archive"></i> <span ng-bind-html="'ACCOUNT.SECURITY.DOWNLOAD_REVOKE' | translate"></span> </div> @@ -13,7 +13,7 @@ <span ng-bind-html="'ACCOUNT.SECURITY.REVOKE_WITH_FILE' | translate"></span> </div> <div class="item card item-icon-right stable-bg padding ink dark" - ng-click="revokeIdentity()" ng-if="isLogin"> + ng-click="revokeIdentity()" ng-if="isLogin && hasSelf"> <i class="icon ion-minus-circled assertive"></i> <span ng-bind-html="'ACCOUNT.SECURITY.DEFINITELY_REVOKE' | translate"></span> </div>