diff --git a/app/config.json b/app/config.json index 02c3f9ae602d8a33303a8332618f28e7daa80909..92cf4d864e963b6b17122fd13a59290cbdd21d7a 100644 --- a/app/config.json +++ b/app/config.json @@ -4,12 +4,13 @@ "fallbackLanguage": "en", "rememberMe": false, "showUDHistory": false, - "timeout": 4000, + "timeout": 10000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, "useLocalStorage": true, "useRelative": true, "initPhase": false, + "expertMode": false, "helptip": { "enable": true, "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md" @@ -34,12 +35,13 @@ "defaultLanguage": "fr-FR", "rememberMe": false, "showUDHistory": false, - "timeout": 4000, + "timeout": 15000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, "useLocalStorage": true, "useRelative": true, "initPhase": false, + "expertMode": false, "helptip": { "enable": false, "installDocUrl": { @@ -49,7 +51,7 @@ }, "node": { "host": "duniter.le-sou.org", - "port": "9600" + "port": "80" }, "plugins":{ "es": { @@ -73,6 +75,7 @@ "useLocalStorage": true, "useRelative": true, "initPhase": false, + "expertMode": false, "helptip": { "enable": true, "installDocUrl": { diff --git a/www/js/config.js b/www/js/config.js index 1d8cb046752dccbb0af66802a650eac2ef99f756..ece0d2f92a7078a4471f0f98336458089c2c7b58 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -10,33 +10,38 @@ angular.module("cesium.config", []) .constant("csConfig", { "cacheTimeMs": 60000, - "fallbackLanguage": "en", - "rememberMe": false, + "fallbackLanguage": "fr-FR", + "defaultLanguage": "fr-FR", + "rememberMe": true, "showUDHistory": false, - "timeout": 4000, + "timeout": 6000, "timeWarningExpireMembership": 5184000, "timeWarningExpire": 7776000, "useLocalStorage": true, "useRelative": true, "initPhase": false, + "expertMode": false, "helptip": { "enable": true, - "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md" + "installDocUrl": { + "fr-FR": "http://www.le-sou.org/devenir-noeud/", + "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md" + } }, "node": { - "host": "test-net.duniter.fr", - "port": "9201" + "host": "duniter.le-sou.org", + "port": "9600" }, "plugins": { "es": { - "enable": true, - "askEnable": false, + "enable": false, + "askEnable": true, "host": "data.duniter.fr", "port": "80" } }, "version": "0.4.3", - "build": "2016-10-26T16:51:20.222Z", + "build": "2016-10-26T17:17:16.937Z", "newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug" }) diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 9d6e7a2e1c3ce1dfe9e63e3c10bfa41154db8d02..635cab82e2be12c0153fb61676ddc8d66a6a2693 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -415,7 +415,7 @@ function WotIdentityViewController($scope, $state, $timeout, UIUtils, WotService * @param Modals * @constructor */ -function WotCertificationsViewController($scope, $rootScope, $timeout, $translate, csSettings, Wallet, UIUtils, WotService, Modals) { +function WotCertificationsViewController($scope, $rootScope, $timeout, $translate, csConfig, csSettings, Wallet, UIUtils, WotService, Modals) { 'ngInject'; $scope.loading = true; diff --git a/www/js/services/network-services.js b/www/js/services/network-services.js index e30cfa953e9dbb0ea3c8efc364b059ada14325ea..e602fc93cbe11211cc6a966b1e04b03a1007a833 100644 --- a/www/js/services/network-services.js +++ b/www/js/services/network-services.js @@ -1,7 +1,7 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.services']) -.factory('csNetwork', function($rootScope, $q, $interval, $timeout, BMA, Api, csSettings) { +.factory('csNetwork', function($rootScope, $q, $interval, $timeout, BMA, Api, csSettings, UIUtils) { 'ngInject'; factory = function(id) { @@ -129,12 +129,12 @@ angular.module('cesium.network.services', ['ngResource', 'ngApi', 'cesium.bma.se } console.debug('[network] Peer [' + peer.server + '] status [UP] block [' + peer.buid.substring(0, 20) + ']'); - if (csSettings.data.expertMode) { + if (csSettings.data.expertMode && !UIUtils.screen.isSmall()) { // Get Version return node.node.summary() .then(function(res){ peer.version = res && res.duniter && res.duniter.version; - // Get hardship + // Get hardship (if member peer) if (peer.uid) { return node.blockchain.stats.hardship({pubkey: peer.pubkey}) .then(function (res) { diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js index 0669160d242930c4f2edef608896be51346abada..2c6f177e589a28ca5be4ba974b2662cd6b99bdcd 100644 --- a/www/js/services/settings-services.js +++ b/www/js/services/settings-services.js @@ -28,7 +28,7 @@ angular.module('cesium.settings.services', ['ngResource', 'ngApi', 'cesium.confi showUDHistory: true, showLoginSalt: false, initPhase: false, // For currency start (when block #0 not written) - expertMode: true, + expertMode: false, helptip: { enable: true, currency: 0, @@ -130,10 +130,11 @@ angular.module('cesium.settings.services', ['ngResource', 'ngApi', 'cesium.confi angular.merge(data, storedData); // Always force the usage of deffault settings - // This is a workaround for DEV (TODO: implement edition in settings) + // This is a workaround for DEV (TODO: implement edition in settings ?) data.timeWarningExpire = defaultSettings.timeWarningExpire; data.timeWarningExpireMembership = defaultSettings.timeWarningExpireMembership; data.cacheTimeMs = defaultSettings.cacheTimeMs; + data.timeout = defaultSettings.timeout; // Apply the new locale (only if need) if (localeChanged) { diff --git a/www/plugins/es/js/controllers/message-controllers.js b/www/plugins/es/js/controllers/message-controllers.js index 2092312ea5d57a5b955f0c19f114e95c1f38463a..073571ea7539d20a9e1830728f3fc82886b39c1c 100644 --- a/www/plugins/es/js/controllers/message-controllers.js +++ b/www/plugins/es/js/controllers/message-controllers.js @@ -315,7 +315,7 @@ function ESMessageComposeModalController($scope, Modals, UIUtils, CryptoUtils, W } -function ESMessageViewController($scope, $state, $timeout, $translate, $ionicHistory, UIUtils, esModals, esMessage) { +function ESMessageViewController($scope, $state, $timeout, $translate, $ionicHistory, UIUtils, esModals, esMessage, esUser) { 'ngInject'; $scope.formData = {}; @@ -346,9 +346,9 @@ function ESMessageViewController($scope, $state, $timeout, $translate, $ionicHis if (!message.valid) { - return UIUtils.alert.error(!$scope.isUserPubkey(message.pubkey) ? 'MESSAGE.ERROR.USER_NOT_RECIPIENT': 'MESSAGE.ERROR.NOT_AUTHENTICATED_MESSAGE', + return UIUtils.alert.error(!$scope.isUserPubkey(message.recipient) ? 'MESSAGE.ERROR.USER_NOT_RECIPIENT' : 'MESSAGE.ERROR.NOT_AUTHENTICATED_MESSAGE', 'MESSAGE.ERROR.MESSAGE_NOT_READABLE') - .then(function() { + .then(function () { $state.go('app.user_message'); }); } @@ -357,6 +357,15 @@ function ESMessageViewController($scope, $state, $timeout, $translate, $ionicHis $scope.canDelete = true; $scope.loading = false; + // Load avatar and name (and uid) + return esUser.profile.fillAvatars([{pubkey: $scope.formData.issuer}]) + .then(function (idties) { + return idties[0]; + }); + }) + .then(function(member) { + $scope.issuer = member; + // Set Motion (only direct children, to exclude .lazy-load children) $timeout(function () { UIUtils.motion.fadeSlideIn({ diff --git a/www/plugins/es/js/services/user-services.js b/www/plugins/es/js/services/user-services.js index 33ab592e94a89c03d695bcc0a665609c6045e26c..9bd15499c5d29a9433879d3c5785a5b79145a435 100644 --- a/www/plugins/es/js/services/user-services.js +++ b/www/plugins/es/js/services/user-services.js @@ -176,6 +176,11 @@ angular.module('cesium.es.user.services', ['cesium.services', 'cesium.es.http.se ]) .then(function() { if (hits.total === 0) { + _.forEach(datas, function(data) { + if (!data.uid && data[pubkeyAtributeName]) { + data.uid = uidsByPubkey[data[pubkeyAtributeName]]; + } + }); resolve(datas); } else { diff --git a/www/plugins/es/templates/market/view_record.html b/www/plugins/es/templates/market/view_record.html index 7788f0ed419716dbc9f2acf486304f9163b3f18f..bea65d03b67f7d4db62b2e8976f2045e5adc99ea 100644 --- a/www/plugins/es/templates/market/view_record.html +++ b/www/plugins/es/templates/market/view_record.html @@ -44,9 +44,14 @@ <span translate>COMMON.SUBMIT_BY</span> <a ng-class="{'positive': issuer.uid, 'dark': !issuer.uid}" ui-sref="app.wot_view_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"> - <i class="icon" - ng-class="{'ion-person': issuer.uid, 'ion-key': !issuer.uid}"></i> - {{::issuer.name||issuer.uid||issuer.pubkey}} + <ng-if ng-if="issuer.uid"> + <i class="icon ion-person""></i> + {{::issuer.name||issuer.uid}} + </ng-if> + <ng-if ng-if="!issuer.uid"> + <i class="icon ion-key""></i> + {{::issuer.pubkey|formatPubkey}} + </ng-if> </a> <span> {{formData.time|formatFromNow}} diff --git a/www/plugins/es/templates/message/view_message.html b/www/plugins/es/templates/message/view_message.html index 39e3e0b9c67afe5c107ddc05c423dd1e4ad8fbe5..78d32205b1daddb0969c6142b019dce303f54a73 100644 --- a/www/plugins/es/templates/message/view_message.html +++ b/www/plugins/es/templates/message/view_message.html @@ -26,20 +26,20 @@ <ion-list class="animate-fade-slide-in item-text-wrap"> - <div class="item" ng-class="{'item-avatar': formData.avatar}"> - <img ng-if="formData.avatar" class="item-image" ng-src="{{::formData.avatar.src}}"> + <div class="item" ng-class="{'item-avatar': issuer.avatar}"> + <img ng-if="issuer.avatar" class="item-image" ng-src="{{::issuer.avatar.src}}"> <h1 ng-bind-html="formData.title"></h1> <h4> <i class="ion-clock"></i> <span translate>MESSAGE.VIEW.SENDER</span> - <a class="positive" ui-sref="app.wot_view_identity({pubkey:formData.pubkey, uid:formData.uid})"> - <span ng-if="formData.uid"> + <a class="positive" ui-sref="app.wot_view_identity({pubkey:formData.issuer, uid: issuer.name||issuer.uid})"> + <span ng-if="issuer.uid"> <i class="ion-person"></i> - {{::formData.name||formData.uid}} + {{issuer.name||issuer.uid}} </span> - <span ng-if="!formData.uid"> + <span ng-if="!issuer.uid"> <i class="ion-key"></i> - {{::formData.pubkey|formatPubkey}} + {{formData.pubkey|formatPubkey}} </span> </a> <span> diff --git a/www/plugins/es/templates/registry/view_record.html b/www/plugins/es/templates/registry/view_record.html index 7d8f94316497093b6c89a8ac19e9fb19fd9a877f..afb9a250e2c480544fd88ef1215e8a0cd98fb5bb 100644 --- a/www/plugins/es/templates/registry/view_record.html +++ b/www/plugins/es/templates/registry/view_record.html @@ -48,9 +48,14 @@ <span translate>COMMON.SUBMIT_BY</span> <a ng-class="{'positive': issuer.uid, 'dark': !issuer.uid}" ui-sref="app.wot_view_identity({pubkey:issuer.pubkey, uid: issuer.name||issuer.uid})"> - <i class="icon" - ng-class="{'ion-person': issuer.uid, 'ion-key': !issuer.uid}"></i> - {{::issuer.name||issuer.uid||issuer.pubkey}} + <ng-if ng-if="issuer.uid"> + <i class="icon ion-person""></i> + {{::issuer.name||issuer.uid}} + </ng-if> + <ng-if ng-if="!issuer.uid"> + <i class="icon ion-key""></i> + {{issuer.pubkey|formatPubkey}} + </ng-if> </a> <span> {{formData.time|formatFromNow}}