diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 55ab7c690aaac646b520f2ed6fa1d1de8ef672a3..69b1526a378a02d6c72997d1b020733e93f4bcc5 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -35,6 +35,7 @@ "BTN_OPTIONS": "Options", "BTN_HELP_TOUR": "Features tour", "BTN_HELP_TOUR_SCREEN": "Discover this screen", + "DAYS": "days", "NO_ACCOUNT_QUESTION": "Not a member yet? Register now!", "SEARCH_NO_RESULT": "No result found", "LOADING": "Loading...", @@ -195,6 +196,10 @@ "MONEY_RULES_DIVIDER": "Rules of currency", "C_RULE": "Growth", "UD_RULE": "Universal dividend (formula)", + "DT_REEVAL": "Period between two re-evaluation of the UD", + "REEVAL_SYMBOL": "reeval", + "DT_REEVAL_VALUE": "Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})", + "UD_REEVAL_TIME0": "Date of first reevaluation of the UD", "SIG_QTY_RULE": "Required number of certifications to become a member", "SIG_STOCK": "Maximum number of certifications sent by a member", "SIG_PERIOD": "Minimum delay between 2 certifications sent by one and the same issuer.", diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 1d878e1a45c7878b9e14af306f9280372ad0eb56..81c8517ad9316703c8b6c22cc190f7f6d01e71a2 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -35,6 +35,7 @@ "BTN_OPTIONS": "Options", "BTN_HELP_TOUR": "Features tour", "BTN_HELP_TOUR_SCREEN": "Discover this screen", + "DAYS": "days", "NO_ACCOUNT_QUESTION": "Not a member yet? Register now!", "SEARCH_NO_RESULT": "No result found", "LOADING": "Loading...", @@ -195,6 +196,10 @@ "MONEY_RULES_DIVIDER": "Rules of currency", "C_RULE": "Growth", "UD_RULE": "Universal dividend (formula)", + "DT_REEVAL": "Period between two re-evaluation of the UD", + "REEVAL_SYMBOL": "reeval", + "DT_REEVAL_VALUE": "Every <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})", + "UD_REEVAL_TIME0": "Date of first reevaluation of the UD", "SIG_QTY_RULE": "Required number of certifications to become a member", "SIG_STOCK": "Maximum number of certifications sent by a member", "SIG_PERIOD": "Minimum delay between 2 certifications sent by one and the same issuer.", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 6e59b4a6230df752031eced99a16da990f8c7c9f..07a2fb2aef734544ffdcef7c40e0014ebb0a8156 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -35,6 +35,7 @@ "BTN_OPTIONS": "Options", "BTN_HELP_TOUR": "Visite guidée", "BTN_HELP_TOUR_SCREEN": "Découvrir cet écran", + "DAYS": "jours", "NO_ACCOUNT_QUESTION": "Pas de encore membre ? Créer un compte !", "SEARCH_NO_RESULT": "Aucun résultat trouvé", "LOADING": "Veuillez patienter...", @@ -194,7 +195,11 @@ "POW_MIN": "Niveau minimal de difficulté de calcul", "MONEY_RULES_DIVIDER": "Règles de la monnaie", "C_RULE": "Croissance théorique", - "UD_RULE": "Dividende universel (formule)", + "UD_RULE": "Calcul du dividende universel", + "DT_REEVAL": "Période de revalorisation du DU", + "REEVAL_SYMBOL": "reval", + "DT_REEVAL_VALUE": "Tous les <b>{{dtReeval|formatDuration}}</b> ({{dtReeval/86400}} {{'COMMON.DAYS'|translate}})", + "UD_REEVAL_TIME0": "Date de la 1ère revalorisation", "SIG_QTY_RULE": "Nombre de certifications requises pour devenir membre", "SIG_STOCK": "Nombre maximal de certifications émises par membre", "SIG_PERIOD": "Délai minimal d'attente entre 2 certifications successives émises par une même personne", diff --git a/www/js/config.js b/www/js/config.js index 7e3d5ab7b62a97e04241484d31898c9db2a5f51f..e4d2aa982de14eed38755fc8ee4897454c429c4b 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -45,7 +45,7 @@ angular.module("cesium.config", []) } }, "version": "0.11.3", - "build": "2017-03-10T12:21:33.425Z", + "build": "2017-03-13T13:44:59.007Z", "newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug" }) diff --git a/www/js/controllers/currency-controllers.js b/www/js/controllers/currency-controllers.js index 4ac0a9d3a97b1e7a3af47af0c76191f2a474f6d5..48760e21d564027229b34df19923035cb4a62d1a 100644 --- a/www/js/controllers/currency-controllers.js +++ b/www/js/controllers/currency-controllers.js @@ -191,7 +191,8 @@ function CurrencyViewController($scope, $q, $timeout, BMA, UIUtils, csSettings, xpercent: 0, durationFromLastUD: 0, blockUid: null, - peerCount: 0 + dtReeval: 0, + udReevalTime0: 0 }; $scope.node = null; $scope.loading = true; @@ -259,6 +260,14 @@ function CurrencyViewController($scope, $q, $timeout, BMA, UIUtils, csSettings, data.stepMax = json.stepMax; data.xpercent = json.xpercent; data.avgGenTime = json.avgGenTime; + data.dtReeval = json.dtReeval; + data.udTime0 = json.udTime0; + data.udReevalTime0 = json.udReevalTime0; + + // Compat with Duniter < 1.0 + if (!data.dtReeval) { + data.dtReeval = data.dt; + } }), // Get the current block informations diff --git a/www/templates/currency/items_parameters.html b/www/templates/currency/items_parameters.html index 09d762a30282244a2fc79809ed9897d7d1e92ed7..0d5748a051e43078dabb61a7dea60b086766a513 100644 --- a/www/templates/currency/items_parameters.html +++ b/www/templates/currency/items_parameters.html @@ -80,13 +80,48 @@ <span translate>CURRENCY.VIEW.C_RULE</span> <span class="gray">(c)</span> </div> - <span class="badge badge-stable" ng-if="!loading">{{formData.c*100 | formatNumeral: '0,0.00'}} % / {{formData.dt | formatPeriod}}</span> + <!-- compat with Duniter 0.90 --> + <span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{formData.c*100 | formatNumeral: '0,0.00'}} % / {{formData.dt | formatPeriod}}</span> + <!-- Duniter 1.0+ --> + <span class="item-note dark" ng-if="!loading && formData.udReevalTime0">{{formData.c*100 | formatNumeral: '0,0.00'}} % / {{formData.dtReeval | formatDuration}}</span> + </ion-item> + + <!-- only Duniter 1.0+ --> + <ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0"> + <i class="icon ion-load-c"></i> + <b class="ion-clock icon-secondary" style="font-size: 18px; left: 36px; top: -12px;"></b> + <div class="col col-60"> + <span translate>CURRENCY.VIEW.DT_REEVAL</span> + <span class="gray">(dt<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub>)</span> + </div> + <span class="item-note dark" ng-if="!loading" + translate="CURRENCY.VIEW.DT_REEVAL_VALUE" + translate-values="formData"> + </span> + </ion-item> + + <!-- only Duniter 1.0+ --> + <ion-item class="item-icon-left item-text-wrap" ng-if="formData.udReevalTime0"> + <i class="icon ion-load-c"></i> + <b class="ion-calendar icon-secondary" style="font-size: 18px; left: 36px; top: -12px;"></b> + <div class="col col-60"> + <span translate>CURRENCY.VIEW.UD_REEVAL_TIME0</span> + <span class="gray">(t0<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub>)</span> + </div> + <span class="item-note dark" ng-if="!loading">{{formData.udReevalTime0|formatDate}} + </span> </ion-item> <ion-item class="item-icon-left item-text-wrap"> - <i class="icon ion-load-c"></i> - <span class="col col-60" translate>CURRENCY.VIEW.UD_RULE</span> - <span class="item-note dark" ng-if="!loading">{{'COMMON.UD'|translate}}<sub>t-1</sub> + c<sup>2</sup> * M<sub>t-1</sub>/N<sub>t-1</sub></span> + <i class="icon ion-load-c"></i> + <div class="col col-60"> + <span translate>CURRENCY.VIEW.UD_RULE</span> + <span class="gray" ng-if="formData.udReevalTime0">- {{'COMMON.UD'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub>)</span> + </div> + <!-- compat with Duniter 0.90 --> + <span class="item-note dark" ng-if="!loading && !formData.udReevalTime0">{{'COMMON.UD'|translate}}<sub>t-1</sub> + c<sup>2</sup> * M<sub>t-1</sub>/N<sub>t-1</sub></span> + <!-- Duniter 1.0+ --> + <span class="item-note dark" ng-if="!loading && formData.udReevalTime0">{{'COMMON.UD'|translate}}<sub>{{formData.dt|formatPeriod}}</sub>(t<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub> - dt<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub>)+ c<sup>2</sup> * (M/N)(t<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub> - dt<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub>) / dt<sub>{{'CURRENCY.VIEW.REEVAL_SYMBOL'|translate}}</sub></span> </ion-item> </div>