diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index bb803194b49ca71bb1de8a1d9b8054ca68615037..ade6d11f79abc88ecb6a39c9d5ada890dcfd308d 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -280,7 +280,7 @@ "VIEW": { "TITLE": "Node", "OWNER": "Owned by ", - "SHOW_RAW_CURRENT_BLOCK": "See current block", + "SHOW_RAW_PEERING": "See peering document", "KNOWN_PEERS": "Known peers :", "GENERAL_DIVIDER": "General information", "ERROR": { diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 458c42acca734b0148ea6b1d3c6f27e9d04b17b4..813d4ffdb503906d5051017ab9d4db51ebd7b1dc 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -280,7 +280,7 @@ "VIEW": { "TITLE": "Node", "OWNER": "Owned by ", - "SHOW_RAW_CURRENT_BLOCK": "See current block", + "SHOW_RAW_PEERING": "See peering document", "KNOWN_PEERS": "Known peers :", "GENERAL_DIVIDER": "General information", "ERROR": { diff --git a/www/i18n/locale-es-ES.json b/www/i18n/locale-es-ES.json index 020e35769031a0ee50199904511092074b2146f2..a29e26658140c4614d37582e5d970489a9a0dbde 100644 --- a/www/i18n/locale-es-ES.json +++ b/www/i18n/locale-es-ES.json @@ -119,12 +119,21 @@ "NETWORK_SETTINGS": "Red", "PEER": "Dirección del nodo Duniter", "USE_LOCAL_STORAGE": "Activar el almacenamiento local", + "USE_LOCAL_STORAGE_HELP": "Permitir el ahorro de almacenamiento local", "ENABLE_HELPTIP": "Activar bocadillos contextuales de ayuda", "ENABLE_UI_EFFECTS": "Activar los efectos visuales", "HISTORY_SETTINGS": "Mi cuenta", "DISPLAY_UD_HISTORY": "Publicar los dividendos producidos ?", "AUTHENTICATION_SETTINGS": "Autenticación", + "AUTO_LOGOUT": "Desconexión automática", + "AUTO_LOGOUT_OPTION_NEVER": "Jamas", + "AUTO_LOGOUT_OPTION_SECONDS": "Después de {{value}} segundos", + "AUTO_LOGOUT_OPTION_MINUTE": "Después de {{value}} minuto", + "AUTO_LOGOUT_OPTION_MINUTES": "Después de {{value}} minutos", + "AUTO_LOGOUT_OPTION_HOUR": "Después de {{value}} hora", + "AUTO_LOGOUT_HELP": "Tiempo de inactividad antes de la desconexión", "REMEMBER_ME": "Recordarme", + "REMEMBER_ME_HELP": "Siempre mantenerse conectado (no recomendado).", "PLUGINS_SETTINGS": "Extensiónes", "BTN_RESET": "Restaurar los valores por defecto" , "EXPERT_MODE": "Activar el modo experto", @@ -269,7 +278,7 @@ "VIEW": { "TITLE": "Nodo", "OWNER": "Propiedad de ", - "SHOW_RAW_CURRENT_BLOCK": "Véase el bloque actual", + "SHOW_RAW_PEERING": "Ver la tarjeta de red", "KNOWN_PEERS": "Nodos conocidos :", "GENERAL_DIVIDER": "Informaciónes generales", "ERROR": { @@ -349,7 +358,13 @@ "PASSWORD_HELP": "Contraseña", "NO_ACCOUNT_QUESTION": "Ahora no tiene cuenta ?", "CREATE_ACCOUNT": "Creer una cuenta", - "FORGOTTEN_ID": "Contraseña olvidada ?" + "FORGOTTEN_ID": "Contraseña olvidada ?", + "AUTO_LOGOUT": { + "TITLE": "Información", + "MESSAGE": "<i class=\"ion-android-time\"></i> Has sido <b>fuera de lÃnea</b> de forma automática, después de una inactividad prolongada.", + "BTN_RELOGIN": "Me vuelva a conectar", + "IDLE_WARNING": "Se le desconectará... {{countdown}}" + } }, "ACCOUNT": { "TITLE": "Mi cuenta", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index eeb7229752f7c8c89b3f65ee463be5f0e2f9acfe..4cb3046c6b2ff2767aef38e7e8a2363ddff1cd11 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -280,7 +280,7 @@ "VIEW": { "TITLE": "NÅ“ud", "OWNER": "Appartient à ", - "SHOW_RAW_CURRENT_BLOCK": "Voir le bloc courant", + "SHOW_RAW_PEERING": "Voir la fiche de pair", "KNOWN_PEERS": "NÅ“uds connus :", "GENERAL_DIVIDER": "Informations générales", "ERROR": { diff --git a/www/i18n/locale-nl-NL.json b/www/i18n/locale-nl-NL.json index cc0da63dfa1b26d76ba79ace1bb16cf0148ab754..e988bd66f0cff722c06cc380c3d8f5b5c1370923 100644 --- a/www/i18n/locale-nl-NL.json +++ b/www/i18n/locale-nl-NL.json @@ -240,7 +240,7 @@ "VIEW": { "TITLE": "Knoop", "OWNER": "Maakt deel uit van", - "SHOW_RAW_CURRENT_BLOCK": "Zie het huidige blok", + "SHOW_RAW_PEERING": "Zie netwerkdocument", "KNOWN_PEERS": "Bekende knopen :", "GENERAL_DIVIDER": "Algemene informatie", "ERROR": { @@ -251,11 +251,14 @@ }, "WOT": { "SEARCH_HELP": "Zoeken (lid of publieke sleutel)", + "SEARCH_INIT_PHASE_WARNING": "Tijdens de pre-registratiefase, het zoeken van lopende registraties <b>kan lang</b> zijn. Dank je wel geduld...", "REGISTERED_SINCE": "Registratie", "REGISTERED_SINCE_BLOCK": "Geregistreerd op blok #", "NO_CERTIFICATION": "Geen gevalideerde certificaties", "NO_GIVEN_CERTIFICATION": "Geen uitgegeven certificaties", "NOT_MEMBER_PARENTHESIS": "(niet-lid)", + "IDENTITY_REVOKED_PARENTHESIS": "(ingetrokken identiteit)", + "MEMBER_PENDING_REVOCATION_PARENTHESIS": "(en cours de révocation)", "EXPIRE_IN": "Verloopt", "NOT_WRITTEN_EXPIRE_IN": "Uiterlijke<br/>behandeling", "EXPIRED": "Verlopen", @@ -263,6 +266,8 @@ "SIGNED_ON_BLOCK": "Uitgegeven op block #{{block}}", "WRITTEN_ON_BLOCK": "Geschreven op block #{{block}}", "GENERAL_DIVIDER": "Algemene informatie", + "NOT_MEMBER_ACCOUNT": "Geen lidaccount", + "NOT_MEMBER_ACCOUNT_HELP": "Dit is een eenvoudige account zonder te wachten lidmaatschap aanvragen.", "TECHNICAL_DIVIDER": "Technishe informatie", "BTN_CERTIFY": "Certificeren", "BTN_YES_CERTIFY": "Ja, Certificeren", diff --git a/www/js/controllers/blockchain-controllers.js b/www/js/controllers/blockchain-controllers.js index 698785cb8b0ec30c2b1609a2ea0da8da7ac18bfd..87c96e52c428dbf2ce7e3d38cb266ad05d09d160 100644 --- a/www/js/controllers/blockchain-controllers.js +++ b/www/js/controllers/blockchain-controllers.js @@ -254,9 +254,6 @@ function BlockLookupController($scope, $timeout, $focus, $filter, $state, $ancho var notFirstEmpty = (index !== 0) || (offset !== 0); var previousNotEmptyOrSameDay = !previousEmptyBlockDay || (previousEmptyBlockDay == blockDay); block.compacted = notFirstEmpty && previousNotEmptyOrSameDay; - if (block.number > 20751) { - console.log(block.number, block.compacted); - } previousEmptyBlockDay = blockDay; } else { diff --git a/www/js/controllers/network-controllers.js b/www/js/controllers/network-controllers.js index 76dc5c02260cea04d777d5dc763116db9f938864..47758b5b3d7be5f05cb96b068b13a78071cf69f7 100644 --- a/www/js/controllers/network-controllers.js +++ b/www/js/controllers/network-controllers.js @@ -409,8 +409,15 @@ function PeerViewController($scope, $q, UIUtils, csWot, BMA) { score += 100 * (p.uid ? 1 : 0); return -score; }); + $scope.motion.show({selector: '.item-peer'}); }); - }) + }), + + // Get current block + $scope.node.blockchain.current() + .then(function(json) { + $scope.current = json; + }) ]) .catch(UIUtils.onError(useTor ? "PEER.VIEW.ERROR.LOADING_TOR_NODE_ERROR" : "PEER.VIEW.ERROR.LOADING_NODE_ERROR")); }; diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 8f0161da04ca297401cf63309edf0b8008ccf849..dffc4a47127c873e0772e61bbdb9c77580ecc8bf 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -18,7 +18,7 @@ angular.module('cesium.bma.services', ['ngResource', 'ngApi', 'cesium.http.servi OUTPUT_FUNCTIONS = OUTPUT_FUNCTION+'([ ]*' + OUTPUT_OPERATOR + '[ ]*' + OUTPUT_FUNCTION +')*', OUTPUT_OBJ = 'OBJ\\(([0-9]+)\\)', OUTPUT_OBJ_OPERATOR = OUTPUT_OBJ + '[ ]*' + OUTPUT_OPERATOR + '[ ]*' + OUTPUT_OBJ, - REGEX_ENDPOINT_PARAMS = "( ([a-z_][a-z0-9-_.]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))", + REGEX_ENDPOINT_PARAMS = "( ([a-z_][a-z0-9-_./]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))", regexp = { USER_ID: "[A-Za-z0-9_-]+", CURRENCY: "[A-Za-z0-9_-]+", @@ -515,7 +515,6 @@ angular.module('cesium.bma.services', ['ngResource', 'ngApi', 'cesium.http.servi } // Try BMATOR matches = exports.regexp.BMATOR_ENDPOINT.exec(endpoint); - console.log("Invalid endpoint:", endpoint); if (matches) { return { "dns": matches[2] || '', diff --git a/www/plugins/graph/i18n/locale-en-GB.json b/www/plugins/graph/i18n/locale-en-GB.json index 67b7b4483126ce2f66a84f336ba7bcce6131dce1..b758ed2fb4dd4362c8d1bd68f72da3501222bd3a 100644 --- a/www/plugins/graph/i18n/locale-en-GB.json +++ b/www/plugins/graph/i18n/locale-en-GB.json @@ -40,7 +40,9 @@ }, "PEER": { "VIEW": { - "BLOCK_COUNT": "Computed blocks count" + "BLOCK_COUNT_LABEL": "Computed blocks count", + "BLOCK_COUNT": "{{count}} blocks", + "NO_BLOCK": "No block" } } } diff --git a/www/plugins/graph/i18n/locale-en.json b/www/plugins/graph/i18n/locale-en.json index 67b7b4483126ce2f66a84f336ba7bcce6131dce1..b758ed2fb4dd4362c8d1bd68f72da3501222bd3a 100644 --- a/www/plugins/graph/i18n/locale-en.json +++ b/www/plugins/graph/i18n/locale-en.json @@ -40,7 +40,9 @@ }, "PEER": { "VIEW": { - "BLOCK_COUNT": "Computed blocks count" + "BLOCK_COUNT_LABEL": "Computed blocks count", + "BLOCK_COUNT": "{{count}} blocks", + "NO_BLOCK": "No block" } } } diff --git a/www/plugins/graph/i18n/locale-es-ES.json b/www/plugins/graph/i18n/locale-es-ES.json index 462cdf1ec2c2962f43fe600a891492f486f937ed..7f4c29ee916499ff450fa2571a1f805fbfb88699 100644 --- a/www/plugins/graph/i18n/locale-es-ES.json +++ b/www/plugins/graph/i18n/locale-es-ES.json @@ -37,6 +37,13 @@ "UD_TITLE": "Evolución del dividendo universales", "MEMBERS_COUNT_TITLE": "Evolución del número de miembros", "MEMBERS_COUNT_LABEL": "Número de miembros" + }, + "PEER": { + "VIEW": { + "BLOCK_COUNT_LABEL": "Número de bloques calculados", + "BLOCK_COUNT": "{{count}} bloques", + "NO_BLOCK": "Ningún bloque" + } } } } diff --git a/www/plugins/graph/i18n/locale-fr-FR.json b/www/plugins/graph/i18n/locale-fr-FR.json index e39f1cc9d75b4ea27c9af1457e877bfc6301582f..7e781d9af9d27b844e56894e71940e1742a4b8e4 100644 --- a/www/plugins/graph/i18n/locale-fr-FR.json +++ b/www/plugins/graph/i18n/locale-fr-FR.json @@ -40,7 +40,9 @@ }, "PEER": { "VIEW": { - "BLOCK_COUNT": "Nombre de blocs calculés" + "BLOCK_COUNT_LABEL": "Nombre de blocs calculés", + "BLOCK_COUNT": "{{count}} blocs", + "NO_BLOCK": "Aucun bloc" } } } diff --git a/www/plugins/graph/templates/network/view_peer_extend.html b/www/plugins/graph/templates/network/view_peer_extend.html index c720b151c20d4a9f310e6569fdfd1a30d69d0045..a2856373c2bc1529cc377c63667ae7d11ca4a563 100644 --- a/www/plugins/graph/templates/network/view_peer_extend.html +++ b/www/plugins/graph/templates/network/view_peer_extend.html @@ -3,12 +3,12 @@ <a class="item item-icon-left item-text-wrap ink" ui-sref="app.view_peer_stats({pubkey: node.pubkey})"> - <i class="icon ion-cube"></i> - <span translate>GRAPH.PEER.VIEW.BLOCK_COUNT</span> + <i class="icon ion-stats-bars"></i> + <span translate>GRAPH.PEER.VIEW.BLOCK_COUNT_LABEL</span> <span class="badge" ng-if="!loading" - ng-class="{'badge-balanced': blockCount > 0, 'badge-assertive': !blockCount}"> - {{blockCount||0}} + ng-class="{'badge-stable': blockCount > 0, 'badge-assertive': !blockCount}"> + {{!blockCount ? 'GRAPH.PEER.VIEW.NO_BLOCK' : 'GRAPH.PEER.VIEW.BLOCK_COUNT' | translate:{count: blockCount} }} </span> <ion-spinner class="badge" icon="android" ng-if="loading"></ion-spinner> </a> diff --git a/www/templates/network/view_peer.html b/www/templates/network/view_peer.html index 6ac963341783a4fe7ca6b0ae99161a84d3028f3e..c8b1ec992c509ffb75a0b90bf8eea2954d013e22 100644 --- a/www/templates/network/view_peer.html +++ b/www/templates/network/view_peer.html @@ -4,83 +4,106 @@ </ion-nav-title> <ion-content class="has-header padding" scroll="true"> - <div class="list"> - - <ion-item> - <h1> - <span translate>PEER.VIEW.TITLE</span> - <span class="gray"> - {{node.host}} - </span> - </h1> - <h2 class="gray"> - <i class="gray icon ion-android-globe"></i> - {{node.bma.dns || node.server}} - <span class="gray" ng-if="node.useSsl"> - <i class="gray ion-locked"></i> <small>SSL</small> - </span> - <span class="gray" ng-if="node.useTor"> - <i class="gray ion-bma-tor-api"></i> - </span> - </h2> - - <!-- node owner --> - <h3> - <span class="dark"> - <i class="icon ion-android-desktop"></i> - {{'PEER.VIEW.OWNER'|translate}} - </span> - <a class="positive" - ng-if="node.uid" - ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.uid})"> - <i class="ion-person"></i> {{node.name || node.uid}} - <span class="gray" ng-if="node.name"> - ({{node.uid}}) + + <div class="row"> + <div class="col col-20 hidden-xs hidden-sm"> + </div> + + <div class="col list"> + + <ion-item> + <h1> + <span translate>PEER.VIEW.TITLE</span> + <span class="gray"> + {{node.host}} </span> - </a> - </h3> + </h1> + <h2 class="gray"> + <i class="gray icon ion-android-globe"></i> + {{node.bma.dns || node.server}} + <span class="gray" ng-if="node.useSsl"> + <i class="gray ion-locked"></i> <small>SSL</small> + </span> + <span class="gray" ng-if="node.useTor"> + <i class="gray ion-bma-tor-api"></i> + </span> + </h2> - <h3> - <a target="_blank" - ng-href="{{(node.useSsl ? 'https://' : 'http://') + node.server}}/blockchain/current"> - <i class="icon ion-share"></i> {{'PEER.VIEW.SHOW_RAW_CURRENT_BLOCK'|translate}} - </a> - </h3> - </ion-item> + <!-- node owner --> + <h3> + <span class="dark"> + <i class="icon ion-android-desktop"></i> + {{'PEER.VIEW.OWNER'|translate}} + </span> + <a class="positive" + ng-if="node.uid" + ui-sref="app.wot_identity({pubkey: node.pubkey, uid: node.uid})"> + <i class="ion-person"></i> {{node.name || node.uid}} + <span class="gray" ng-if="node.name"> + ({{node.uid}}) + </span> + </a> + </h3> + <h3> - <div class="item item-divider" translate> - PEER.VIEW.GENERAL_DIVIDER - </div> + <a target="_blank" + ng-href="{{(node.useSsl ? 'https://' : 'http://') + node.server}}/network/peering"> + <i class="icon ion-share"></i> {{'PEER.VIEW.SHOW_RAW_PEERING'|translate}} + </a> + </h3> + </ion-item> - <ion-item class="item-icon-left item-text-wrap ink" - copy-on-click="{{node.pubkey}}"> - <i class="icon ion-key"></i> - <span translate>COMMON.PUBKEY</span> - <h4 class="dark text-left">{{node.pubkey}}</h4> - </ion-item> - <!-- Allow extension here --> - <cs-extension-point name="general"></cs-extension-point> + <div class="item item-divider" translate> + PEER.VIEW.GENERAL_DIVIDER + </div> - <div class="item item-divider" translate> - PEER.VIEW.KNOWN_PEERS - </div> + <ion-item class="item-icon-left item-text-wrap ink" + copy-on-click="{{node.pubkey}}"> + <i class="icon ion-key"></i> + <span translate>COMMON.PUBKEY</span> + <h4 class="dark text-left">{{node.pubkey}}</h4> + </ion-item> + + <a class="item item-icon-left item-text-wrap ink" + target="_blank" + ng-href="{{(node.useSsl ? 'https://' : 'http://') + node.server}}/blockchain/current"> + <i class="icon ion-cube"></i> + <span translate>BLOCKCHAIN.VIEW.TITLE_CURRENT</span> + <div class="badge badge-calm" ng-if="!loading"> + {{current.number}} + </div> + </a> + + <!-- Allow extension here --> + <cs-extension-point name="general"></cs-extension-point> + + <div class="item item-divider" translate> + PEER.VIEW.KNOWN_PEERS + </div> - <div class="item center" ng-if="loading"> - <ion-spinner class="icon" icon="android"></ion-spinner> + <div class="item center" ng-if="loading"> + <ion-spinner class="icon" icon="android"></ion-spinner> + </div> + + <div class="list no-padding {{::motion.ionListClass}}"> + <a class="item-peer item item-icon-left " + ng-repeat="peer in peers" + ng-class="{ assertive: !peer.online, balanced: peer.online}" + ui-sref="app.view_peer({server: peer.getServer(), ssl: peer.isSsl()})"> + <i class="icon ion-android-desktop"></i> + <b class="ion-android-person" ng-if="peer.uid" style="position: absolute; top: 13px; left: 27px;"></b> + <h3><span ng-class="{ positive: peer.uid }">{{peer.uid || peer.pubkey.substr(0,8)}}</span> <span class="gray">{{peer.dns && ' | ' + peer.dns}}</span></h3> + <h4>{{peer.getServer()}} <span class="gray">| {{'PEER.SIGNED_ON_BLOCK' | translate}}</span> #{{peer.blockNumber}}</h4> + <span class="badge" ng-class="{ 'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock }">{{peer.current.number}}</span> + </a> + </div> </div> - <a class="item-peer item item-icon-left" - ng-repeat="peer in peers" - ng-class="{ assertive: !peer.online, balanced: peer.online }" - ui-sref="app.view_peer({server: peer.getServer(), ssl: peer.isSsl()})"> - <i class="icon ion-android-desktop"></i> - <b class="ion-android-person" ng-if="peer.uid" style="position: absolute; top: 13px; left: 27px;"></b> - <h3><span ng-class="{ positive: peer.uid }">{{peer.uid || peer.pubkey.substr(0,8)}}</span> <span class="gray">{{peer.dns && ' | ' + peer.dns}}</span></h3> - <h4>{{peer.getServer()}} <span class="gray">| {{'PEER.SIGNED_ON_BLOCK' | translate}}</span> #{{peer.blockNumber}}</h4> - <span class="badge" ng-class="{ 'badge-balanced': peer.hasMainConsensusBlock, 'badge-energized': peer.hasConsensusBlock }">{{peer.current.number}}</span> - </a> + <div class="col col-20 hidden-xs hidden-sm"> + </div> </div> + </ion-content> </ion-view>