From 666f5db50d0a61005483e66bd09cf63b11893255 Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Tue, 10 Mar 2020 17:13:56 +0100 Subject: [PATCH] [enh] Menu: better layout for large screen [enh] Help tour: adapt tour to the new menu layout (start with wallet, tx, etc.) [enh] Wallet QRCode: faster animation, when click on a QRCOde [enh] Wallet: better explanation in Cesium+ help icon, with new link to Cs+ network view [fix] profile: store HTML description inside a new attribute, to avoid saving it [fix] Locale flag: use local image file [fix] Locale flag: add EO flag - fix #887 [fix] Settings: enable cache persitence option, in small device --- scss/ionic.app.scss | 58 ++++-- www/i18n/locale-en-GB.json | 8 +- www/i18n/locale-en.json | 8 +- www/i18n/locale-eo-EO.json | 5 +- www/i18n/locale-es-ES.json | 5 +- www/i18n/locale-fr-FR.json | 10 +- www/i18n/locale-it-IT.json | 5 +- www/i18n/locale-nl-NL.json | 2 - www/js/controllers/app-controllers.js | 1 + www/js/controllers/help-controllers.js | 175 +++++++++++++----- www/js/controllers/wot-controllers.js | 1 + www/js/services/settings-services.js | 15 +- www/js/services/wallet-services.js | 12 +- www/plugins/es/css/style.css | 3 + www/plugins/es/i18n/locale-en-GB.json | 6 +- www/plugins/es/i18n/locale-en.json | 6 +- www/plugins/es/i18n/locale-eo-EO.json | 4 +- www/plugins/es/i18n/locale-es-ES.json | 4 +- www/plugins/es/i18n/locale-fr-FR.json | 10 +- www/plugins/es/i18n/locale-it-IT.json | 4 +- .../es/js/controllers/profile-controllers.js | 2 +- www/plugins/es/js/services/http-services.js | 17 +- .../es/js/services/profile-services.js | 14 +- www/plugins/es/js/services/wallet-services.js | 15 +- .../es/templates/user/items_profile.html | 8 +- .../templates/wallet/view_wallet_extend.html | 12 +- .../templates/wot/view_identity_extend.html | 1 + www/templates/api/locales_popover.html | 2 +- www/templates/home/home.html | 14 +- www/templates/join/modal_join_member.html | 1 - www/templates/menu.html | 94 ++++++---- www/templates/settings/settings.html | 2 +- www/templates/wallet/view_wallet.html | 1 + www/templates/wallet/view_wallet_tx.html | 3 +- www/templates/wot/view_identity_tx.html | 2 +- 35 files changed, 333 insertions(+), 197 deletions(-) diff --git a/scss/ionic.app.scss b/scss/ionic.app.scss index 4ab2de626..209053a35 100644 --- a/scss/ionic.app.scss +++ b/scss/ionic.app.scss @@ -975,7 +975,9 @@ html, body { -- */ .view-wallet, -.view-identity { +.view-wallet-tx, +.view-identity, +.view-identity-tx { .qrcode { position: absolute; display: block; @@ -987,16 +989,16 @@ html, body { z-index: 1; -webkit-backface-visibility: hidden !important; backface-visibility: hidden !important; - -webkit-transition: all 0.5s ease-out !important; - transition: all 0.5s ease-out !important; + -webkit-transition: all 0.2s ease-in-out !important; + transition: all 0.2s ease-in-out !important; overflow: hidden; img { - display: float; + display: unset; float: right; width: 0; height: 0; z-index: 1; - transition: all 0.5s ease-out !important; + transition: all 0.2s ease-in-out !important; } } @@ -1839,8 +1841,9 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; font-style: italic !important; } + /********** - Screen - Left Menu + Menu **********/ .menu.menu-left { @@ -1869,6 +1872,14 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; .item-menu-disable { color: $dark !important; } + + .item-spacer { + flex: 1 1 auto; + } + + .item-actions { + min-height: 47px !important; + } } @@ -1908,6 +1919,10 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; top: 4px; } + .item-spacer { + display: none; + visibility: hidden; + } // Hide footer on small screen ion-content.has-footer { @@ -1943,17 +1958,24 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; top: calc(env(safe-area-inset-top) + 150px); } } + } -} -/********** - Menu -**********/ +} // Menu for NOT small screens @media screen and (min-width: $screen-sm) { .menu.menu-left { + .list { + height: 100%; + display: flex; + flex-direction: column; + box-sizing: border-box; + flex-wrap: wrap; + justify-content: flex-end; + } + .item.item-divider { min-height: 5px; height: 5px; @@ -1977,6 +1999,7 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; } } + /********** Screen - identity Certifications **********/ @@ -2029,9 +2052,9 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; z-index: 99; } -/********** - Help Tip -**********/ + /********** + Help Tip + **********/ .popover-helptip { background-color: rgba(68, 68, 68, 0.85) !important; @@ -2051,6 +2074,10 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0"; } } +.popover-helptip.popover-bottom { + margin-top: 12px !important; +} + // Empeche les clignotement du backdrop, pendant le feature tour .nobackdrop .popover-backdrop.active { background-color: transparent !important; @@ -2491,6 +2518,11 @@ div[dropzone]:hover { .item { height: 48px; + padding-left: 60px; + + .avatar { + border-radius: 0; + } } } diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 7b4f7c561..748034c2a 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -98,8 +98,6 @@ "CURRENCY": "Currency", "ACCOUNT": "My Account", "WALLETS": "My wallets", - "TRANSFER": "Transfer", - "SCAN": "Scan", "SETTINGS": "Settings", "NETWORK": "Network", "TRANSACTIONS": "My transactions" @@ -886,8 +884,8 @@ "WALLET_RECEIVED_CERTS": "This shows the list of persons that certified you.", "WALLET_CERTIFY": "The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.", "WALLET_CERT_STOCK": "Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.", - "MENU_BTN_TX_MEMBER": "<b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.", - "MENU_BTN_TX": "View the history of <b>your transactions</b> here and send new payments.", + "MENU_BTN_WALLETS": "The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.", + "MENU_BTN_TX": "The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.", "MENU_BTN_WOT": "The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).", "WOT_SEARCH_TEXT_XS": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.", "WOT_SEARCH_TEXT": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.", @@ -901,7 +899,7 @@ "HEADER_BAR_BTN_PROFILE": "Click here to access your <b>user profile</b>", "SETTINGS_CHANGE_UNIT": "You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).", "END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!", - "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below." + "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below." } }, "API" :{ diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 101eb8689..3e9c1021c 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -98,8 +98,6 @@ "CURRENCY": "Currency", "ACCOUNT": "My Account", "WALLETS": "My wallets", - "TRANSFER": "Transfer", - "SCAN": "Scan", "SETTINGS": "Settings", "NETWORK": "Network", "TRANSACTIONS": "My transactions" @@ -886,8 +884,8 @@ "WALLET_RECEIVED_CERTS": "This shows the list of persons that certified you.", "WALLET_CERTIFY": "The button <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> allows selecting an identity and certifying it.<br/><br/>Only users that are <b>already member</b> may certify others.", "WALLET_CERT_STOCK": "Your supply of certifications (to send) is limited to <b>{{sigStock}} certifications</b>.<br/><br/>This supply will replete itself over time, as and when earlier certifications expire.", - "MENU_BTN_TX_MEMBER": "<b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.", - "MENU_BTN_TX": "View the history of <b>your transactions</b> here and send new payments.", + "MENU_BTN_WALLETS": "The menu <b>{{'MENU.WALLETS'|translate}}</b> allows you to add additional wallets that you manage.", + "MENU_BTN_TX": "The menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> allow access to transactions history, and send new payments.", "MENU_BTN_WOT": "The menu <b>{{'MENU.WOT'|translate}}</b> allows searching <b>users</b> of the currency (member or not).", "WOT_SEARCH_TEXT_XS": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>The search will start automatically.", "WOT_SEARCH_TEXT": "To search in the registry, type the <b>first letters of a users pseudonym or public key</b>.<br/><br/>Then hit <b>Enter</b> to start the search.", @@ -901,7 +899,7 @@ "HEADER_BAR_BTN_PROFILE": "Click here to access your <b>user profile</b>", "SETTINGS_CHANGE_UNIT": "You can <b>change the display unit</b> of amounts by clicking here.<br/><br/>- Deactivate the option to show amounts in {{currency|capitalize}}.<br/>- Activate the option for relative amounts in {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (<b>divided</b> by the current Universal Dividend).", "END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!", - "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below." + "END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> below." } }, "API" :{ diff --git a/www/i18n/locale-eo-EO.json b/www/i18n/locale-eo-EO.json index e8287d68e..55541fafc 100644 --- a/www/i18n/locale-eo-EO.json +++ b/www/i18n/locale-eo-EO.json @@ -98,8 +98,6 @@ "CURRENCY": "Mono", "ACCOUNT": "Mia konto", "WALLETS": "Miaj monujoj", - "TRANSFER": "Elspezo", - "SCAN": "Skani", "SETTINGS": "Parametroj", "NETWORK": "Reto", "TRANSACTIONS": "Miaj spezoj" @@ -880,8 +878,7 @@ "WALLET_RECEIVED_CERTS": "AfiÅiÄos ĉi tie la listo de la personoj, kiuj atestis vin.", "WALLET_CERTIFY": "La butono <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> ebligas elekti identecon kaj atesti Äin.<br/><br/>Nur uzantoj <b>jam membroj</b> povas atesti aliajn.", "WALLET_CERT_STOCK": "Via stoko da atestaĵoj (senditaj) estas limigita je <b>{{sigStock}} atestaĵoj</b>.<br/><br/>Tiu stoko plu evoluas laÅ la tempo, samtempe kiam la atestaĵoj malvalidiÄas.", - "MENU_BTN_TX_MEMBER": "La menuo <b>{{'MENU.TRANSACTIONS'|translate}}</b> ebligas konsulti vian konton, la liston de viaj spezoj, kaj sendi pagon.", - "MENU_BTN_TX": "Konsultu ĉi tie <b>la liston de viaj spezoj</b> kaj efektivigu novajn operaciojn.", + "MENU_BTN_TX": "La menuo <b>{{'MENU.TRANSACTIONS'|translate}}</b> ebligas konsulti vian konton, la liston de viaj spezoj, kaj sendi pagon.", "MENU_BTN_WOT": "La menuo <b>{{'MENU.WOT'|translate}}</b> ebligas traserĉi inter la <b>uzantoj</b> de la mono (membroj aÅ ne).", "WOT_SEARCH_TEXT_XS": "Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de pseÅdonimo</b> (aÅ de publika Ålosilo).<br/><br/>La serĉado ekos aÅtomate.", "WOT_SEARCH_TEXT": "Por traserĉi en la kontaro, tajpu la <b>unuajn literojn de de pseÅdonimo</b> (aÅ de publika Ålosilo). <br/><br/>Premu poste sur la klavon <b>Enigi</b> por ekigi la serĉadon.", diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index f57fa6ae9..5773357a5 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -98,8 +98,6 @@ "CURRENCY": "Moneda", "ACCOUNT": "Mi cuenta", "WALLETS": "Mis monederos", - "TRANSFER": "Transferencia", - "SCAN": "Escáner", "SETTINGS": "Configuraciones", "NETWORK": "Red", "TRANSACTIONS": "Mis operaciones" @@ -807,8 +805,7 @@ "WALLET_RECEIVED_CERTS": "Se exhibirá aquà la lista de las personas que le han certificado.", "WALLET_CERTIFY": "El botón <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permite seleccionar una identidad y certificarla.<br/><br/>Sólo usuarios <b>miembros</b> pueden certificar a otros.", "WALLET_CERT_STOCK": "Su stock de certificaciones (emitidas) es limitado a <b>{{sigStock}} certificaciones</b>.<br/><br/>Este stock se renueva con el tiempo, a medida que las certificaciones caducan.", - "MENU_BTN_TX_MEMBER": "El menú <b>{{'MENU.TRANSACTIONS'|translate}}</b> permite consultar su saldo, el historial de sus transacciones y mandar un pago.", - "MENU_BTN_TX": "Consulte aquà <b>el historial de sus transacciones</b> y efectúe nuevas operaciones.", + "MENU_BTN_TX": "El menú <b>{{'MENU.TRANSACTIONS'|translate}}</b> permite consultar su saldo, el historial de sus transacciones y mandar un pago.", "MENU_BTN_WOT": "El menú <b>{{'MENU.WOT'|translate}}</b> permite buscar <b>usuarios</b> de la moneda (miembro o no).", "WOT_SEARCH_TEXT_XS": "Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública).<br/><br/>La búsqueda se iniciará automáticamente.", "WOT_SEARCH_TEXT": "Para buscar en el directorio, escribe las <b>primeras letras de un seudónimo</b> (o de una llave pública). <br/><br/>Luego, pulsa en la tecla <b>Entrada</b> para iniciar la búsqueda.", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 3ed72166b..ba308cb36 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -98,8 +98,6 @@ "CURRENCY": "Monnaie", "ACCOUNT": "Mon compte", "WALLETS": "Mes portefeuilles", - "TRANSFER": "Virement", - "SCAN": "Scanner", "SETTINGS": "Paramètres", "NETWORK": "Réseau", "TRANSACTIONS": "Mes opérations" @@ -871,7 +869,7 @@ "NETWORK_PEERS": "Les <b>nÅ“uds</b> visibles ici correspondent aux <b>ordinateurs qui actualisent et contrôlent</b> la chaine de blocs.<br/><br/>Plus il y a de nÅ“uds, plus la monnaie a une gestion <b>décentralisée</b> et digne de confiance.", "NETWORK_PEERS_BLOCK_NUMBER": "Ce <b>numéro</b> (en vert) indique le <b>dernier bloc validé</b> pour ce nÅ“ud (dernière page écrite dans le grand livre de comptes).<br/><br/>La couleur verte indique que ce bloc est également validé par <b>la plupart des autres nÅ“uds</b>.", "NETWORK_PEERS_PARTICIPATE": "<b>Chaque membre</b>, équipé d'un ordinateur avec Internet, <b>peut participer en ajoutant un nÅ“ud</b>. Il suffit d'<b>installer le logiciel Duniter</b> (libre et gratuit). <a href=\"{{installDocUrl}}\" target=\"_system\">Voir le manuel d'installation >></a>.", - "MENU_BTN_ACCOUNT": "Le menu <b>{{'ACCOUNT.TITLE'|translate}}</b> permet d'accéder à la gestion de votre compte.", + "MENU_BTN_ACCOUNT": "Le menu <b>{{'MENU.ACCOUNT'|translate}}</b> permet d'accéder à la gestion de votre compte.", "MENU_BTN_ACCOUNT_MEMBER": "Consultez ici l'état de votre compte et les informations sur vos certifications.", "WALLET_CERTIFICATIONS": "Cliquez ici pour consulter le détail de vos certifications (reçues et émises).", "WALLET_RECEIVED_CERTIFICATIONS": "Cliquez ici pour consulter le détail de vos <b>certifications reçues</b>.", @@ -886,8 +884,8 @@ "WALLET_RECEIVED_CERTS": "S'affichera ici la liste des personnes qui vous ont certifié.", "WALLET_CERTIFY": "Le bouton <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permet de sélectionner une identité et de la certifier.<br/><br/>Seuls des utilisateurs <b>déjà membres</b> peuvent en certifier d'autres.", "WALLET_CERT_STOCK": "Votre stock de certifications (émises) est limité à <b>{{sigStock}} certifications</b>.<br/><br/>Ce stock se renouvelle avec le temps, au fur et à mesure que les certifications s'invalident.", - "MENU_BTN_TX_MEMBER": "Le menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> permet de consulter votre solde, l'historique vos transactions et d'envoyer un paiement.", - "MENU_BTN_TX": "Consultez ici <b>l'historique de vos transactions</b> et effectuez de nouvelles opérations.", + "MENU_BTN_WALLETS": "Le menu <b>{{'MENU.WALLETS'|translate}}</b> permet d'ajouter des portefeuilles supplémentaires que vous gérer.", + "MENU_BTN_TX": "Le menu <b>{{'MENU.TRANSACTIONS'|translate}}</b> permet de consulter votre solde, l'historique vos transactions et d'envoyer un paiement.", "MENU_BTN_WOT": "Le menu <b>{{'MENU.WOT'|translate}}</b> permet de rechercher parmi les <b>utilisateurs</b> de la monnaie (membres ou non).", "WOT_SEARCH_TEXT_XS": "Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique).<br/><br/>La recherche se lancera automatiquement.", "WOT_SEARCH_TEXT": "Pour rechercher dans l'annuaire, tapez les <b>premières lettres d'un pseudonyme</b> (ou d'une clé publique). <br/><br/>Appuyer ensuite sur <b>Entrée</b> pour lancer la recherche.", @@ -901,7 +899,7 @@ "HEADER_BAR_BTN_PROFILE": "Cliquez ici pour accéder à votre <b>profil utilisateur.</b>", "SETTINGS_CHANGE_UNIT": "Vous pourrez <b>changer d'unité d'affichage</b> des montants en cliquant ci-dessus.<br/><br/>- Désactivez l'option pour un affichage des montants en {{currency|capitalize}}.<br/>- Activez l'option pour un affichage relatif en {{'COMMON.UD'|translate}}<sub>{{currency|abbreviate}}</sub> (tous les montants seront <b>divisés</b> par le Dividende Universel courant).", "END_LOGIN": "Cette visite guidée est <b>terminée</b> !<br/><br/>Bonne continuation à vous, dans le nouveau monde de l'<b>économie libre</b> !", - "END_NOT_LOGIN": "Cette visite guidée est <b>terminée</b> !<br/><br/>Si vous souhaitez rejoindre la monnaie {{currency|capitalize}}, il vous suffira de cliquer sur <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> ci-dessous." + "END_NOT_LOGIN": "Cette visite guidée est <b>terminée</b> !<br/><br/>Si vous souhaitez rejoindre la monnaie {{currency|capitalize}}, il vous suffira de cliquer sur <b>{{'LOGIN.CREATE_FREE_ACCOUNT'|translate}}</b> ci-dessous." } }, "API" :{ diff --git a/www/i18n/locale-it-IT.json b/www/i18n/locale-it-IT.json index 9baa8dacb..a01ec2c4d 100644 --- a/www/i18n/locale-it-IT.json +++ b/www/i18n/locale-it-IT.json @@ -96,8 +96,6 @@ "CURRENCY": "Moneta", "ACCOUNT": "Mio conto", "WALLETS": "I miei portafogli", - "TRANSFER": "Trasferire", - "SCAN": "Scansionare", "SETTINGS": "Impostazioni", "NETWORK": "Rete", "TRANSACTIONS": "Miei pagamenti" @@ -797,8 +795,7 @@ "WALLET_RECEIVED_CERTS": "Questo mostra l'elenco delle persone che ti hanno fatto entrare nella WoT.", "WALLET_CERTIFY": "Questo bottone <b>{{'WOT.BTN_SELECT_AND_CERTIFY'|translate}}</b> permette di selezionare e certificare una identità .<br/><br/>Solo gli utenti <b>che sono già membri</b> possono certificare gli altri.", "WALLET_CERT_STOCK": "Tuo stock di certificazioni da dare è limitato a <b>{{sigStock}} certificazioni</b>.<br/><br/>Questo stock si rifornisce col tempo, man mano che le certificazioni inviate scadono.", - "MENU_BTN_TX_MEMBER": "<b>{{'MENU.TRANSACTIONS'|translate}}</b> permette l'accesso alla cronologia delle transazioni, e permette di fare nuovi bonifici.", - "MENU_BTN_TX": "Visualizza la cronologia <b>delle tue transazioni</b> qui e fai nuovi bonifici.", + "MENU_BTN_TX": "<b>{{'MENU.TRANSACTIONS'|translate}}</b> permette l'accesso alla cronologia delle transazioni, e permette di fare nuovi bonifici.", "MENU_BTN_WOT": "Il menu<b>{{'MENU.WOT'|translate}}</b> permette di cercare <b>utenti</b> della moneta (membri o non).", "WOT_SEARCH_TEXT_XS": "Per fare una ricerca nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>La ricerca inizierà automaticamente.", "WOT_SEARCH_TEXT": "Per cercare nel annuario, digita <b>le prime lettere dello pseudonimo o della chiave pubblica di un utente</b>.<br/><br/>Dopodichè calca <b>Enter</b> per avviare la ricerca.", diff --git a/www/i18n/locale-nl-NL.json b/www/i18n/locale-nl-NL.json index 9949b11df..d82748ff8 100644 --- a/www/i18n/locale-nl-NL.json +++ b/www/i18n/locale-nl-NL.json @@ -87,8 +87,6 @@ "CURRENCY": "Valuta", "CURRENCIES": "Valuta's", "ACCOUNT": "Mijn rekening", - "TRANSFER": "Overmaken", - "SCAN": "Scannen", "SETTINGS": "Instellingen", "NETWORK": "Netwerk", "TRANSACTIONS": "Mijn transacties" diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index c3b9c6957..c14eff369 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -633,6 +633,7 @@ function HomeController($scope, $state, $timeout, $ionicHistory, $translate, $ht $translate.use(langKey); $scope.hideLocalesPopover(); csSettings.data.locale = _.findWhere($scope.locales, {id: langKey}); + csSettings.store(); $scope.loadFeeds(); }; diff --git a/www/js/controllers/help-controllers.js b/www/js/controllers/help-controllers.js index 860dda145..869ff98da 100644 --- a/www/js/controllers/help-controllers.js +++ b/www/js/controllers/help-controllers.js @@ -130,7 +130,7 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim return $scope.executeStep(partName, steps, index+1); }) .catch(function(err) { - if (err && err.message == 'transition prevented') { + if (err && err.message === 'transition prevented') { console.error('ERROR: in help tour [{0}], in step [{1}] -> use large if exists, to prevent [transition prevented] error'.format(partName, index)); } else { @@ -161,120 +161,135 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim $scope.tour = true; $scope.continue = true; - // Currency - return $scope.startCurrencyTour(0, true) - .then(function(endIndex){ - if (!endIndex || $scope.cancelled) return false; - csSettings.data.helptip.currency=endIndex; - csSettings.store(); - return $scope.continue; - }) + // Wallet (if NOT login) + return $scope.startWalletNoLoginTour(0, true) - // Network + // Wallet (if login) .then(function(next){ if (!next) return false; - return $scope.startNetworkTour(0, true) + if (!csWallet.isLogin()) return true; // not login: continue + return $scope.startWalletTour(0, true) .then(function(endIndex){ - if (!endIndex || $scope.cancelled) return false; - csSettings.data.helptip.network=endIndex; + if (!endIndex) return false; + csSettings.data.helptip.wallet=endIndex; csSettings.store(); return $scope.continue; }); }) - // Wot lookup + // Wallet certifications .then(function(next){ if (!next) return false; - return $scope.startWotLookupTour(0, true) + if (!csWallet.isLogin()) return true; // not login: continue + return $scope.startWalletCertTour(0, true) .then(function(endIndex){ - if (!endIndex || $scope.cancelled) return false; - csSettings.data.helptip.wotLookup=endIndex; + if (!endIndex) return false; + csSettings.data.helptip.walletCerts=endIndex; csSettings.store(); return $scope.continue; }); }) - // Wot identity + // My operations (if login) .then(function(next){ if (!next) return false; - return $scope.startWotTour(0, true) + if (!csWallet.isLogin()) return true; // not login: continue + return $scope.startTxTour(0, true) .then(function(endIndex){ - if (!endIndex || $scope.cancelled) return false; - csSettings.data.helptip.wot=endIndex; + if (!endIndex) return false; + csSettings.data.helptip.tx=endIndex; csSettings.store(); return $scope.continue; }); }) - // Identity certifications + // My wallets (if login) .then(function(next){ if (!next) return false; - return $scope.startWotCertTour(0, true) + if (!csWallet.isLogin()) return true; // not login: continue + return $scope.startWalletsTour(0, true) .then(function(endIndex){ if (!endIndex) return false; - csSettings.data.helptip.wotCerts=endIndex; + csSettings.data.helptip.wallets=endIndex; csSettings.store(); return $scope.continue; }); }) - // Wallet (if NOT login) + // Header tour .then(function(next){ if (!next) return false; - return $scope.startWalletNoLoginTour(0, true); + return $scope.startHeaderTour(0, true); }) - // Wallet (if login) + // Settings tour .then(function(next){ if (!next) return false; - if (!csWallet.isLogin()) return true; // not login: continue - return $scope.startWalletTour(0, true) + return $scope.startSettingsTour(0, true); + }) + + // Wot lookup tour + .then(function(next){ + if (!next) return false; + return $scope.startWotLookupTour(0, true) .then(function(endIndex){ - if (!endIndex) return false; - csSettings.data.helptip.wallet=endIndex; + if (!endIndex || $scope.cancelled) return false; + csSettings.data.helptip.wotLookup=endIndex; csSettings.store(); return $scope.continue; }); }) - // Wallet certifications + // Wot identity .then(function(next){ if (!next) return false; - if (!csWallet.isLogin()) return true; // not login: continue - return $scope.startWalletCertTour(0, true) + return $scope.startWotTour(0, true) .then(function(endIndex){ - if (!endIndex) return false; - csSettings.data.helptip.walletCerts=endIndex; + if (!endIndex || $scope.cancelled) return false; + csSettings.data.helptip.wot=endIndex; csSettings.store(); return $scope.continue; }); }) - // My operations (if login) + // Identity certifications .then(function(next){ if (!next) return false; - if (!csWallet.isLogin()) return true; // not login: continue - return $scope.startTxTour(0, true) + return $scope.startWotCertTour(0, true) .then(function(endIndex){ if (!endIndex) return false; - csSettings.data.helptip.tx=endIndex; + csSettings.data.helptip.wotCerts=endIndex; csSettings.store(); return $scope.continue; }); }) - // Header tour + // Currency tour .then(function(next){ if (!next) return false; - return $scope.startHeaderTour(0, true); + + return $scope.startCurrencyTour(0, true) + .then(function(endIndex){ + if (!endIndex || $scope.cancelled) return false; + csSettings.data.helptip.currency=endIndex; + csSettings.store(); + return $scope.continue; + }); }) - // Settings tour + // Network tour .then(function(next){ if (!next) return false; - return $scope.startSettingsTour(0, true); + return $scope.startNetworkTour(0, true) + .then(function(endIndex){ + if (!endIndex || $scope.cancelled) return false; + csSettings.data.helptip.network=endIndex; + csSettings.store(); + return $scope.continue; + }); }) + // Finish tour .then(function(next){ if (!next) return false; @@ -304,7 +319,7 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim bindings: { content: 'HELP.TIP.MENU_BTN_CURRENCY', icon: { - position: 'left' + position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left' } } }); @@ -392,7 +407,8 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim }, hasNext: hasNext }, - timeout: 1200 // need for Firefox + timeout: 1200, // need for Firefox + retry: 2 }); } ]; @@ -434,7 +450,7 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim bindings: { content: 'HELP.TIP.MENU_BTN_NETWORK', icon: { - position: 'left' + position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left' } } }); @@ -529,7 +545,7 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim bindings: { content: 'HELP.TIP.MENU_BTN_WOT', icon: { - position: 'left' + position: UIUtils.screen.isSmall() ? 'left' : 'bottom-left' } }, onError: 'continue' @@ -693,6 +709,32 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim hasNext: hasNext } }); + }, + + function () { + $ionicSideMenuDelegate.toggleLeft(true); + return $scope.showHelpTip('helptip-menu-btn-tx', { + bindings: { + content: 'HELP.TIP.MENU_BTN_TX', + icon: { + position: 'left' + }, + hasNext: hasNext + } + }); + }, + + function () { + $ionicSideMenuDelegate.toggleLeft(true); + return $scope.showHelpTip('helptip-menu-btn-wallets', { + bindings: { + content: 'HELP.TIP.MENU_BTN_WALLETS', + icon: { + position: 'left' + }, + hasNext: hasNext + } + }); } ]; @@ -736,7 +778,9 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim icon: { position: UIUtils.screen.isSmall() ? 'right' : 'center' } - } + }, + timeout: UIUtils.screen.isSmall() ? 2000 : 1000, + retry: 10 }); }); }, @@ -912,7 +956,7 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim $ionicSideMenuDelegate.toggleLeft(true); return $scope.showHelpTip('helptip-menu-btn-tx', { bindings: { - content: csWallet.data.isMember ? 'HELP.TIP.MENU_BTN_TX_MEMBER' : 'HELP.TIP.MENU_BTN_TX', + content: 'HELP.TIP.MENU_BTN_TX', icon: { position: 'left' } @@ -965,6 +1009,30 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim }); }; + /** + * Features tour on My wallets + * @returns {*} + */ + $scope.startWalletsTour = function(startIndex, hasNext) { + + var steps = [ + function () { + $ionicSideMenuDelegate.toggleLeft(true); + return $scope.showHelpTip('helptip-menu-btn-wallets', { + bindings: { + content: 'HELP.TIP.MENU_BTN_WALLETS', + icon: { + position: 'left' + }, + hasNext: hasNext + } + }); + } + ]; + + return $scope.executeStep('my-wallets', steps, startIndex); + }; + /** * header tour * @returns {*} @@ -984,11 +1052,16 @@ function HelpTipController($scope, $state, $window, $ionicSideMenuDelegate, $tim if (UIUtils.screen.isSmall()) return true; // skip for small screen var element = _getProfilBtnElement(); if (!element) return true; + + // If home; add offset because of locales button + var iconStyle = $state.is('app.home') ? 'margin-right: 60px' : undefined; + return $scope.showHelpTip(element, { bindings: { content: 'HELP.TIP.HEADER_BAR_BTN_PROFILE', icon: { - position: 'right' + position: 'right', + style: iconStyle } } }); diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index f7fc54dd4..d336cd29a 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -1137,6 +1137,7 @@ function WotIdentityViewController($scope, $rootScope, $controller, $timeout, $s }; $scope.showQRCode = function(timeout) { + if (!$scope.qrcodeId || !$scope.formData.pubkey) return; // Skip if (!$scope.qrcode) { $scope.qrcode = new QRCode( $scope.qrcodeId, diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js index c7cf9ad9c..403ae8f83 100644 --- a/www/js/services/settings-services.js +++ b/www/js/services/settings-services.js @@ -6,13 +6,13 @@ angular.module('cesium.settings.services', ['ngApi', 'cesium.config']) // Define app locales var locales = [ - {id:'en', label:'English', country: 'us'}, - {id:'en-GB', label:'English (UK)', country: 'gb'}, - {id:'eo-EO', label:'Esperanto'}, - {id:'fr-FR', label:'Français' , country: 'fr'}, - {id:'nl-NL', label:'Nederlands', country: 'nl'}, - {id:'es-ES', label:'Spanish', country: 'es'}, - {id:'it-IT', label:'Italiano', country: 'it'} + {id:'en', label:'English', flag: 'us'}, + {id:'en-GB', label:'English (UK)', flag: 'gb'}, + {id:'eo-EO', label:'Esperanto', flag: 'eo'}, + {id:'fr-FR', label:'Français', flag: 'fr'}, + {id:'nl-NL', label:'Nederlands', flag: 'nl'}, + {id:'es-ES', label:'Spanish', flag: 'es'}, + {id:'it-IT', label:'Italiano', flag: 'it'} ]; var fallbackLocale = csConfig.fallbackLanguage ? fixLocale(csConfig.fallbackLanguage) : 'en'; @@ -90,6 +90,7 @@ angular.module('cesium.settings.services', ['ngApi', 'cesium.config']) wotCerts: 0, wallet: 0, walletCerts: 0, + wallets: 0, header: 0, settings: 0 }, diff --git a/www/js/services/wallet-services.js b/www/js/services/wallet-services.js index 51cf9cc97..6bd6bf47e 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -909,6 +909,9 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se loadFullData = function(fromTime) { data.loaded = false; + var now = Date.now(); + console.debug("[wallet] Loading {{0}} full data...".format(data.pubkey.substr(0,8))); + return $q.all([ // Get requirements @@ -939,6 +942,7 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se }) .then(function() { data.loaded = true; + console.debug("[wallet] Loaded {{0}} full data in {1}s".format(data.pubkey.substr(0,8), Date.now() - now)); return data; }) .catch(function(err) { @@ -954,6 +958,7 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se if (!options.requirements) { return $q.when(data); } + return refreshData(options) .then(function(data) { data.loaded = true; @@ -983,6 +988,9 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se var jobs = []; + var now = Date.now(); + console.debug("[wallet] {0} {{1}} data, with options: ".format(!data.loaded ? 'Loading' : 'Refreshing', data.pubkey.substr(0,8)), options); + // Get requirements if (options.requirements) { // Reset events @@ -1018,9 +1026,11 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se return api.data.raisePromise.load(data) .then(function(){ + console.debug("[wallet] {0} {{1}} data in {2}ms".format(!data.loaded ? 'Loaded' : 'Refreshed', data.pubkey.substr(0,8), Date.now() - now)); + // Compute if full loaded if (!data.loaded) { - data.loaded = data.requirements.loaded && data.sources; + data.loaded = data.requirements.loaded && data.sources && true; } return data; diff --git a/www/plugins/es/css/style.css b/www/plugins/es/css/style.css index edeb37ef8..fafbf6ccc 100644 --- a/www/plugins/es/css/style.css +++ b/www/plugins/es/css/style.css @@ -338,3 +338,6 @@ height: 57px; } +.view-wallet .item-wallet-help a { + text-decoration: underline; +} diff --git a/www/plugins/es/i18n/locale-en-GB.json b/www/plugins/es/i18n/locale-en-GB.json index eec0d9c4f..1df21eafd 100644 --- a/www/plugins/es/i18n/locale-en-GB.json +++ b/www/plugins/es/i18n/locale-en-GB.json @@ -301,8 +301,8 @@ "RECORD_PUBKEY_HELP": "Public key to receive payments" }, "WALLET": { - "REGISTRY_DIVIDER": "Pages", - "REGISTRY_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions." + "PAGE_DIVIDER": "Pages", + "PAGE_DIVIDER_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Loading main activities failed", @@ -320,7 +320,7 @@ }, "PROFILE": { "PROFILE_DIVIDER": "Cesium+ profile", - "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network.", + "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>.", "NO_PROFILE_DEFINED": "No Cesium+ profile", "BTN_ADD": "Create my profile", "BTN_EDIT": "Edit my profile", diff --git a/www/plugins/es/i18n/locale-en.json b/www/plugins/es/i18n/locale-en.json index eec0d9c4f..1df21eafd 100644 --- a/www/plugins/es/i18n/locale-en.json +++ b/www/plugins/es/i18n/locale-en.json @@ -301,8 +301,8 @@ "RECORD_PUBKEY_HELP": "Public key to receive payments" }, "WALLET": { - "REGISTRY_DIVIDER": "Pages", - "REGISTRY_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions." + "PAGE_DIVIDER": "Pages", + "PAGE_DIVIDER_HELP": "Pages refer to activities accepting money or promoting it: local shops, companies, associations, institutions. They are stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Loading main activities failed", @@ -320,7 +320,7 @@ }, "PROFILE": { "PROFILE_DIVIDER": "Cesium+ profile", - "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network.", + "PROFILE_DIVIDER_HELP": "These are ancillary data, stored outside the currency network, in <a ui-sref=\"app.es_network\">the Cesium+ network</a>.", "NO_PROFILE_DEFINED": "No Cesium+ profile", "BTN_ADD": "Create my profile", "BTN_EDIT": "Edit my profile", diff --git a/www/plugins/es/i18n/locale-eo-EO.json b/www/plugins/es/i18n/locale-eo-EO.json index 8572520b2..7cf85343d 100644 --- a/www/plugins/es/i18n/locale-eo-EO.json +++ b/www/plugins/es/i18n/locale-eo-EO.json @@ -351,8 +351,8 @@ "RECORD_PUBKEY_HELP": "Publika Ålosilo por ricevi la pagojn" }, "WALLET": { - "REGISTRY_DIVIDER": "PaÄoj", - "REGISTRY_HELP": "La paÄoj listigas agadojn, kiuj akceptas la liberan monon aÅ helpas Äin: komercoj, entreprenoj, asocioj, institucioj." + "PAGE_DIVIDER": "PaÄoj", + "PAGE_DIVIDER_HELP": "La paÄoj listigas agadojn, kiuj akceptas la liberan monon aÅ helpas Äin: komercoj, entreprenoj, asocioj, institucioj." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Malsukceso por ÅarÄi la liston de la agadoj", diff --git a/www/plugins/es/i18n/locale-es-ES.json b/www/plugins/es/i18n/locale-es-ES.json index 50077c822..b9fd30fa1 100644 --- a/www/plugins/es/i18n/locale-es-ES.json +++ b/www/plugins/es/i18n/locale-es-ES.json @@ -330,8 +330,8 @@ "RECORD_PUBKEY_HELP": "Llave pública de recepción de los pagos" }, "WALLET": { - "REGISTRY_DIVIDER": "Páginas", - "REGISTRY_HELP": "Las páginas se refieren a actividades que aceptan dinero o lo favorecen: empresas, negocios, asociaciones, instituciones." + "PAGE_DIVIDER": "Páginas", + "PAGE_DIVIDER_HELP": "Las páginas se refieren a actividades que aceptan dinero o lo favorecen: empresas, negocios, asociaciones, instituciones." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Fracaso en la carga de la lista de actividades", diff --git a/www/plugins/es/i18n/locale-fr-FR.json b/www/plugins/es/i18n/locale-fr-FR.json index d9373d30d..57bb46601 100644 --- a/www/plugins/es/i18n/locale-fr-FR.json +++ b/www/plugins/es/i18n/locale-fr-FR.json @@ -352,8 +352,8 @@ "RECORD_PUBKEY_HELP": "Clé publique de réception des paiements" }, "WALLET": { - "REGISTRY_DIVIDER": "Pages", - "REGISTRY_HELP": "Les pages référencent des activités acceptant la monnaie ou la favorisant : commerces, entreprises, associations, institutions." + "PAGE_DIVIDER": "Pages", + "PAGE_DIVIDER_HELP": "Les pages référencent des activités acceptant la monnaie ou la favorisant : commerces, entreprises, associations, institutions. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref=\"app.es_network\">le réseau des nÅ“uds Cesium+</a>." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Erreur de chargement de la liste des activités", @@ -371,7 +371,7 @@ }, "PROFILE": { "PROFILE_DIVIDER": "Profil Cesium+", - "PROFILE_DIVIDER_HELP": "Il s'agit de données annexes, stockées en dehors du réseau de la monnaie.", + "PROFILE_DIVIDER_HELP": "Il s'agit de données annexes, optionnelles. Elles sont stockées en dehors du réseau de la monnaie, dans <a ui-sref=\"app.es_network\">le réseau Cesium+</a>.", "NO_PROFILE_DEFINED": "Aucun profil saisi", "BTN_ADD": "Saisir mon profil", "BTN_EDIT": "Editer mon profil", @@ -441,7 +441,7 @@ }, "SUBSCRIPTION": { "SUBSCRIPTION_DIVIDER": "Services en ligne", - "SUBSCRIPTION_DIVIDER_HELP": "Les services en ligne offrent des services supplémentaires optionnels, délégués à un tiers.", + "SUBSCRIPTION_DIVIDER_HELP": "Les services en ligne offrent des services supplémentaires et optionnels, délégués à un perstataire de votre choix. Par exemple, pour recevoir les notifications de paiement par email.", "BTN_ADD": "Ajouter un service", "BTN_EDIT": "Gérer mes services", "NO_SUBSCRIPTION": "Aucun service utilisé", @@ -518,7 +518,7 @@ "ENABLE_REMOTE_STORAGE": "Activer le stockage distant ?", "ENABLE_REMOTE_STORAGE_HELP": "Permet de stockage (chiffré) de vos paramètres sur les noeuds Cesium+", "ENABLE_MESSAGE_TOGGLE": "Activer les messages privés ?", - "PEER": "Adresse du nÅ“ud de données", + "PEER": "NÅ“ud de données Cesium+", "POPUP_PEER": { "TITLE" : "NÅ“ud de données", "HELP" : "Saisissez l'adresse du nÅ“ud que vous voulez utiliser :", diff --git a/www/plugins/es/i18n/locale-it-IT.json b/www/plugins/es/i18n/locale-it-IT.json index e0e79b488..b5394f7b9 100644 --- a/www/plugins/es/i18n/locale-it-IT.json +++ b/www/plugins/es/i18n/locale-it-IT.json @@ -326,8 +326,8 @@ "RECORD_PUBKEY_HELP": "Chiave pubblica per ricevere pagamenti" }, "WALLET": { - "REGISTRY_DIVIDER": "Pagine", - "REGISTRY_HELP": "Le pagine sono un elenco dei profesionisti che accettano o favoriscono: negozi, aziende, associazioni, istituti..." + "PAGE_DIVIDER": "Pagine", + "PAGE_DIVIDER_HELP": "Le pagine sono un elenco dei profesionisti che accettano o favoriscono: negozi, aziende, associazioni, istituti..." }, "ERROR": { "LOAD_CATEGORY_FAILED": "Errore nel caricamento delle attività principali", diff --git a/www/plugins/es/js/controllers/profile-controllers.js b/www/plugins/es/js/controllers/profile-controllers.js index 82a612301..0a98e7d5e 100644 --- a/www/plugins/es/js/controllers/profile-controllers.js +++ b/www/plugins/es/js/controllers/profile-controllers.js @@ -224,7 +224,7 @@ function ESViewEditProfileController($scope, $q, $timeout, $state, $focus, $tran } $scope.walletData.profile = angular.copy(formData); - $scope.walletData.profile.description = esHttp.util.parseAsHtml(formData.description); + $scope.walletData.profile.descriptionHtml = esHttp.util.parseAsHtml(formData.description); } }; diff --git a/www/plugins/es/js/services/http-services.js b/www/plugins/es/js/services/http-services.js index a1fa44289..6c900d376 100644 --- a/www/plugins/es/js/services/http-services.js +++ b/www/plugins/es/js/services/http-services.js @@ -527,8 +527,8 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic delete params.wallet; delete params.walletId; delete params.keypair; - var params = angular.copy(params); - params.pubkey = params.pubkey || wallet.data.pubkey; + var postParams = angular.copy(params); + postParams.pubkey = postParams.pubkey || wallet.data.pubkey; return (wallet.isAuth() ? $q.when(wallet.data) : wallet.auth({silent: true, minData: true})) .then(function() { @@ -543,7 +543,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic var obj = angular.copy(record); delete obj.signature; delete obj.hash; - obj.issuer = params.pubkey; // force keypair pubkey + obj.issuer = postParams.pubkey; // force keypair pubkey if (!obj.version) { obj.version = 2; } @@ -553,6 +553,15 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic fillRecordTags(obj, options.tagFields); } + // Remove unused fields + if (options.ignoreFields) { + _.forEach(options.ignoreFields, function(key) { + if (angular.isDefined(obj[key])) { + delete obj[key]; + } + }); + } + var str = JSON.stringify(obj); return CryptoUtils.util.hash(str) @@ -562,7 +571,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic // Prepend hash+signature str = '{"hash":"{0}","signature":"{1}",'.format(hash, signature) + str.substring(1); // Send data - return postRequest(str, params) + return postRequest(str, postParams) .then(function (id){ // Clear cache diff --git a/www/plugins/es/js/services/profile-services.js b/www/plugins/es/js/services/profile-services.js index 95cbe011e..0addced2f 100644 --- a/www/plugins/es/js/services/profile-services.js +++ b/www/plugins/es/js/services/profile-services.js @@ -69,9 +69,9 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http // avatar profile.avatar = esHttp.image.fromHit(res, 'avatar'); - // description - if (!options.raw) { - profile.description = esHttp.util.parseAsHtml(profile.source.description); + // convert description into html + if (!options.raw && profile.source.description) { + profile.descriptionHtml = esHttp.util.parseAsHtml(profile.source.description); } // Social url must be unique in socials links - Workaround for issue #306: @@ -82,9 +82,9 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http } if (!csWallet.isLogin()) { - // Exclude crypted socials + // Exclude encrypted socials items profile.source.socials = _.filter(profile.source.socials, function(social) { - return social.type != 'curve25519'; + return social.type !== 'curve25519'; }); } else { @@ -383,8 +383,8 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http return { getAvatarAndName: getAvatarAndName, get: getProfile, - add: esHttp.record.post('/user/profile', {tagFields: ['title', 'description']}), - update: esHttp.record.post('/user/profile/:id/_update', {tagFields: ['title', 'description']}), + add: esHttp.record.post('/user/profile', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml']}), + update: esHttp.record.post('/user/profile/:id/_update', {tagFields: ['title', 'description'], ignoreFields: ['enableGeoPoint', 'descriptionHtml']}), remove: esHttp.record.remove("user","profile"), avatar: esHttp.get('/user/profile/:id?_source=avatar'), fillAvatars: fillAvatars, diff --git a/www/plugins/es/js/services/wallet-services.js b/www/plugins/es/js/services/wallet-services.js index 66a8a2405..d8ebc0e5c 100644 --- a/www/plugins/es/js/services/wallet-services.js +++ b/www/plugins/es/js/services/wallet-services.js @@ -71,9 +71,7 @@ angular.module('cesium.es.wallet.services', ['ngResource', 'cesium.platform', 'c } deferred.resolve(data); }) - .catch(function(err){ - deferred.reject(err); - }); + .catch(deferred.reject); return deferred.promise; } @@ -98,12 +96,13 @@ angular.module('cesium.es.wallet.services', ['ngResource', 'cesium.platform', 'c if (profile) { data.name = profile.name; data.avatar = profile.avatar; - data.profile = profile.source; - data.profile.description = profile.description; - console.debug('[ES] [wallet] Loaded full user profile in '+ (Date.now()-now) +'ms'); + data.profile = data.profile || {}; + angular.merge(data.profile, profile.source, {descriptionHtml: profile.descriptionHtml}); + console.debug('[ES] [wallet] Loaded full user profile in {0}ms'.format(Date.now()-now)); } - deferred.resolve(); - }); + deferred.resolve(data); + }) + .catch(deferred.reject); return deferred.promise; } diff --git a/www/plugins/es/templates/user/items_profile.html b/www/plugins/es/templates/user/items_profile.html index 4b8adc618..df675554f 100644 --- a/www/plugins/es/templates/user/items_profile.html +++ b/www/plugins/es/templates/user/items_profile.html @@ -8,13 +8,13 @@ </div> <!-- About me --> -<div class="item item-text-wrap" ng-if="formData.profile.description"> +<div class="item item-text-wrap" ng-if="formData.profile.descriptionHtml"> <span class="gray" translate>PROFILE.DESCRIPTION</span> - <h3 trust-as-html="formData.profile.description"></h3> + <h3 trust-as-html="formData.profile.descriptionHtml"></h3> </div> <!-- Localisation --> -<div class="item" ng-if="formData.profile.address || formData.profile.city" +<div class="item" ng-if="formData.profile && (formData.profile.address || formData.profile.city)" copy-on-click="{{formData.profile.address ? formData.profile.address + ' ' : ''}}{{formData.profile.city}}"> <span class="gray" translate>LOCATION.LOCATION_DIVIDER</span> <h3> @@ -24,7 +24,7 @@ </div> <!-- Socials networks --> -<div class="item" ng-if="formData.profile.socials && formData.profile.socials.length" ng-controller="ESSocialsViewCtrl"> +<div class="item" ng-if="formData.profile && formData.profile.socials && formData.profile.socials.length" ng-controller="ESSocialsViewCtrl"> <span class="gray" translate>PROFILE.SOCIAL_NETWORKS_DIVIDER</span> <div class="list no-padding"> <ion-item ng-repeat="social in formData.profile.socials | filter:filterFn track by social.url " diff --git a/www/plugins/es/templates/wallet/view_wallet_extend.html b/www/plugins/es/templates/wallet/view_wallet_extend.html index ef2db1aa6..213a71a24 100644 --- a/www/plugins/es/templates/wallet/view_wallet_extend.html +++ b/www/plugins/es/templates/wallet/view_wallet_extend.html @@ -33,8 +33,8 @@ </div> - <div class="item item-text-wrap positive item-small-height" ng-show="showProfileHelp"> - <small translate>PROFILE.PROFILE_DIVIDER_HELP</small> + <div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showProfileHelp"> + <small trust-as-html="'PROFILE.PROFILE_DIVIDER_HELP'|translate"></small> </div> <ng-include src="'plugins/es/templates/user/items_profile.html'" ng-init="showName=true"></ng-include> @@ -92,11 +92,11 @@ <!-- page --> <div class="item item-divider item-divider-top-border"> <span> - {{'REGISTRY.WALLET.REGISTRY_DIVIDER' | translate}} + {{'REGISTRY.WALLET.PAGE_DIVIDER' | translate}} <i style="font-size: 12pt; cursor: pointer;" ng-click="showPagesHelp=!showPagesHelp" class="icon positive ion-ios-help-outline" - title="{{'REGISTRY.WALLET.REGISTRY_HELP' | translate}}"></i> + title="{{'REGISTRY.WALLET.PAGE_DIVIDER_HELP' | translate}}"></i> <span> <a class="badge button button-text button-small button-small-padding " @@ -107,8 +107,8 @@ </a> </div> - <div class="item item-text-wrap positive item-small-height" ng-show="showPagesHelp"> - <small translate>REGISTRY.WALLET.REGISTRY_HELP</small> + <div class="item item-text-wrap positive item-small-height item-wallet-help" ng-show="showPagesHelp"> + <small trust-as-html="'REGISTRY.WALLET.PAGE_DIVIDER_HELP'|translate"></small> </div> <div ng-if="!formData.pages.count" diff --git a/www/plugins/es/templates/wot/view_identity_extend.html b/www/plugins/es/templates/wot/view_identity_extend.html index 0c47c382b..0efe64821 100644 --- a/www/plugins/es/templates/wot/view_identity_extend.html +++ b/www/plugins/es/templates/wot/view_identity_extend.html @@ -18,6 +18,7 @@ <!-- Buttons section --> <ng-if ng-if=":state:enable && extensionPoint === 'buttons'"> <button class="button button-stable button-small-padding icon ion-compose" + ng-disabled="loading" ng-click="showNewMessageModal()" title="{{'MESSAGE.BTN_WRITE' | translate}}"> </button> diff --git a/www/templates/api/locales_popover.html b/www/templates/api/locales_popover.html index db706efc4..4a449f2fc 100644 --- a/www/templates/api/locales_popover.html +++ b/www/templates/api/locales_popover.html @@ -6,7 +6,7 @@ class="item item-icon-left ink" ng-click="changeLanguage(l.id)"> <i class="item-image avatar" - style="border-radius: 0; background-image: url(https://www.countryflags.io/{{l.country}}/shiny/64.png)"></i> + style="background-image: url(../img/flag-{{l.flag}}.png)"></i> {{l.label | translate}} </a> diff --git a/www/templates/home/home.html b/www/templates/home/home.html index 85811da2f..7188d7bec 100644 --- a/www/templates/home/home.html +++ b/www/templates/home/home.html @@ -4,11 +4,9 @@ <ion-nav-buttons side="secondary" > <!-- locales --> - <button class="button button-clear hidden-xs hidden-sm gray" + <button class="button button-icon button-clear hidden-xs hidden-sm gray" ng-click="showLocalesPopover($event)" style="align-content: center"> - <img ng-if=":locale:$root.settings.locale.country" - ng-src="https://www.countryflags.io/{{:locale:$root.settings.locale.country}}/shiny/32.png"> - <span ng-if=":locale:!$root.settings.locale.country">{{:locale:$root.settings.locale.label}} </span> + <img ng-src="img/flag-{{:locale:$root.settings.locale.flag}}.png"/> <small class="ion-arrow-down-b"></small> </button> </ion-nav-buttons> @@ -16,7 +14,7 @@ <ion-content class="positive-900-bg circle-bg-dark"> <div class="row no-padding-xs responsive-lg"> - <div class="col col-30 hidden-xs hidden-sm"> </div> + <div class="col col-30 no-padding hidden-xs hidden-sm"> </div> <div class="col text-center no-padding-xs main-container"> <div id="helptip-home-logo" class="logo"></div> @@ -111,10 +109,12 @@ </div> - <div class="col col-30 no-padding"> + <div class="col no-padding" ng-class="{'col-30': !feed, 'col-10': feed}"> + </div> + <div class="col col-30 no-padding" ng-if="feed"> <!-- feed --> - <div ng-if="feed" class="feed padding padding-top"> + <div class="feed padding padding-top"> <h3 class="padding-left"> <i class="icon ion-speakerphone"></i> {{feed.title}} diff --git a/www/templates/join/modal_join_member.html b/www/templates/join/modal_join_member.html index 26f62707f..0f13db9c8 100644 --- a/www/templates/join/modal_join_member.html +++ b/www/templates/join/modal_join_member.html @@ -171,7 +171,6 @@ ng-minlength="8" different-to="formData.pseudo" required> - <!-- different-to="formData.pseudo" --> <input ng-if="showUsername" name="username" type="text" placeholder="{{'LOGIN.SALT_HELP' | translate}}" ng-change="formDataChanged()" diff --git a/www/templates/menu.html b/www/templates/menu.html index 65e5e325c..18dc349fe 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -9,6 +9,7 @@ <ion-nav-buttons side="left"> <button class="button button-icon button-clear icon ion-navicon visible-nomenu" menu-toggle="left" ></button> </ion-nav-buttons> + <ion-nav-buttons side="right" > <!-- current node info --> @@ -97,19 +98,22 @@ <ion-content scroll="false" class="scroll-content ionic-scroll" ng-class="{'overflow-scroll': smallscreen, 'scroll-content-false': !smallscreen}"> <ion-list class="list" ng-class="{'scroll': smallscreen}"> - <!-- Home --> + <!-- ************ --> + <!-- Home section --> + <!-- ************ --> <ion-item menu-close class="item-icon-left hidden-xs" ui-sref="app.home" active-link="active"> <i class="icon ion-home"></i> {{:locale:'MENU.HOME'|translate}} </ion-item> <ion-item menu-close - ng-if="!login" class="item-icon-left visible-xs" ui-sref="app.home" active-link="active"> <i class="icon ion-home"></i> {{:locale:'MENU.HOME'|translate}} </ion-item> - <!-- USER Section --> + <!-- ************ --> + <!-- User Section --> + <!-- ************ --> <div class="item item-divider"></div> <a menu-close @@ -144,56 +148,97 @@ <i class="icon-secondary ion-card" style="top: 22px; left: 19px; font-size: 20px; background-color: white; width:17px; height: 14px;"></i> {{:locale:'MENU.WALLETS'|translate}} </a> + <a id="helptip-menu-btn-wallets"></a> + + <div class="item item-divider visible-xs visible-sm"></div> + + <!-- Allow extension here --> + <cs-extension-point name="menu-user"></cs-extension-point> + + + <!-- *************** --> + <!-- Actions section --> + <!-- *************** --> + <div class="item item-divider" ng-if="login"></div> + + <ion-item menu-close class="item item-actions item-button-right" ng-if="login" + ng-class="::{'item-button-left': $root.device.barcode.enable}"> + <!-- transfer --> + <button + class="button button-positive ink-dark" + ng-click="showTransferModal()" + title="{{:locale:'COMMON.BTN_SEND_MONEY'|translate}}"> + <i class="icon ion-paper-airplane"></i> + </button> + + <!-- scan QR code --> + <button class="button button-stable ink" + ng-if="$root.device.barcode.enable" + ng-click="scanQrCodeAndGo()"> + <i class="icon ion-qr-scanner"></i> + </button> + </ion-item> + + <cs-extension-point name="menu-actions"></cs-extension-point> + + <!-- Spacer (large screen only) --> + <div class="item-spacer"></div> - <!-- MAIN Section --> + <!-- ************ --> + <!-- Main section --> + <!-- ************ --> <div class="item item-divider"></div> + <!-- Help tour (NOT ready yet for small device) --> + <a class="item item-icon-left hidden-xs hidden-sm" + ng-show="!login" + ng-click="startHelpTour()" > + <i class="icon ion-easel"></i> + {{:locale:'COMMON.BTN_HELP_TOUR'|translate}} + </a> + <a menu-close class="item item-icon-left" + id="helptip-menu-btn-wot" active-link="active" active-link-path-prefix="#/app/wot" ui-sref="app.wot_lookup.tab_search"> <i class="icon ion-person-stalker"></i> {{:locale:'MENU.WOT'|translate}} </a> - <a id="helptip-menu-btn-wot"></a> <!-- Allow extension here --> <cs-extension-point name="menu-main"></cs-extension-point> - <!-- POWER USER Section --> - <div class="item item-divider"></div> + <!-- **************** --> + <!-- Discover section --> + <!-- **************** --> <a menu-close class="item item-icon-left" + id="helptip-menu-btn-currency" active-link="active" active-link-path-prefix="#/app/currency" ui-sref="app.currency"> <i class="icon ion-ios-world-outline"></i> {{:locale:'MENU.CURRENCY'|translate}} </a> - <a id="helptip-menu-btn-currency"></a> <a menu-close class="item item-icon-left hidden-xs hidden-sm" + id="helptip-menu-btn-network" active-link="active" active-link-path-prefix="#/app/network" ui-sref="app.network"> <i class="icon ion-cloud"></i> {{:locale:'MENU.NETWORK'|translate}} </a> - <a id="helptip-menu-btn-network"></a> <!-- Allow extension here --> <cs-extension-point name="menu-discover"></cs-extension-point> - - <div class="item item-divider visible-xs visible-sm"></div> - <!-- Allow extension here --> - <cs-extension-point name="menu-user"></cs-extension-point> - <a menu-close class="item item-icon-left visible-xs visible-sm" active-link="active" @@ -204,28 +249,7 @@ </a> <a id="helptip-menu-btn-settings"></a> - <!-- actions divider --> - <div class="item item-divider" ng-if="login"></div> - - <ion-item menu-close class="item item-button-right" ng-if="login" - ng-class="::{'item-button-left': $root.device.barcode.enable}"> - <!-- transfer --> - <button - class="button button-positive ink-dark" - ng-click="showTransferModal()"> - <i class="icon ion-paper-airplane"></i> - </button> - - <!-- scan QR code --> - <button class="button button-stable ink" - ng-if="$root.device.barcode.enable" - ng-click="scanQrCodeAndGo()"> - <i class="icon ion-qr-scanner"></i> - </button> - </ion-item> - - <cs-extension-point name="menu-actions"></cs-extension-point> </ion-list> diff --git a/www/templates/settings/settings.html b/www/templates/settings/settings.html index 9c11718ca..b3bb0d9a9 100644 --- a/www/templates/settings/settings.html +++ b/www/templates/settings/settings.html @@ -91,7 +91,7 @@ </div> <!-- Persist cache ? --> - <div class="item item-text-wrap item-toggle dark hidden-xs hidden-sm"> + <div class="item item-text-wrap item-toggle dark"> <div class="input-label" ng-class="{'gray': !formData.useLocalStorage}" ng-bind-html="'SETTINGS.PERSIST_CACHE' | translate"></div> <h4 class="gray" ng-bind-html="'SETTINGS.PERSIST_CACHE_HELP' | translate"></h4> diff --git a/www/templates/wallet/view_wallet.html b/www/templates/wallet/view_wallet.html index 0b1e7d4cb..dc99fab90 100644 --- a/www/templates/wallet/view_wallet.html +++ b/www/templates/wallet/view_wallet.html @@ -85,6 +85,7 @@ <div class="hidden-xs hidden-sm padding text-center" ng-if="!loading"> <button class="button button-stable button-small-padding icon ion-android-share-alt ink" + ng-disabled="loading" ng-click="showSharePopover($event)" title="{{'COMMON.BTN_SHARE' | translate}}"> </button> diff --git a/www/templates/wallet/view_wallet_tx.html b/www/templates/wallet/view_wallet_tx.html index 190cb36b9..2090f10d3 100644 --- a/www/templates/wallet/view_wallet_tx.html +++ b/www/templates/wallet/view_wallet_tx.html @@ -1,5 +1,4 @@ -<ion-view left-buttons="leftButtons" - class="view-wallet-tx"> +<ion-view left-buttons="leftButtons" class="view-wallet-tx"> <ion-nav-title> <!-- no title on large screen--> <span class="visible-xs visible-sm" translate> diff --git a/www/templates/wot/view_identity_tx.html b/www/templates/wot/view_identity_tx.html index b7ec06d98..944309fea 100644 --- a/www/templates/wot/view_identity_tx.html +++ b/www/templates/wot/view_identity_tx.html @@ -1,4 +1,4 @@ -<ion-view left-buttons="leftButtons"> +<ion-view left-buttons="leftButtons" class="view-identity-tx"> <ion-nav-title> <span class="visible-xs visible-sm" ng-if="!loading"> <span ng-if="formData.name || formData.uid">{{formData.name || formData.uid}} </span> -- GitLab