diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index ade6d11f79abc88ecb6a39c9d5ada890dcfd308d..f4a7da74cd12da0b8ce36eb0a356e5f9dcbb33a5 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -31,6 +31,7 @@ "BTN_ADD": "Add", "BTN_SEARCH": "Search", "BTN_REFRESH": "Refresh", + "BTN_START": "Start", "BTN_CONTINUE": "Continue", "BTN_UNDERSTOOD": "I understood", "BTN_OPTIONS": "Options", @@ -197,17 +198,13 @@ } }, "CURRENCY": { - "SELECT": { - "TITLE": "Currencies", - "CURRENCIES": "Known currencies", - "MEMBERS_COUNT": "{{membersCount}} members" - }, "VIEW": { "TITLE": "Currency", "TAB_CURRENCY": "Currency", "TAB_WOT": "Web of trust", "TAB_NETWORK": "Network", "TAB_BLOCKS": "Blocks", + "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.", "NETWORK_RULES_DIVIDER": "Network rules", "CURRENCY_NAME": "Currency name", "MEMBERS": "Members count", @@ -253,7 +250,7 @@ "VIEW": { "MEDIAN_TIME": "Blockchain time", "LOADING_PEERS": "Loading peers...", - "NODE_ADDRESS": "Node address", + "NODE_ADDRESS": "Peer address", "ENDPOINTS": { "BMAS": "Secure endpoint (SSL)", "BMATOR": "TOR endpoint", @@ -278,7 +275,7 @@ "POPOVER_FILTER_TITLE": "Filter", "OFFLINE": "Offline peers", "VIEW": { - "TITLE": "Node", + "TITLE": "Peer", "OWNER": "Owned by ", "SHOW_RAW_PEERING": "See peering document", "KNOWN_PEERS": "Known peers :", @@ -405,8 +402,13 @@ }, "NEW": { "TITLE": "Registration", - "SLIDE_1_TITLE": "Select a currency:", - "SLIDE_2_TITLE": "Kind of account:", + "INTRO_WARNING_TIME": "Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).", + "INTRO_WARNING_SECURITY": "Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.", + "INTRO_WARNING_SECURITY_HELP": "Up-to-date anti-virus, firewall enabled, session protected by password or pin code...", + "INTRO_HELP": "Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.", + "REGISTRATION_NODE": "Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.", + "REGISTRATION_NODE_HELP": "If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.", + "SELECT_ACCOUNT_TYPE": "Choose the type of account to create:", "MEMBER_ACCOUNT": "Member account", "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).", "WALLET_ACCOUNT": "Simple wallet", @@ -425,8 +427,9 @@ "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 continue?", - "PSEUDO_AVAILABLE": "This nickname is available", - "PSEUDO_NOT_AVAILABLE": "This nickname is not available", + "CHECKING_PSEUDO": "Checking...", + "PSEUDO_AVAILABLE": "This pseudonym is available", + "PSEUDO_NOT_AVAILABLE": "This pseudonym is not available", "INFO_LICENSE": "To be able to adhere to the currency, we ask you to kindly read and accept this license.", "BTN_ACCEPT": "I accept", "BTN_ACCEPT_LICENSE": "I accept the license" @@ -596,7 +599,7 @@ "FIX_IDENTITY": "The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?", "FIX_MEMBERSHIP": "Your application for membership will be sent.<br/></br/><b>Are you sure?</b>", "RENEW_MEMBERSHIP": "Your membership will be renewed.<br/></br/><b>Are you sure?</b>", - "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated nickname <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?", + "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?", "REVOKE_IDENTITY_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?", "NOT_NEED_RENEW_MEMBERSHIP": "Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?", "SAVE_BEFORE_LEAVE": "Do you want to <b>save your changes</b> before leaving the page?", diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 813d4ffdb503906d5051017ab9d4db51ebd7b1dc..979d581f5c724b9e2f6d0d8bc1c4e26aa21690fe 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -31,6 +31,7 @@ "BTN_ADD": "Add", "BTN_SEARCH": "Search", "BTN_REFRESH": "Refresh", + "BTN_START": "Start", "BTN_CONTINUE": "Continue", "BTN_UNDERSTOOD": "I understood", "BTN_OPTIONS": "Options", @@ -197,17 +198,13 @@ } }, "CURRENCY": { - "SELECT": { - "TITLE": "Currencies", - "CURRENCIES": "Known currencies", - "MEMBERS_COUNT": "{{membersCount}} members" - }, "VIEW": { "TITLE": "Currency", "TAB_CURRENCY": "Currency", "TAB_WOT": "Web of trust", "TAB_NETWORK": "Network", "TAB_BLOCKS": "Blocks", + "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} is a <b>libre money</b>, started {{firstBlockTime | formatFromNow}}. It currently counts <b>{{N}} members </b>, who produce and collect a <a ng-click=\"showHelpModal('ud')\">Universal Dividend</a> (DU), each {{dt | formatPeriod}}.", "NETWORK_RULES_DIVIDER": "Network rules", "CURRENCY_NAME": "Currency name", "MEMBERS": "Members count", @@ -253,7 +250,7 @@ "VIEW": { "MEDIAN_TIME": "Blockchain time", "LOADING_PEERS": "Loading peers...", - "NODE_ADDRESS": "Node address", + "NODE_ADDRESS": "Peer address", "ENDPOINTS": { "BMAS": "Secure endpoint (SSL)", "BMATOR": "TOR endpoint", @@ -278,7 +275,7 @@ "POPOVER_FILTER_TITLE": "Filter", "OFFLINE": "Offline peers", "VIEW": { - "TITLE": "Node", + "TITLE": "Peer", "OWNER": "Owned by ", "SHOW_RAW_PEERING": "See peering document", "KNOWN_PEERS": "Known peers :", @@ -405,8 +402,13 @@ }, "NEW": { "TITLE": "Registration", - "SLIDE_1_TITLE": "Select a currency:", - "SLIDE_2_TITLE": "Kind of account:", + "INTRO_WARNING_TIME": "Creating an account on {{name|capitalize}} is very simple. Please take sufficient time to do this correctly (not to forget the usernames, passwords, etc.).", + "INTRO_WARNING_SECURITY": "Check that the hardware you are currently using (computer, tablet, phone) <b>is secure and trustworthy </b>.", + "INTRO_WARNING_SECURITY_HELP": "Up-to-date anti-virus, firewall enabled, session protected by password or pin code...", + "INTRO_HELP": "Click <b> {{'COMMON.BTN_START'|translate}}</b> to begin creating an account. You will be guided step by step.", + "REGISTRATION_NODE": "Your registration will be registered via the Duniter peer <b>{{server}}</b> node, which will then be distributed to the rest of the currency network.", + "REGISTRATION_NODE_HELP": "If you do not trust this peer, please change <a ng-click=\"doQuickFix('settings')\">in the settings</a> of Cesium.", + "SELECT_ACCOUNT_TYPE": "Choose the type of account to create:", "MEMBER_ACCOUNT": "Member account", "MEMBER_ACCOUNT_HELP": "If you are not yet registered as an individual (one account possible per individual).", "WALLET_ACCOUNT": "Simple wallet", @@ -425,8 +427,9 @@ "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 continue?", - "PSEUDO_AVAILABLE": "This nickname is available", - "PSEUDO_NOT_AVAILABLE": "This nickname is not available", + "CHECKING_PSEUDO": "Checking...", + "PSEUDO_AVAILABLE": "This pseudonym is available", + "PSEUDO_NOT_AVAILABLE": "This pseudonym is not available", "INFO_LICENSE": "To be able to adhere to the currency, we ask you to kindly read and accept this license.", "BTN_ACCEPT": "I accept", "BTN_ACCEPT_LICENSE": "I accept the license" @@ -596,7 +599,7 @@ "FIX_IDENTITY": "The pseudonym <b>{{uid}}</b> will be published again, replacing the old publication that has expired.<br/></br/><b>Are you sure</b> you want to continue?", "FIX_MEMBERSHIP": "Your application for membership will be sent.<br/></br/><b>Are you sure?</b>", "RENEW_MEMBERSHIP": "Your membership will be renewed.<br/></br/><b>Are you sure?</b>", - "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated nickname <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?", + "REVOKE_IDENTITY": "You will <b>definitely revoke this identity</b>.<br/><br/>The public key and the associated pseudonym <b>will never be used again</b> (for a member account).<br/></br/><b>Are you sure</b> you want to revoke this identity?", "REVOKE_IDENTITY_2": "This operation is <b>irreversible</b>!<br/><br/>Are you sure you want to <b>revoke this identity</b>?", "NOT_NEED_RENEW_MEMBERSHIP": "Your membership does not need to be renewed (it will only expire in {{membershipExpiresIn|formatDuration}}).<br/></br/><b>Are you sure you</b> want to renew your membership?", "SAVE_BEFORE_LEAVE": "Do you want to <b>save your changes</b> before leaving the page?", diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index a29e26658140c4614d37582e5d970489a9a0dbde..29f30038ca200b50733242faae067282c2e10868 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -31,6 +31,7 @@ "BTN_ADD": "Añadir", "BTN_SEARCH": "Buscar", "BTN_REFRESH": "Actualisar", + "BTN_START": "Empezar", "BTN_CONTINUE": "Continuar", "BTN_UNDERSTOOD": "He entendido", "BTN_OPTIONS": "Opciónes", @@ -108,11 +109,12 @@ "MESSAGE_SHORT": "Sigue sus cuentas <a href=\"http://duniter.org\" target=\"_blank\">Duniter</a><br/>en tiempo real !", "BTN_REGISTRY": "Anuario", "BTN_MARKET": "Ofertas/demandas", - "BTN_CURRENCIES": "Explorar las monedas", "BTN_CURRENCY": "Explorar la moneda", "BTN_ABOUT": "A propósito", "BTN_HELP": "Ayuda en lÃnea", - "REPORT_ISSUE": "anomalÃa" + "REPORT_ISSUE": "anomalÃa", + "NOT_YOUR_ACCOUNT_QUESTION" : "Usted no es dueño de la cuenta <<b><i class=\"ion-key\"></i> {{pubkey|formatPubkey}}</b>?", + "BTN_CHANGE_ACCOUNT": "Desconectar esta cuenta" }, "SETTINGS": { "TITLE": "Configuraciónes", @@ -195,17 +197,13 @@ } }, "CURRENCY": { - "SELECT": { - "TITLE": "Monedas", - "CURRENCIES": "Monedas conocidas", - "MEMBERS_COUNT": "{{membersCount}} miembros" - }, "VIEW": { "TITLE": "Moneda", "TAB_CURRENCY": "Moneda", "TAB_WOT": "Red de confianza", "TAB_NETWORK": "Red", "TAB_BLOCKS": "Bloques", + "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalizar}} es un <b>moneda libre</b>, iniciado {{firstBlockTime|formatFromNow}}. Ella actualmente <b>{{N}} miembros</b>, que producen y recibir un <a ng-click=\"showHelpModal('ud')\">Dividendo universal</a> (DU), cada {{dt|formatPeriod}}.", "NETWORK_RULES_DIVIDER": "Reglas de la red", "CURRENCY_NAME": "Nombre de la moneda", "MEMBERS": "Número de miembros", @@ -403,8 +401,13 @@ }, "NEW": { "TITLE": "Inscripción", - "SLIDE_1_TITLE": "Elección de la moneda :", - "SLIDE_2_TITLE": "Tipo de cuenta :", + "INTRO_WARNING_TIME": "Crear una cuenta en {{name|capitalize}} es muy simple. Sin embargo, por favor tome el tiempo suficiente para tomar correctamente este paso (no olvidar los identificadores, contraseñas, etc.).", + "INTRO_WARNING_SECURITY": "Asegúrate de que el equipo que se utiliza actualmente (ordenador, tableta, teléfono) <b>es seguro y digno de confianza</b>.", + "INTRO_WARNING_SECURITY_HELP": "Actualizaciones de antivirus, firewall activado, sesión protegidos por contraseña o código PIN, etc.", + "INTRO_HELP": "Haga clic en <b>{{'COMMON.BTN_START'|translate}}</b> para iniciar la creación de la cuenta. Se le guiará paso a paso.", + "REGISTRATION_NODE": "Su registro será grabado a través del nodo Duniter <b>{{server}}</b>, que luego se transmitió al resto del sistema de moneda.", + "REGISTRATION_NODE_HELP": "Si usted no confÃa en este nodo, <a ng-click=\"doQuickFix('settings')\">cambie la configuración</a> de Cesium.", + "SELECT_ACCOUNT_TYPE": "Elegir el tipo de cuenta para crear:", "MEMBER_ACCOUNT": "Cuenta miembro", "MEMBER_ACCOUNT_HELP": "Si ya no está inscrito como un individuo (Solamente una cuenta posible por individuo).", "WALLET_ACCOUNT": "Simple monedero", @@ -423,6 +426,7 @@ "LAST_SLIDE_CONGRATULATION": "<b>Bravo !</b> Ha introducido todas las informaciónes necesarias.<br/><b>Puede mandar la solicitud</b> de creación de su cuenta.</b><br/><br/>Por su información, la llave pública más abajo identificará su cuenta futura.<br/>Podrá estar comunicada a terceros para recibir sus pagos.<br/>Sin embargo, <b>no es útil</b> anotarla aquÃ.", "CONFIRMATION_MEMBER_ACCOUNT": "<b class=\"assertive\">Advertencia :</b> el identificador secreto, la contraseña y el seudónimo no podrán estar modificados.<br/><b>Asegurase siempre se los recordar !</b><br/><br/><b>Está usted seguro</b> querer mandar esta solicitud de inscripción ?", "CONFIRMATION_WALLET_ACCOUNT": "<b class=\"assertive\">Advertencia :</b> el identificador secreto y la contraseña no podrán estar modificados.<br/><b>Asegurase siempre se los recordar !</b><br/><br/><b>Está usted seguro</b> querer continuar con estos identificadores ?", + "CHECKING_PSEUDO": "Comprobación de disponibilidad...", "PSEUDO_AVAILABLE": "Este nombre está disponible", "PSEUDO_NOT_AVAILABLE": "Este nombre de usuario no está disponible", "INFO_LICENSE": "Para unirse a la moneda, le pedimos que leer y aceptar esta licencia.", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 4cb3046c6b2ff2767aef38e7e8a2363ddff1cd11..7993d8ecfeb9e8f27c45a7c61261ab5c6e1d0218 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -31,6 +31,7 @@ "BTN_ADD": "Ajouter", "BTN_SEARCH": "Rechercher", "BTN_REFRESH": "Actualiser", + "BTN_START": "Commencer", "BTN_CONTINUE": "Continuer", "BTN_UNDERSTOOD": "J'ai compris", "BTN_OPTIONS": "Options", @@ -104,12 +105,11 @@ }, "HOME": { "TITLE": "Cesium", - "MESSAGE": "Bienvenue dans l'application Cesium !<br/>Suivez vos comptes <a href=\"http://duniter.org\" target=\"_blank\">Duniter</a> en temps réel.", - "MESSAGE_SHORT": "Suivez vos comptes <a href=\"http://duniter.org\" target=\"_blank\">Duniter</a><br/>en temps réel !", + "MESSAGE": "Bienvenue dans l'application Cesium !<br/>Suivez vos comptes en monnaie libre <a href=\"http://duniter.org\" target=\"_blank\">Duniter</a>.", + "MESSAGE_SHORT": "Suivez vos comptes en monnaie libre <a href=\"http://duniter.org\" target=\"_blank\">Duniter</a> !", "BTN_REGISTRY": "Annuaire", "BTN_MARKET": "Offres/demandes", - "BTN_CURRENCIES": "Explorer les monnaies", - "BTN_CURRENCY": "Explorer la monnaie", + "BTN_CURRENCY": "Explorer la monnaie {{name|abbreviate}}", "BTN_ABOUT": "à propos", "BTN_HELP": "Aide en ligne", "REPORT_ISSUE": "anomalie", @@ -197,17 +197,13 @@ } }, "CURRENCY": { - "SELECT": { - "TITLE": "Monnaies", - "CURRENCIES": "Monnaies connues", - "MEMBERS_COUNT": "{{membersCount}} membres" - }, "VIEW": { "TITLE": "Monnaie", "TAB_CURRENCY": "Monnaie", "TAB_WOT": "Toile de confiance", "TAB_NETWORK": "Réseau", "TAB_BLOCKS": "Blocs", + "CURRENCY_SHORT_DESCRIPTION": "{{currency|capitalize}} est une <b>monnaie libre</b>, démarrée {{firstBlockTime|formatFromNow}}. Elle compte actuellement <b>{{N}} membres</b>, qui produisent et perçoivent un <a ng-click=\"showHelpModal('ud')\">Dividende Universel</a> (DU), chaque {{dt|formatPeriod}}.", "NETWORK_RULES_DIVIDER": "Règles du réseau", "CURRENCY_NAME": "Nom de la monnaie", "MEMBERS": "Nombre de membres", @@ -405,15 +401,20 @@ }, "NEW": { "TITLE": "Inscription", - "SLIDE_1_TITLE": "Choix de la monnaie :", - "SLIDE_2_TITLE": "Type de compte :", + "INTRO_WARNING_TIME": "La création d'un compte sur {{name|capitalize}} est très simple. Veuillez néanmoins prendre suffisament de temps pour faire correctement cette formalité (pour ne pas oublier les identifiants, mots de passe, etc.).", + "INTRO_WARNING_SECURITY": "Vérifier que le matériel que vous utilisez actuellement (ordinateur, tablette, téléphone) <b>est sécurisé et digne de confiance</b>.", + "INTRO_WARNING_SECURITY_HELP": "Anti-virus à jour, pare-feu activé, session protégée par mot de passe ou code pin, etc.", + "INTRO_HELP": "Cliquez sur <b>{{'COMMON.BTN_START'|translate}}</b> pour débuter la création de compte. Vous serez guidé étape par étape.", + "REGISTRATION_NODE": "Votre inscription sera enregistrée via le noeud Duniter <b>{{server}}</b>, qui le diffusera ensuite au reste du réseau de la monnaie.", + "REGISTRATION_NODE_HELP": "Si vous ne faites pas confiance en ce noeud, veuillez en changer <a ng-click=\"doQuickFix('settings')\">dans les paramètres</a> de Cesium.", + "SELECT_ACCOUNT_TYPE": "Choisissez le type de compte à créer :", "MEMBER_ACCOUNT": "Compte membre", - "MEMBER_ACCOUNT_HELP": "Si vous n'etes pas encore inscrit en tant qu'individu (Un seul compte possible par individu).", + "MEMBER_ACCOUNT_HELP": "Si vous n'êtes pas encore inscrit en tant qu'individu (un seul compte possible par individu). Ce compte permet de co-produire la monnaie, en recevant un <b>dividende universel</b> chaque {{parameters.dt|formatPeriod}}.", "WALLET_ACCOUNT": "Simple portefeuille", "WALLET_ACCOUNT_HELP": "Pour tous les autres cas, par exemple si vous avez besoin d'un compte supplémentaire.<br/>Aucun dividende universel ne sera créé par ce compte.", "SALT_WARNING": "Choisissez votre identifiant secret.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez le bien</b>.<br/>En cas de perte, plus personne ne pourra accéder à votre compte !", "PASSWORD_WARNING": "Choisissez un mot de passe.<br/>Il vous sera demandé à chaque connexion sur ce compte.<br/><br/><b>Retenez bien ce mot de passe</b>.<br/>En cas de perte, plus personne ne pourra accéder à votre compte !", - "PSEUDO_WARNING": "Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous identifier plus facilement.<br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>", + "PSEUDO_WARNING": "Choisissez un pseudonyme.<br/>Il sert aux autres membres, pour vous identifier plus facilement.<div class='hidden-xs'><br/>Il <b>ne pourra pas être modifié</b>, sans refaire un compte.</div><br/><br/>Il ne doit contenir <b>ni espace, ni de caractère accentué</b>.<div class='hidden-xs'><br/>Exemple : <span class='gray'>SophieDupond, MarcelChemin, etc.</span>", "PSEUDO": "Pseudonyme", "PSEUDO_HELP": "Pseudonyme", "SALT_CONFIRM": "Confirmation", @@ -425,6 +426,7 @@ "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> l'identifiant secret, le mot de passe et le pseudonyme ne pourront plus être modifiés.<br/><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/><br/><b>Assurez-vous de toujours vous en rappeller !</b><br/><br/><b>Etes-vous sûr</b> de vouloir continuer avec ces identifiants ?", + "CHECKING_PSEUDO": "Vérification...", "PSEUDO_AVAILABLE": "Pseudonyme disponible", "PSEUDO_NOT_AVAILABLE": "Pseudonyme non disponible", "INFO_LICENSE": "Avant de créer un compte membre, <b>veuillez lire et accepter la licence</b> d'usage de la monnaie :", diff --git a/www/js/app.js b/www/js/app.js index 9ec6877c9b55cd96747e8160da5e78c945fd37e9..9ca75e30a9e7c4da25a3a6882865d7d945b9be54 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -364,11 +364,12 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht IdleProvider.timeout(csConfig.logoutTimeout||15); // display warning during 15s }) -.run(function($rootScope, $translate, $state, $window, ionicReady, Device, UIUtils, $ionicConfig, PluginService, csWallet, csSettings, csConfig) { +.run(function($rootScope, $translate, $state, $window, ionicReady, Device, UIUtils, $ionicConfig, PluginService, csWallet, csSettings, csConfig, csCurrency) { 'ngInject'; $rootScope.config = csConfig; $rootScope.settings = csSettings.data; + $rootScope.currency = csCurrency.data; $rootScope.walletData = csWallet.data; $rootScope.device = Device; @@ -477,7 +478,13 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht return csSettings.ready(); }) - // Trying to restore default wallet + // Load currency + .then(csCurrency.get) + .then(function(currency){ + $rootScope.currency = currency; + }) + + // Trying to restore wallet .then(csWallet.restore) // Storing wallet to root scope @@ -485,7 +492,6 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht $rootScope.walletData = walletData; }); - }) ; diff --git a/www/js/config.js b/www/js/config.js index 08361de8bf372271e3f5152e389e52e11de73706..fdb54a5d567c8f4dc821eee556a6be4cabd4ec3f 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -11,26 +11,21 @@ angular.module("cesium.config", []) .constant("csConfig", { "cacheTimeMs": 60000, "fallbackLanguage": "en", - "rememberMe": false, + "rememberMe": true, "showUDHistory": false, "timeout": 10000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, - "logoutIlde": 600, "useLocalStorage": true, "useRelative": false, "initPhase": false, - "expertMode": false, + "expertMode": true, "decimalCount": 2, "httpsMode": false, "helptip": { - "enable": true, + "enable": false, "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md" }, - "license": { - "fr-FR": "license/license_g1-fr-FR.txt", - "en": "license/license_g1-en.txt" - }, "node": { "host": "g1.duniter.org", "port": "443" @@ -39,19 +34,23 @@ angular.module("cesium.config", []) "es": { "enable": true, "askEnable": false, - "host": "g1.data.duniter.fr", - "port": "443", - "notifications": { - "txSent": true, - "txReceived": true, - "certSent": true, - "certReceived": true - } - } + "host": "localhost", + "port": "9200", + "wsPort": "9400" + }, + "graph": { + "enable": true + }, + "neo4j": { + "enable": true + }, + "rml9": { + "enable": true + }, }, "version": "0.12.6", - "build": "2017-05-22T16:39:21.668Z", + "build": "2017-05-23T08:45:46.819Z", "newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug" }) -; \ No newline at end of file +; diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index a4187af495d70558b33b9d880cbb9e08d4fe5db2..e52206a821d3dcd4645c9f649fb08303af9ca487 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -436,7 +436,6 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $ $scope.doMotion = function(options) { return $scope.motion.show(options); }; - } @@ -448,12 +447,11 @@ function AboutController($scope, csConfig) { function HomeController($scope) { 'ngInject'; - } + function PassCodeController($scope) { 'ngInject'; - } diff --git a/www/js/controllers/blockchain-controllers.js b/www/js/controllers/blockchain-controllers.js index 87c96e52c428dbf2ce7e3d38cb266ad05d09d160..e64455399434cc5262c96384c9f41411b3e5d507 100644 --- a/www/js/controllers/blockchain-controllers.js +++ b/www/js/controllers/blockchain-controllers.js @@ -101,11 +101,11 @@ function BlockLookupController($scope, $timeout, $focus, $filter, $state, $ancho } // Load currency if need if (!$scope.currency) { - csCurrency.default() + csCurrency.get() .then(function(currency) { $scope.currency = currency ? currency.name : null; - $scope.node = !BMA.node.same(currency.peer.host, currency.peer.port) ? - BMA.instance(currency.peer.host, currency.peer.port) : BMA; + $scope.node = !BMA.node.same(currency.node.host, currency.node.port) ? + BMA.instance(currency.node.host, currency.node.port) : BMA; if (!$scope.currency) { UIUtils.alert.error('ERROR.GET_CURRENCY_FAILED'); @@ -434,12 +434,11 @@ function BlockViewController($scope, $ionicPopover, $state, UIUtils, BMA, csCurr $scope.hash = state && state.stateParams && state.stateParams.hash ? state.stateParams.hash : undefined; if (!$scope.currency) { - csCurrency.default() + csCurrency.get() .then(function (currency) { if (currency) { $scope.currency = currency.name; - $scope.node = !BMA.node.same(currency.peer.host, currency.peer.port) ? - BMA.instance(currency.peer.host, currency.peer.port) : BMA; + $scope.node = currency.node; $scope.load(); } }) diff --git a/www/js/controllers/currency-controllers.js b/www/js/controllers/currency-controllers.js index 907ebb1bf0e0e29468581601872c9fb34d967ec6..863d2158e660cf786720fed678fdbd02515cff0d 100644 --- a/www/js/controllers/currency-controllers.js +++ b/www/js/controllers/currency-controllers.js @@ -6,29 +6,6 @@ angular.module('cesium.currency.controllers', ['cesium.services']) $stateProvider - .state('app.currency_lookup', { - url: "/currencies?q", - views: { - 'menuContent': { - templateUrl: "templates/currency/lookup.html", - controller: 'CurrencyLookupCtrl' - } - } - }) - - .state('app.currency_name', { - url: "/currencies/:currency", - views: { - 'menuContent': { - templateUrl: "templates/currency/view_currency.html", - controller: 'CurrencyViewCtrl' - } - }, - data: { - large: 'app.currency_name_lg' - } - }) - .state('app.currency', { url: "/currency", views: { @@ -80,17 +57,6 @@ angular.module('cesium.currency.controllers', ['cesium.services']) } }) - .state('app.currency_name_lg', { - url: "/currency/lg/:name", - cache: false, - views: { - 'menuContent': { - templateUrl: "templates/currency/view_currency_lg.html", - controller: 'CurrencyViewCtrl' - } - } - }) - .state('app.currency_lg', { url: "/currency/lg", cache: false, @@ -105,63 +71,12 @@ angular.module('cesium.currency.controllers', ['cesium.services']) }) -.controller('CurrencyLookupCtrl', CurrencyLookupController) - -.controller('CurrencyViewCtrl', CurrencyViewController) + .controller('CurrencyViewCtrl', CurrencyViewController) .controller('CurrencyLicenseModalCtrl', CurrencyLicenseModalController) ; -function CurrencyLookupController($scope, $state, $q, UIUtils, BMA, csCurrency) { - 'ngInject'; - - $scope.selectedCurrency = ''; - $scope.knownCurrencies = []; - $scope.search = { - loading: true, - results: [] - }; - $scope.entered = false; - - $scope.$on('$ionicView.enter', function(e, state) { - if (!$scope.entered) { - if (state && state.stateParams && state.stateParams.q) { - $scope.search.text = state.stateParams.q; - } - - csCurrency.all() - .then(function (currencies) { - - $q.all(currencies.map(function(currency) { - var bma = BMA.lightInstance(currency.peer.host,currency.peer.port); - return bma.blockchain.current() - .then(function(block) { - currency.membersCount = block.membersCount; - }); - })) - .then(function() { - $scope.search.results = currencies; - $scope.search.loading = false; - if (!!currencies && currencies.length == 1) { - $scope.selectedCurrency = currencies[0].id; - } - // Set Ink - UIUtils.ink({selector: 'a.item'}); - }); - - - }); - } - }); - - // Called to navigate to the main app - $scope.selectCurrency = function(currency) { - $scope.selectedCurrency = currency; - $state.go('app.currency_name', {currency: currency.name}); - }; -} - -function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtils, csSettings, csCurrency, csNetwork, ModalUtils) { +function CurrencyViewController($scope, $q, $timeout, $ionicPopover, Modals, BMA, UIUtils, csSettings, csCurrency, csNetwork, ModalUtils) { $scope.formData = { useRelative: csSettings.data.useRelative, @@ -195,25 +110,23 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil csSettings.data.expertMode, licenseUrl: csSettings.getLicenseUrl() }; - $scope.node = null; $scope.loading = true; $scope.screen = UIUtils.screen; $scope.enter = function(e, state) { if ($scope.loading) { // run only once (first enter) - if (state.stateParams && state.stateParams.currency) { // Load by name - csCurrency.searchByName(state.stateParams.currency) - .then(function(currency){ - $scope.init(currency); - }); - } - else { - csCurrency.default() - .then(function (currency) { - $scope.init(currency); + + UIUtils.loading.show(); + + csCurrency.get() + .then($scope.load) + .then(function() { + // Show help tip, if login + if ($scope.isLogin()) { + $scope.showHelpTip(); + } }) .catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED')); - } csNetwork.api.data.on.mainBlockChanged($scope, function(mainBlock) { if ($scope.loading) return; @@ -228,34 +141,13 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil }; $scope.$on('$ionicView.enter', $scope.enter); - $scope.init = function(currency) { - $scope.formData.currency = currency.name; - $scope.node = !BMA.node.same(currency.peer.host, currency.peer.port) ? - BMA.instance(currency.peer.host, currency.peer.port) : BMA; - - UIUtils.loading.show(); - - // Load data - $scope.load() - .then(function() { - // Show help tip, if login - if ($scope.isLogin()) { - $scope.showHelpTip(); - } - }); - }; - $scope.load = function() { - if (!$scope.node) { - return; - } - // Load data from node var data = {}, M, lastUDTime, now = new Date().getTime(); return $q.all([ // Get the currency parameters - $scope.node.blockchain.parameters() + BMA.blockchain.parameters() .then(function(json){ data.currency = json.currency; data.c = json.c; @@ -279,7 +171,7 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil }), // Get the current block informations - $scope.node.blockchain.current() + BMA.blockchain.current() .then(function(block){ M = block.monetaryMass; data.N = block.membersCount; @@ -299,11 +191,11 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil }), // Get the UD informations - $scope.node.blockchain.stats.ud() + BMA.blockchain.stats.ud() .then(function(res){ if (res.result.blocks.length) { var lastBlockWithUD = res.result.blocks[res.result.blocks.length - 1]; - return $scope.node.blockchain.block({ block: lastBlockWithUD }) + return BMA.blockchain.block({ block: lastBlockWithUD }) .then(function(block){ data.currentUD = (block.unitbase > 0) ? block.dividend * Math.pow(10, block.unitbase) : block.dividend; lastUDTime = block.medianTime; @@ -314,7 +206,7 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil else { lastUDTime=0; data.Nprev=0; - return $scope.node.blockchain.parameters() + return BMA.blockchain.parameters() .then(function(json){ data.currentUD = json.ud0; }); @@ -423,6 +315,10 @@ function CurrencyViewController($scope, $q, $timeout, $ionicPopover, BMA, UIUtil return ModalUtils.show('templates/currency/modal_license.html','CurrencyLicenseModalCtrl'); }; + $scope.showHelpModal = function(helpAnchor) { + Modals.showHelp({anchor: helpAnchor}); + }; + /* -- popover -- */ $scope.showActionsPopover = function(event) { diff --git a/www/js/controllers/help-controllers.js b/www/js/controllers/help-controllers.js index 6cc430a0462cbbbceb5ce9d8e5152c0e3de3ecaa..a76a801f310c28bbbe4fe89a01a3ed783510fdc5 100644 --- a/www/js/controllers/help-controllers.js +++ b/www/js/controllers/help-controllers.js @@ -60,6 +60,7 @@ function HelpController($scope, $state, $timeout, $anchorScroll, csSettings) { $scope.$on('$ionicView.enter', function(e) { $scope.locale = csSettings.data.locale.id; if ($state.stateParams && $state.stateParams.anchor) { + $scope.anchor = $state.stateParams.anchor; $timeout(function () { $anchorScroll($state.stateParams.anchor); }, 100); @@ -70,13 +71,21 @@ function HelpController($scope, $state, $timeout, $anchorScroll, csSettings) { function HelpModalController($scope, $timeout, $anchorScroll, csSettings, parameters) { 'ngInject'; + $scope.itemsClass = {}; $scope.locale = csSettings.data.locale.id; if (parameters && parameters.anchor) { + $timeout(function() { $anchorScroll(parameters.anchor); }, 100); + + // Change CSS classes + $scope.itemsClass = {}; + $scope.itemsClass[parameters.anchor] = 'positive'; + $scope.listClass = 'gray'; } + } @@ -370,7 +379,7 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe ]; // Get currency parameters, with currentUD - return csCurrency.default().then(function(currency) { + return csCurrency.get().then(function(currency) { contentParams = currency.parameters; // Launch steps return $scope.executeStep('currency', steps, startIndex); @@ -481,8 +490,8 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe ]; // Get currency parameters, with currentUD - return csCurrency.default().then(function(currency) { - contentParams = currency.parameters; + return csCurrency.parameters().then(function(parameters) { + contentParams = parameters; // Launch steps return $scope.executeStep('network', steps, startIndex); }); @@ -581,9 +590,9 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe ]; // Get currency parameters, with currentUD - return csCurrency.default().then(function(currency) { + return csCurrency.get().then(function(currency) { contentParams = currency.parameters; - contentParams.currentUD = $rootScope.walletData.currentUD; + contentParams.currentUD = currency.currentUD; // Launch steps return $scope.executeStep('wot', steps, startIndex); }); @@ -732,10 +741,10 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe ]; // Get currency parameters, with currentUD - return csCurrency.default() + return csCurrency.get() .then(function(currency) { contentParams = currency.parameters; - contentParams.currentUD = $rootScope.walletData.currentUD; + contentParams.currentUD = currency.currentUD; // Launch steps return $scope.executeStep('wallet', steps, startIndex); }); @@ -844,8 +853,8 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe }*/ ]; - return csCurrency.default().then(function(currency) { - contentParams = currency.parameters; + return csCurrency.parameters().then(function(parameters) { + contentParams = parameterss; return $scope.executeStep('certs', steps, startIndex); }); }; @@ -908,10 +917,10 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe ]; // Get currency parameters, with currentUD - return csCurrency.default() + return csCurrency.get() .then(function(currency) { contentParams = currency.parameters; - contentParams.currentUD = $rootScope.walletData.currentUD; + contentParams.currentUD = currency.currentUD; // Launch steps return $scope.executeStep('tx', steps, startIndex); }); @@ -1036,9 +1045,9 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe } ]; - return csCurrency.default() - .then(function(currency) { - contentParams = currency.parameters; + return csCurrency.parameters() + .then(function(parameters) { + contentParams = parameters; return $scope.executeStep('settings', steps, startIndex); }); }; @@ -1072,7 +1081,7 @@ function HelpTipController($scope, $rootScope, $state, $window, $ionicSideMenuDe return $q.all([ $scope.showHome(), - csCurrency.default() + csCurrency.parameters() .then(function(parameters) { contentParams = parameters; }) diff --git a/www/js/controllers/join-controllers.js b/www/js/controllers/join-controllers.js index 77e469e15cdb647c60796275c9dd99356a49562d..cc099bfe274962eabd66e3701943b173f2cef4ed 100644 --- a/www/js/controllers/join-controllers.js +++ b/www/js/controllers/join-controllers.js @@ -32,7 +32,7 @@ function JoinController($timeout, Modals) { }, 100); } -function JoinChooseAccountTypeModalController($scope, $timeout, UIUtils, csCurrency) { +function JoinChooseAccountTypeModalController($scope, $state, Modals, UIUtils, csCurrency) { 'ngInject'; $scope.formData = {}; @@ -48,10 +48,11 @@ function JoinChooseAccountTypeModalController($scope, $timeout, UIUtils, csCurre $scope.load = function() { if ($scope.loading) { - return csCurrency.load() - .then(function (data) { - if (!data) return; - $scope.currencies = data.currencies; + return csCurrency.get() + .then(function (currency) { + if (!currency) return; + $scope.currency = currency; + $scope.formData.currency = currency.name; $scope.loading = false; }) .catch(UIUtils.onError('ERROR.GET_CURRENCIES_FAILED')); @@ -76,16 +77,26 @@ function JoinChooseAccountTypeModalController($scope, $timeout, UIUtils, csCurre $scope.slides.slider.lockSwipes(); }; - $scope.selectCurrency = function(currency) { - $scope.formData.currency = currency; - $scope.slideNext(); - }; - $scope.selectAccountTypeAndClose = function(type) { $scope.formData.accountType = type; $scope.closeModal($scope.formData); }; + /** + * Catch click for quick fix + * @param fix + */ + $scope.doQuickFix = function(event) { + if (event == 'settings') { + $scope.closeModal(); + $state.go('app.settings'); + } + }; + + $scope.showHelpModal = function(helpAnchor) { + Modals.showHelp({anchor: helpAnchor}); + }; + // TODO DEV only //$timeout(function() { //$scope.selectCurrency('g1'); @@ -94,7 +105,7 @@ function JoinChooseAccountTypeModalController($scope, $timeout, UIUtils, csCurre } -function JoinModalController($scope, $state, $interval, $timeout, UIUtils, CryptoUtils, csSettings, Modals, csWallet, csConfig, BMA, parameters) { +function JoinModalController($scope, $state, $interval, $timeout, $focus, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) { 'ngInject'; $scope.formData = { @@ -127,11 +138,11 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt if ($scope.loading) { $scope.licenseFileUrl = csSettings.getLicenseUrl(); - - $scope.startListenLicenseBottom(); + if ($scope.licenseFileUrl) { + $scope.startListenLicenseBottom(); + } $scope.slideBehavior = $scope.computeSlideBehavior(); - $scope.loading = false; } }; @@ -156,17 +167,18 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.showAccountPubkey = function() { $scope.formData.computing=true; + CryptoUtils.connect($scope.formData.username, $scope.formData.password) - .then(function(keypair) { - $scope.formData.pubkey = CryptoUtils.util.encode_base58(keypair.signPk); - $scope.formData.computing=false; - $scope.checkAccountAvailable(); - }) - .catch(function(err) { - $scope.formData.computing=false; - console.error('>>>>>>>' , err); - UIUtils.alert.error('ERROR.CRYPTO_UNKNOWN_ERROR'); - }); + .then(function(keypair) { + $scope.formData.pubkey = CryptoUtils.util.encode_base58(keypair.signPk); + $scope.formData.computing=false; + $scope.checkAccountAvailable(); + }) + .catch(function(err) { + $scope.formData.computing=false; + console.error('>>>>>>>' , err); + UIUtils.alert.error('ERROR.CRYPTO_UNKNOWN_ERROR'); + }); }; $scope.formDataChanged = function() { @@ -177,6 +189,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.getCurrentFormName = function() { var index = $scope.slides.slider.activeIndex; if($scope.accountType === 'member') { + index += ($scope.licenseFileUrl ? 0 : 1); // skip index 0, when no license file if (index === 0) return "licenseForm"; if (index === 1) return "pseudoForm"; if (index === 2) return "saltForm"; @@ -193,45 +206,62 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.computeSlideBehavior = function() { var formName = $scope.getCurrentFormName(); + var behavior; if (formName == "licenseForm") { - return { + behavior = { hasPreviousButton: false, hasNextButton: false, hasAcceptButton: true }; } else if (formName == "pseudoForm") { - return { + behavior = { helpAnchor: 'join-pseudo', - hasPreviousButton: true, - hasNextButton: true + hasPreviousButton: $scope.licenseFileUrl && true, + hasNextButton: true, + focus: 'pseudo' }; } else if (formName == "saltForm") { - return { + behavior = { helpAnchor: 'join-salt', hasPreviousButton: true, - hasNextButton: true + hasNextButton: true, + focus: 'salt' }; } else if (formName == "passwordForm") { - return { + behavior = { helpAnchor: 'join-password', hasPreviousButton: true, - hasNextButton: true + hasNextButton: true, + focus: 'password' }; } else if (formName == "confirmForm") { - return { + behavior = { hasPreviousButton: true, hasNextButton: false, hasSendButton: true }; } - return { - hasPreviousButton: false, - hasNextButton: true - }; + else { + behavior = { + hasPreviousButton: false, + hasNextButton: true + }; + } + + // removeIf(device) + // Focus input text (only if NOT device, to avoid keyboard opening) + if (behavior.focus) { + $timeout(function(){ + $focus(behavior.focus); + }, 100); + } + // endRemoveIf(device) + + return behavior; }; @@ -376,8 +406,9 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt }; $scope.checkUid = function(){ - if (!$scope.formData.pseudo || !$scope.formData.pseudo.length) { - $scope.uiAlreadyUsed = undefined; + if (!$scope.formData.pseudo || $scope.formData.pseudo.length < 3) { + $scope.formData.computing=false; + delete $scope.uiAlreadyUsed; return; } @@ -395,6 +426,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.formData.computing=false; }) .catch(function(err){ + console.error(err); $scope.formData.computing=false; $scope.uiAlreadyUsed = false; }); @@ -402,9 +434,9 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.$watch('formData.pseudo', $scope.checkUid, true); $scope.checkAccountAvailable = function() { - var pub = $scope.formData.pubkey; - $scope.accountAvailable = false; - BMA.tx.sources({ pubkey: pub }) // search on pubkey + delete $scope.accountAvailable; + // Search for tx source, from pubkey + BMA.tx.sources({ pubkey: $scope.formData.pubkey }) .then(function(res) { if(!res.sources.length) { $scope.formData.computing=false; @@ -412,7 +444,13 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt } else{ $scope.formData.computing=false; + $scope.accountAvailable = false; } + }) + .catch(function(err) { + console.error(err); + $scope.formData.computing=false; + $scope.accountAvailable = false; }); }; diff --git a/www/js/controllers/network-controllers.js b/www/js/controllers/network-controllers.js index 47758b5b3d7be5f05cb96b068b13a78071cf69f7..f2c90afe495921982e8f3ddc46e5b9c9d30d0a2f 100644 --- a/www/js/controllers/network-controllers.js +++ b/www/js/controllers/network-controllers.js @@ -65,11 +65,11 @@ function NetworkLookupController($scope, $state, $ionicHistory, $ionicPopover, if ($scope.networkStarted) return; $scope.networkStarted = true; $scope.search.loading = true; - csCurrency.default() + csCurrency.get() .then(function (currency) { if (currency) { - $scope.node = !BMA.node.same(currency.peer.host, currency.peer.port) ? - BMA.instance(currency.peer.host, currency.peer.port) : BMA; + $scope.node = !BMA.node.same(currency.node.host, currency.node.port) ? + BMA.instance(currency.node.host, currency.node.port) : BMA; if (state && state.stateParams) { if (state.stateParams.type && ['mirror', 'member', 'offline'].indexOf(state.stateParams.type) != -1) { $scope.search.type = state.stateParams.type; diff --git a/www/js/controllers/settings-controllers.js b/www/js/controllers/settings-controllers.js index 9b87e7f1c9c1de9b211cc9ab4437cc8d383052e3..85158edd54a69d226c5da825d9c6885e61406b37 100644 --- a/www/js/controllers/settings-controllers.js +++ b/www/js/controllers/settings-controllers.js @@ -20,7 +20,7 @@ angular.module('cesium.settings.controllers', ['cesium.services', 'cesium.curren .controller('SettingsCtrl', SettingsController) ; -function SettingsController($scope, $q, $ionicPopup, $timeout, $translate, csHttp, +function SettingsController($scope, $q, $ionicHistory, $ionicPopup, $timeout, $translate, csHttp, UIUtils, BMA, csSettings, $ionicPopover, Modals) { 'ngInject'; @@ -121,6 +121,9 @@ function SettingsController($scope, $q, $ionicPopup, $timeout, $translate, csHtt UIUtils.loading.hide(); $scope.formData.node = newNode; BMA.copy(nodeBMA); + + // Reset history cache + return $ionicHistory.clearCache(); }); }); }; diff --git a/www/js/plugins.js b/www/js/plugins.js index cbe68800eb9d6e49bf05049cd6bf074beb593243..cfc0d177e463a9975dd38fe3ddff3bba430b7e19 100644 --- a/www/js/plugins.js +++ b/www/js/plugins.js @@ -4,6 +4,7 @@ angular.module('cesium.plugins', [ 'cesium.plugins.templates', // Plugins 'cesium.es.plugin', - 'cesium.graph.plugin' + 'cesium.graph.plugin', + 'cesium.rml9.plugin' ]) ; diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 572d24a06610eeed1e83392bccd4babe37ef58e7..9c0351fe1b3c52c9c47bd7e87757e53d294cbfe0 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -337,7 +337,7 @@ angular.module('cesium.bma.services', ['ngResource', 'ngApi', 'cesium.http.servi node: { summary: get('/node/summary', csHttp.cache.LONG), same: function(host2, port2) { - return host2 == host && ((!port && !port2) || (port == port2)); + return host2 == that.host && ((!that.port && !port2) || (that.port == port2||80)); } }, network: { diff --git a/www/js/services/currency-services.js b/www/js/services/currency-services.js index 97ed4d399b56c3d89e4fdcf038cbe696afa3f8ef..c2818e68513c587e9a48e8c3de7dd1645df47952 100644 --- a/www/js/services/currency-services.js +++ b/www/js/services/currency-services.js @@ -1,11 +1,10 @@ angular.module('cesium.currency.services', ['ngResource', 'ngApi', 'cesium.bma.services']) -.factory('csCurrency', function($q, BMA, Api, $rootScope) { +.factory('csCurrency', function($q, BMA, Api) { 'ngInject'; - factory = function(id) { - + function factory(id, BMA) { var constants = { // Avoid to many call on well known currencies @@ -16,126 +15,176 @@ angular.module('cesium.currency.services', ['ngResource', 'ngApi', 'cesium.bma.s } }, - data = { - loaded: false, - currencies: null, - cache: { - loadPromise: null - } - }, - api = new Api(this, "csCurrency-" + id), + data = {}, + api = new Api(this, "csCurrency-" + id); + + function powBase(amount, base) { + return base <= 0 ? amount : amount * Math.pow(10, base); + } + + function resetData() { + data.loaded = false; + data.name = null; + data.parameters = null; + data.firstBlockTime = null; + data.membersCount = null; + data.cache = {}; + data.node = BMA; + data.currentUD = null; + api.data.raise.reset(data); + } + + function loadData() { + + console.debug('[currency] Starting...'); + var now = new Date().getTime(); + + // Load currency from default node + data.cache.loadPromise = $q.all([ + + // get parameters + loadParameters() + .then(function(parameters) { + // load first block info + return loadFirstBlock(parameters.currency); + }), + + // get current data (e.g. UD, members count) + loadCurrentData(), + + // call extensions + api.data.raisePromise.load(data) + ]) + .then(function() { + console.debug('[currency] Loaded in ' + (new Date().getTime() - now) + 'ms'); + data.loaded = true; + delete data.cache.loadPromise; + return data; + }) + .catch(function(err) { + resetData(); + throw err; + }); + + return data.cache.loadPromise; + } + + function loadParameters() { + return BMA.blockchain.parameters() + .then(function(res){ + data.name = res.currency; + data.parameters = res; + return res; + }); + } + + function loadFirstBlock(currencyName) { + // Well known currencies + if (constants.WELL_KNOWN_CURRENCIES[currencyName]){ + angular.merge(data, constants.WELL_KNOWN_CURRENCIES[currencyName]); + return $q.when(); + } + + return BMA.blockchain.block({block:0}) + .then(function(json) { + // Need by graph plugin + data.firstBlockTime = json.medianTime; + }) + .catch(function(err) { + // Special case, when currency not started yet + if (err && err.ucode === BMA.errorCodes.BLOCK_NOT_FOUND) { + data.firstBlockTime = 0; + return; + } + throw err; + }); + } + + function loadCurrentData() { + return BMA.blockchain.stats.ud() + .then(function(res){ + // Special case for currency init + if (!res.result.blocks.length) { + data.currentUD = data.parameters ? data.parameters.ud0 : -1; + return data.currentUD ; + } + else { + var lastBlockWithUD = res.result.blocks[res.result.blocks.length - 1]; + return BMA.blockchain.block({ block: lastBlockWithUD }) + .then(function(block){ + data.currentUD = powBase(block.dividend, block.unitbase); + data.membersCount = block.membersCount; + return data.currentUD; + }) + .catch(function(err) { + data.currentUD = null; + throw err; + }); + } + }) + .catch(function(err) { + data.currentUD = null; + throw err; + }); + } - loadData = function() { + function getData() { + if (data.loaded) { // load only once + return $q.when(data); + } + + // Previous load not finished: return the existing promise - fix #452 + if (data.cache.loadPromise) { // load only once + return $q.when(data.cache.loadPromise); + } + + return loadData(); + } + + function getDataField(field) { + return function() { if (data.loaded) { // load only once - return $q.when(data); + return $q.when(data[field]); } // Previous load not finished: return the existing promise - fix #452 if (data.cache.loadPromise) { // load only once - return $q.when(data.cache.loadPromise); + return $q.when(data.cache.loadPromise) + .then(function(){ + return data[field]; + }); } - data.currencies = []; - - var now = new Date().getTime(); - - // Load currency from default node - var promise = BMA.blockchain.parameters() - .then(function(res){ - var currency = { - name: res.currency, - peer: { - host: BMA.host, - port: BMA.port, - server: BMA.server - }, - parameters: res - }; - // Add to data - data.currencies.push(currency); - - // Well known currencies - if (constants.WELL_KNOWN_CURRENCIES[res.currency]){ - angular.merge(currency, constants.WELL_KNOWN_CURRENCIES[res.currency]); - } - - // Load some default values - else { - return BMA.blockchain.block({block:0}) - .then(function(json) { - // Need by graph plugin - currency.firstBlockTime = json.medianTime; - }) - .catch(function(err) { - // Special case, when currency not started yet - if (err && err.ucode === BMA.errorCodes.BLOCK_NOT_FOUND) { - currency.firstBlockTime = 0; - return; - } - throw err; - }) - ; - } - }) - .then(function() { - // API extension point - return api.data.raisePromise.load(data); - }) - .then(function() { - console.debug('[currency] Loaded in ' + (new Date().getTime() - now) + 'ms'); - data.loaded = true; - delete data.cache.loadPromise; - return data; - }) - .catch(function(err) { - data.loaded = false; - data.currencies = []; - delete data.cache.loadPromise; - throw err; - }); - - data.cache.loadPromise = promise; - return promise; - }, - - getAll = function() { - return loadData() - .then(function(data){ - return data.currencies; + return loadData().then(function(){ + return data[field]; }); - }, - - getDefault = function() { - return loadData() - .then(function(data){ - if (!data || !data.currencies || !data.currencies.length) throw new Error('No default currency'); - return data.currencies[0]; - }); - }, - - searchByName = function(name) { - return loadData() - .then(function(data){ - return _.findWhere(data.currencies, {name: name}); - }); }; + } + + // TODO register new block event, to get new UD value // Register extension points api.registerEvent('data', 'load'); + api.registerEvent('data', 'reset'); + + // init data + resetData(); return { - id: id, - load: loadData, - all: getAll, - default: getDefault, - searchByName: searchByName, + get: getData, + parameters: getDataField('parameters'), + currentUD: getDataField('currentUD'), // api extension - api: api + api: api, + // deprecated methods + default: function() { + console.warn('[currency] \'csCurrency.default()\' has been DEPRECATED - Please use \'csCurrency.get()\' instead.'); + return getData(); + } }; - }; - - var service = factory('default'); + } + var service = factory('default', BMA); service.instance = factory; return service; }); diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index 4d289cdd690c01916213137f04e3b11fc9658bfc..1af89938fb991061e717160e4dc44829b5d308cb 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -21,10 +21,10 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser }, data = {}, - api = new Api(this, 'csWallet-' + id), resetData = function(init) { + data.loaded = false; data.pubkey= null; data.keypair = { signSk: null, @@ -48,7 +48,6 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser data.sigDate = null; data.isMember = false; data.events = []; - data.loaded = false; if (init) { api.data.raise.init(data); } @@ -316,12 +315,9 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser // Call extend api api.data.raisePromise.login(data), - // Load parameters + // Load currency (e.g parameters) // This prevent timeout error, when loading a market record after a browser refresh (e.g. F5) - loadParameters(), - - // Load current UD is need by features tour - loadCurrentUD() + loadCurrency() ]); } else */if (storedData && storedData.keypair && storedData.pubkey) { @@ -340,18 +336,15 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser // Call extend api api.data.raisePromise.login(data), - // Load parameters - // This prevent timeout error, when loading a market record after a browser refresh (e.g. F5) - loadParameters(), - - // Load current UD is need by features tour - loadCurrentUD() + // Load currency + // This prevent timeout error, when loading record after a browser refresh (e.g. F5) + loadCurrency() ]); } else { - // Load parameters + // Load currency // This prevent timeout error, when loading a market record after a browser refresh (e.g. F5) - return loadParameters(); + return loadCurrency(); } }) .then(function(){ @@ -686,49 +679,23 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser }); }, - loadParameters = function() { + loadCurrency = function() { if (data.parameters && data.currency) return $q.when(); - return BMA.blockchain.parameters() - .then(function(json){ - data.currency = json.currency; - data.parameters = json; - if (data.currentUD == -1) data.currentUD = data.parameters.ud0; + return csCurrency.get() + .then(function(currency){ + data.currency = currency.name; + data.parameters =currency.parameters; + data.currentUD = currency.currentUD; }) .catch(function(err) { data.currency = null; data.parameters = null; + data.currentUD = -1; throw err; }); }, - loadCurrentUD = function() { - return BMA.blockchain.stats.ud() - .then(function(res){ - // Special case for currency init - if (!res.result.blocks.length) { - data.currentUD = data.parameters ? data.parameters.ud0 : -1; - return data.currentUD ; - } - else { - var lastBlockWithUD = res.result.blocks[res.result.blocks.length - 1]; - return BMA.blockchain.block({ block: lastBlockWithUD }) - .then(function(block){ - data.currentUD = powBase(block.dividend, block.unitbase); - return data.currentUD; - }) - .catch(function(err) { - data.currentUD = null; - throw err; - }); - } - }) - .catch(function(err) { - data.currentUD = null; - throw err; - }); - }, - - // Must be call after loadParameters() and loadRequirements() + // Must be call after loadCurrency() and loadRequirements() finishLoadRequirements = function() { data.requirements.needCertificationCount = (!data.requirements.needMembership && (data.requirements.certificationCount < data.parameters.sigQty)) ? (data.parameters.sigQty - data.requirements.certificationCount) : 0; @@ -804,10 +771,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser return $q.all([ // Get currency parameters - loadParameters(), - - // Get current UD - loadCurrentUD(), + loadCurrency(), // Get requirements loadRequirements(), @@ -833,7 +797,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser return processTransactionsAndSources(); }) .then(function() { - finishLoadRequirements(); // must be call after loadParameters() and loadRequirements() + finishLoadRequirements(); // must be call after loadCurrency() and loadRequirements() return api.data.raisePromise.finishLoad(data) .catch(function(err) { console.error('Error while finishing wallet data load, on extension point. Try to continue'); @@ -884,11 +848,8 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser // Reset events cleanEventsByContext('requirements'); - // Get parameters - if (options.parameters) jobs.push(loadParameters()); - - // Get current UD - if (options.currentUd) jobs.push(loadCurrentUD()); + // Get currency (e.g parameters) + if (options.parameters || options.currentUd) jobs.push(loadCurrency()); // Get requirements if (options.requirements) { @@ -1291,8 +1252,8 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser var block; return $q.all([ - // Load parameters (need to known the currency) - loadParameters(), + // Load currency (e.g parameters) + loadCurrency(), // Get th current block BMA.blockchain.current() diff --git a/www/templates/currency/view_currency_lg.html b/www/templates/currency/view_currency_lg.html index 5b2d96e74ac60d8ff4efcdb124e54e97cf4884f0..e5947e92b60d4aedbed281e90314ed0c3b3f707b 100644 --- a/www/templates/currency/view_currency_lg.html +++ b/www/templates/currency/view_currency_lg.html @@ -2,10 +2,10 @@ cache-view="false"> <ion-nav-title bind-notifier="{ rebind:formData.useRelative }"> <span> - {{'CURRENCY.VIEW.TITLE' | translate}} {{id}} + {{'CURRENCY.VIEW.TITLE' | translate}} </span> <span ng-if="!loading"> - {{formData.currency}} (<span ng-bind-html=":rebind:formData.currency | currencySymbol:formData.useRelative"></span>) + {{formData.currency|capitalize}} </span> </ion-nav-title> @@ -36,7 +36,16 @@ <button class="button button-stable button-small-padding icon ion-android-more-vertical ink" ng-click="showActionsPopover($event)"> </button> - + + </div> + + <div class="item item-text-wrap no-border no-padding" + ng-if="!loading"> + <div class="item-icon-left card padding stable-900-bg"> + <i class="icon ion-help-circled calm"></i> + <div class="item-icon-left-padding" trust-as-html=":rebind:'CURRENCY.VIEW.CURRENCY_SHORT_DESCRIPTION'|translate:formData"> + </div> + </div> </div> <div class="row responsive-sm"> @@ -44,6 +53,9 @@ <div class="col list"> <div class="item item-divider"> <span translate>CURRENCY.VIEW.MONEY_DIVIDER</span> + <span ng-if="!loading"> + {{formData.currency|capitalize}} + </span> </div> <ng-include src="'templates/currency/items_parameters.html'"></ng-include> diff --git a/www/templates/help/help.html b/www/templates/help/help.html index 2926d62dfe42eed49b3132ab3f8d5c9dc1437b28..0eaf332633d0ba4a67c408c391a3f2eb8846527b 100644 --- a/www/templates/help/help.html +++ b/www/templates/help/help.html @@ -3,20 +3,23 @@ <h2 translate>HELP.JOIN.SECTION</h2> <a name="join-salt"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>LOGIN.SALT</div> + <div class="row responsive-sm" + ng-class="itemsClass['join-salt']"> + <div class="col col-20" translate>LOGIN.SALT</div> <div class="col" translate>HELP.JOIN.SALT</div> </div> <a name="join-password"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>LOGIN.PASSWORD</div> + <div class="row responsive-sm" + ng-class="itemsClass['join-password']"> + <div class="col col-20" translate>LOGIN.PASSWORD</div> <div class="col" translate>HELP.JOIN.PASSWORD</div> </div> <a name="join-pseudo"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>ACCOUNT.NEW.PSEUDO</div> + <div class="row responsive-sm" + ng-class="itemsClass['join-pseudo']"> + <div class="col col-20" translate>ACCOUNT.NEW.PSEUDO</div> <div class="col" translate>HELP.JOIN.PSEUDO</div> </div> @@ -24,33 +27,37 @@ <h2 translate>HELP.GLOSSARY.SECTION</h2> <a name="pubkey"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>COMMON.PUBKEY</div> + <div class="row responsive-sm" + ng-class="itemsClass.pubkey"> + <div class="col col-20" translate>COMMON.PUBKEY</div> <div class="col" translate>HELP.GLOSSARY.PUBKEY_DEF</div> </div> <a name="blockchain"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>HELP.GLOSSARY.BLOCKCHAIN</div> + <div class="row responsive-sm" + ng-class="itemsClass.blockchain"> + <div class="col col-20" translate>HELP.GLOSSARY.BLOCKCHAIN</div> <div class="col" translate>HELP.GLOSSARY.BLOCKCHAIN_DEF</div> </div> <a name="universal_dividend"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>COMMON.UNIVERSAL_DIVIDEND</div> + <a name="ud"></a> + <div class="row responsive-sm" + ng-class="itemsClass.ud"> + <div class="col col-20" translate>COMMON.UNIVERSAL_DIVIDEND</div> <div class="col" translate>HELP.GLOSSARY.UNIVERSAL_DIVIDEND_DEF</div> </div> <a name="member"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>HELP.GLOSSARY.MEMBER</div> + <div class="row responsive-sm" + ng-class="itemsClass.member"> + <div class="col col-20" translate>HELP.GLOSSARY.MEMBER</div> <div class="col" translate>HELP.GLOSSARY.MEMBER_DEF</div> </div> - <a name="currency_rules"></a> - <div class="row responsive-sm"> - <div class="col col-20 gray" translate>HELP.GLOSSARY.CURRENCY_RULES</div> + <div class="row responsive-sm" + ng-class="itemsClass.currency_rules"> + <div class="col col-20" translate>HELP.GLOSSARY.CURRENCY_RULES</div> <div class="col" translate>HELP.GLOSSARY.CURRENCY_RULES_DEF</div> </div> - diff --git a/www/templates/help/modal_help.html b/www/templates/help/modal_help.html index a0cfe9a64cd7bfccab12ea5ba4769e6727f56670..d0361b0951dac54a9d211261085aba3d7e13d7c0 100644 --- a/www/templates/help/modal_help.html +++ b/www/templates/help/modal_help.html @@ -1,4 +1,4 @@ -<ion-view class="modal slide-in-up ng-enter active ng-enter-active"> +<ion-modal-view class="modal-full-height modal-help"> <ion-header-bar class="bar-positive"> <button class="button button-clear" ng-click="closeModal()" translate>COMMON.BTN_CLOSE @@ -7,9 +7,11 @@ <h1 class="title" translate>HELP.TITLE</h1> </ion-header-bar> - <ion-content scroll="true" class="padding"> + <ion-content croll="false" class="padding"> - <ng-include src="'templates/help/help.html'"></ng-include> + <div ng-class="listClass"> + <ng-include src="'templates/help/help.html'"></ng-include> + </div> <div class="padding hidden-xs text-center"> <button class="button button-positive ink" type="submit" @@ -19,4 +21,4 @@ </div> </ion-content> -</ion-view> +</ion-modal-view> diff --git a/www/templates/home/home.html b/www/templates/home/home.html index 1f2175f0b8c8ef97486611c0eb70131edd58984a..a9795e2d3ae271bd3f7e81923f01cf6e3e735cb5 100644 --- a/www/templates/home/home.html +++ b/www/templates/home/home.html @@ -9,37 +9,30 @@ <h4 class="hidden-xs" translate>HOME.MESSAGE</h4> <h4 class="visible-xs" translate>HOME.MESSAGE_SHORT</h4> + <!-- Help tour (NOT ready yet for small device) --> <div class="center"> - <br class="hidden-xs"/> - - <!-- Help tour (NOT ready yet for small device) --> <button type="button" class="button button-block button-stable button-raised icon-left icon ion-easel ink-dark hidden-xs" ng-click="startHelpTour()" > {{'COMMON.BTN_HELP_TOUR'|translate}} </button> - <!-- CURRENCY --> - <button type="button" - class="button button-block button-stable button-raised icon icon-left ion-ios-world-outline ink-dark" - ng-if="options.registry.enable" - ui-sref="app.currency_lookup" translate>HOME.BTN_CURRENCIES</button> + <!-- Currency--> <button type="button" - class="button button-block button-stable button-raised icon icon-left ion-ios-world-outline ink-dark hidden-sm hidden-xs" - ng-if="!options.registry || !options.registry.enable" - ui-sref="app.currency" translate>HOME.BTN_CURRENCY</button> + class="item button button-block button-stable button-raised icon icon-left ion-ios-world-outline ink-dark hidden-sm hidden-xs" + ui-sref="app.currency">{{'HOME.BTN_CURRENCY'|translate:$root.currency }}</button> <button type="button" - class="button button-block button-positive button-raised icon icon-left ion-locked ink-dark" + class="item button button-block button-positive button-raised icon icon-left ion-locked ink-dark" ng-click="loginAndGo('app.view_wallet')" ng-show="!login" translate>COMMON.BTN_LOGIN</button> <button type="button" - class="button button-block button-positive button-raised icon icon-left ion-person ink-dark" + class="item button button-block button-positive button-raised icon icon-left ion-person ink-dark" ui-sref="app.view_wallet" ng-show="login" translate>MENU.ACCOUNT</button> <button type="button" - class="button button-block button-positive button-raised icon icon-left ion-card ink-dark visible-xs" + class="item button button-block button-positive button-raised icon icon-left ion-card ink-dark visible-xs" ui-sref="app.view_wallet_tx" ng-show="login" translate>MENU.TRANSACTIONS</button> <br class="visible-xs visible-sm"/> @@ -80,9 +73,9 @@ <!-- about --> <a href="#" ng-click="showAboutModal()" translate>HOME.BTN_ABOUT</a> </div> - </div> - + </div> </ion-content> </ion-view> + diff --git a/www/templates/join/modal_choose_account_type.html b/www/templates/join/modal_choose_account_type.html index d2203fbf0e313c1ab0f5ecdec2cd39626b16e271..1de048038a6aad79caa8c7d54b61a7cedcf11b2b 100644 --- a/www/templates/join/modal_choose_account_type.html +++ b/www/templates/join/modal_choose_account_type.html @@ -10,15 +10,12 @@ ng-click="slidePrev()" ng-if="slides.slider.activeIndex"> </button> - <button class="button button-icon button-clear icon ion-ios-help-outline visible-xs" - ng-if="slides.slider.activeIndex > 1 && !isLastSlide" - ng-click="showHelpModal()"></button> <h1 class="title" translate>ACCOUNT.NEW.TITLE</h1> <button class="button button-clear icon-right visible-xs" - ng-if="!isLastSlide && slides.slider.activeIndex > 1" - ng-click="doNext()"> + ng-if="slides.slider.activeIndex === 0" + ng-click="slideNext()"> <span translate>COMMON.BTN_NEXT</span> <i class="icon ion-ios-arrow-right"></i> </button> @@ -30,25 +27,50 @@ <!-- STEP 1: currency --> <ion-slide-page> <ion-content class="has-header padding"> - <h3 translate>ACCOUNT.NEW.SLIDE_1_TITLE</h3> - <div class="list"> - <div class="item text-center" ng-if="loading"> - <ion-spinner class="icon" icon="android"></ion-spinner> - </div> - <div ng-repeat="currency in currencies" - ng-if="!loading" - class="item card item-icon-right stable-bg padding ink" - ng-class="{ selected: selectedCurrency == currency }" - ng-click="selectCurrency(currency.name, true)"> - <h2>{{::currency.name}}</h2> - <h4 class="gray">{{::currency.peer.server}}</h4> - <i class="icon dark ion-ios-arrow-right"></i> + <div class="text-center" ng-if="loading"> + <ion-spinner class="icon" icon="android"></ion-spinner> + </div> + + <div ng-if="!loading"> + + + <p ng-bind-html="'ACCOUNT.NEW.INTRO_WARNING_TIME'|translate:currency"></p> + + <div class="row responsive-sm"> + <div class="col"> + <div class="item card item-icon-left padding item-text-wrap stable-bg"> + <i class="icon ion-android-warning assertive"></i> + + <p class="item-content item-icon-left-padding "> + <span class="dark" translate>ACCOUNT.NEW.INTRO_WARNING_SECURITY</span><br/> + <small translate>ACCOUNT.NEW.INTRO_WARNING_SECURITY_HELP</small> + </p> + </div> + </div> + + <div class="col"> + <div class="item card item-icon-left padding item-text-wrap stable-bg"> + <i class="icon ion-information-circled positive"></i> + <p class="item-content item-icon-left-padding "> + <span class="dark" trust-as-html="'ACCOUNT.NEW.REGISTRATION_NODE'|translate:currency.node"></span><br/> + <small trust-as-html="'ACCOUNT.NEW.REGISTRATION_NODE_HELP'|translate:currency.node"></small> + </p> + </div> + </div> </div> + + </div> + <p class="hidden-xs hidden-sm" ng-bind-html="'ACCOUNT.NEW.INTRO_HELP'|translate"></p> + <div class="padding hidden-xs text-right"> <button class="button button-clear button-dark ink" ng-click="closeModal()" type="button" translate>COMMON.BTN_CANCEL </button> + <button class="button button-positive icon-right ion-chevron-right ink" ng-click="slideNext()" + ng-disabled="loading" type="button" translate> + COMMON.BTN_START + </button> </div> </ion-content> </ion-slide-page> @@ -56,7 +78,7 @@ <!-- STEP 2: account type --> <ion-slide-page> <ion-content class="has-header padding"> - <h3 translate>ACCOUNT.NEW.SLIDE_2_TITLE</h3> + <p translate>ACCOUNT.NEW.SELECT_ACCOUNT_TYPE</p> <div class="list"> <!-- member account --> <div class="item item-complex card stable-bg item-icon-left item-icon-right ink" @@ -64,7 +86,7 @@ <div class="item-content item-text-wrap"> <i class="item-image icon dark ion-person"></i> <h2 translate>ACCOUNT.NEW.MEMBER_ACCOUNT</h2> - <h4 class="gray" translate>ACCOUNT.NEW.MEMBER_ACCOUNT_HELP</h4> + <h4 class="gray" ng-bind-html="'ACCOUNT.NEW.MEMBER_ACCOUNT_HELP'|translate:currency"></h4> <i class="icon dark ion-ios-arrow-right"></i> </div> </div> diff --git a/www/templates/join/modal_join_member.html b/www/templates/join/modal_join_member.html index c4ab0c157c9f0ccec1f393484035eb27213a1932..b2ad690fe6d24f02d9174b42b997e6b548a172b3 100644 --- a/www/templates/join/modal_join_member.html +++ b/www/templates/join/modal_join_member.html @@ -44,7 +44,7 @@ <ion-slides options="slides.options" slider="slides.slider" ng-init="console.log('START SLIDE');"> <!-- STEP 1: license --> - <ion-slide-page> + <ion-slide-page ng-if="licenseFileUrl"> <ion-content class="has-header" scroll="false"> <div class="padding" translate>ACCOUNT.NEW.INFO_LICENSE</div> @@ -75,8 +75,8 @@ <ion-content class="has-header" scroll="false"> <form name="pseudoForm" novalidate="" ng-submit="doNext('pseudoForm')"> - <div class="item item-text-wrap text-center padding hidden-xs" > - <a class="pull-right icon-help" ng-click="showHelpModal('join-pseudo')"></a> + <div class="item item-text-wrap text-center padding" > + <a class="pull-right icon-help hidden-xs" ng-click="showHelpModal('join-pseudo')"></a> <span translate>ACCOUNT.NEW.PSEUDO_WARNING</span> </div> @@ -87,7 +87,7 @@ <div class="item item-input" ng-class="{'item-input-error': (pseudoForm.$submitted && pseudoForm.pseudo.$invalid) || (uiAlreadyUsed && formData.pseudo)}"> <span class="input-label" translate>ACCOUNT.NEW.PSEUDO</span> - <input name="pseudo" type="text" placeholder="{{'ACCOUNT.NEW.PSEUDO_HELP' | translate}}" + <input id="pseudo" name="pseudo" type="text" placeholder="{{'ACCOUNT.NEW.PSEUDO_HELP' | translate}}" ng-model="formData.pseudo" ng-minlength="3" ng-maxlength="100" @@ -113,18 +113,23 @@ </div> <!-- Show if valid pseudo--> - <div class="item item-button-right left" ng-if="formData.computing && formData.pseudo"> - <ion-spinner icon="android"></ion-spinner> - </div> - <div class="text-right" ng-if="!formData.computing"> - <div class="form-error balanced" ng-if="!uiAlreadyUsed && formData.pseudo"> - <i class="icon ion-checkmark balanced"></i> - <span translate>ACCOUNT.NEW.PSEUDO_AVAILABLE</span> - </div> - <div class="form-error" ng-if="uiAlreadyUsed && formData.pseudo"> - <i class="icon ion-close-circled assertive"></i> - <span translate>ACCOUNT.NEW.PSEUDO_NOT_AVAILABLE</span> + <div class="text-right" style="min-height: 18px;"> + <div class="form-error gray" ng-if="formData.computing && formData.pseudo"> + <ion-spinner class="icon ion-spinner-small" icon="android" ng-if="formData.computing && formData.pseudo"></ion-spinner> + <span translate>ACCOUNT.NEW.CHECKING_PSEUDO</span> </div> + + <ng-if ng-if="!formData.computing && formData.pseudo"> + <div class="form-error balanced" ng-if="!uiAlreadyUsed "> + <i class="icon ion-checkmark balanced"></i> + <span translate>ACCOUNT.NEW.PSEUDO_AVAILABLE</span> + </div> + <div class="form-error" ng-if="uiAlreadyUsed"> + <i class="icon ion-close-circled assertive"></i> + <span translate>ACCOUNT.NEW.PSEUDO_NOT_AVAILABLE</span> + </div> + </ng-if> + </div> <div class="padding hidden-xs text-right"> @@ -326,11 +331,9 @@ <ion-content class="has-header" scroll="false"> <!-- Computing --> - <div class="padding text-center" ng-if="formData.computing"> <ion-spinner icon="android"></ion-spinner> </div> - <!-- ng-if="formData.computing" --> <!-- Account available --> <div ng-if="accountAvailable && !formData.computing"> @@ -339,14 +342,8 @@ <div class="list"> <ion-item class="item item-text-wrap item-border"> - <div class="dark pull-right padding-right" ng-if="formData.computing"> - <ion-spinner icon="android"></ion-spinner> - </div> <span class="input-label" translate>COMMON.PUBKEY</span> - <span class="gray text-no-wrap" ng-if="formData.computing" translate> - ACCOUNT.NEW.COMPUTING_PUBKEY - </span> - <span class="gray text-no-wrap" ng-if="formData.pubkey"> + <span class="gray text-no-wrap" copy-on-click="{{formData.pubkey}}"> {{formData.pubkey}} </span> </ion-item> @@ -367,20 +364,14 @@ <ion-item class="item-icon-left item-text-wrap text-center"> <i class="icon ion-minus-circled assertive"></i> - <span id="modal-license" translate>ERROR.EXISTING_ACCOUNT</span> + <span id="modal-license" trust-as-html="'ERROR.EXISTING_ACCOUNT'|translate"></span> </ion-item> <div class="list"> <ion-item class="item item-text-wrap item-border"> - <div class="dark pull-right padding-right" ng-if="formData.computing"> - <ion-spinner icon="android"></ion-spinner> - </div> - <span class="gray text-no-wrap" ng-if="formData.computing" translate> - ACCOUNT.NEW.COMPUTING_PUBKEY - </span> <div class="padding text-center"> - <span class="gray text-no-wrap" ng-if="formData.pubkey"> + <span class="gray text-no-wrap"> {{formData.pubkey}} </span> </div> diff --git a/www/templates/settings/popup_node.html b/www/templates/settings/popup_node.html index 33e23fdf1b1093b39cc5d5397cf80bd4fe1c4665..77756efaae19ef1ff2d745416b72cda93e7e62a0 100644 --- a/www/templates/settings/popup_node.html +++ b/www/templates/settings/popup_node.html @@ -22,12 +22,13 @@ </div> </div> - <small ng-bind-html="'SETTINGS.POPUP_PEER.BTN_SHOW_LIST_HELP' | translate"></small> - - <button class="button button-positive button-clear positive button-outline button-full button-small-padding icon-left ink" ng-click="showNodeList()"> - <i class="icon ion-wifi "></i> - {{'SETTINGS.POPUP_PEER.BTN_SHOW_LIST' | translate}} - </button> + <button type="submit" class="hide"></button> </form> +<small ng-bind-html="'SETTINGS.POPUP_PEER.BTN_SHOW_LIST_HELP' | translate"></small> +<button class="button button-positive button-clear positive button-outline button-full button-small-padding icon-left ink" ng-click="showNodeList()"> + <i class="icon ion-wifi "></i> + {{'SETTINGS.POPUP_PEER.BTN_SHOW_LIST' | translate}} +</button> + diff --git a/www/templates/wallet/view_wallet_tx.html b/www/templates/wallet/view_wallet_tx.html index 4de31b92dea0d911fa7c0f2a9f297ade2e0c5bcc..a2be1f21f9dc2069635edfc3f5f7b35bb99587d9 100644 --- a/www/templates/wallet/view_wallet_tx.html +++ b/www/templates/wallet/view_wallet_tx.html @@ -5,6 +5,8 @@ </ion-nav-title> <ion-nav-buttons side="secondary"> + <cs-extension-point name="nav-buttons"></cs-extension-point> + <button class="button button-icon button-clear icon ion-loop visible-xs visible-sm" ng-click="doUpdate()"> </button> </ion-nav-buttons> @@ -40,6 +42,8 @@ title="{{'COMMON.BTN_REFRESH' | translate}}"> </button> + <cs-extension-point name="buttons"></cs-extension-point> + <button class="button button-calm ink"