diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2022-03-18 20:03:06 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2022-03-18 20:03:06 +0300 |
commit | be674db53195540439cfba107d61b62ca60e8fe0 (patch) | |
tree | 41ae13f65970d20e2b876cbf67cd9bbffa6b09c1 | |
parent | d7fc9d15abf97b7e109f453f54483fba51ee1fc1 (diff) |
apply review feedbackvue-multisites-site
-rw-r--r-- | plugins/CoreHome/vue/dist/CoreHome.umd.js | 4 | ||||
-rw-r--r-- | plugins/CoreHome/vue/dist/CoreHome.umd.min.js | 2 | ||||
-rw-r--r-- | plugins/CoreHome/vue/src/getFormattedEvolution.ts | 4 | ||||
-rw-r--r-- | plugins/CoreVue/types/index.d.ts | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index e39a6a8251..f5ecb673d4 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -11991,6 +11991,8 @@ window.angular.module('piwikApp').directive('piwikAjaxForm', piwikAjaxForm); * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ + + function calculateEvolution(currentValue, pastValue) { var pastValueParsed = parseInt(pastValue, 10); var currentValueParsed = parseInt(currentValue, 10) - pastValueParsed; @@ -12008,7 +12010,7 @@ function calculateEvolution(currentValue, pastValue) { } function formatEvolution(evolution) { - return "".concat(evolution > 0 ? '+' : '').concat(Math.round(evolution), "}%"); + return "".concat(evolution > 0 ? Matomo_Matomo.numbers.symbolPlus : '').concat(Math.round(evolution), "}%"); } function getFormattedEvolution(currentValue, pastValue) { diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 124d862490..1c6a9a1022 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -554,7 +554,7 @@ function du(){return{restrict:"A",link:function(e,t){uu.mounted(t[0])}}}window.a * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function ku(e,t){var n,r=parseInt(t,10),i=parseInt(e,10)-r;return n=0===i||Number.isNaN(i)?0:0===r||Number.isNaN(r)?100:i/r*100,n}function Su(e){return"".concat(e>0?"+":"").concat(Math.round(e),"}%")}function Cu(e,t){var n=ku(e,t);return Su(n)} +function ku(e,t){var n,r=parseInt(t,10),i=parseInt(e,10)-r;return n=0===i||Number.isNaN(i)?0:0===r||Number.isNaN(r)?100:i/r*100,n}function Su(e){return"".concat(e>0?S.numbers.symbolPlus:"").concat(Math.round(e),"}%")}function Cu(e,t){var n=ku(e,t);return Su(n)} /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/src/getFormattedEvolution.ts b/plugins/CoreHome/vue/src/getFormattedEvolution.ts index 40aa032e9e..84b8e57dec 100644 --- a/plugins/CoreHome/vue/src/getFormattedEvolution.ts +++ b/plugins/CoreHome/vue/src/getFormattedEvolution.ts @@ -5,6 +5,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ +import Matomo from './Matomo/Matomo'; + function calculateEvolution(currentValue: string|number, pastValue: string|number) { const pastValueParsed = parseInt(pastValue as string, 10); const currentValueParsed = parseInt(currentValue as string, 10) - pastValueParsed; @@ -23,7 +25,7 @@ function calculateEvolution(currentValue: string|number, pastValue: string|numbe } function formatEvolution(evolution: number) { - return `${evolution > 0 ? '+' : ''}${Math.round(evolution)}}%`; + return `${evolution > 0 ? Matomo.numbers.symbolPlus : ''}${Math.round(evolution)}}%`; } export default function getFormattedEvolution( diff --git a/plugins/CoreVue/types/index.d.ts b/plugins/CoreVue/types/index.d.ts index bb3b9d1fca..abef59d415 100644 --- a/plugins/CoreVue/types/index.d.ts +++ b/plugins/CoreVue/types/index.d.ts @@ -147,6 +147,7 @@ declare global { hasSuperUserAccess: boolean; language: string; cacheBuster: string; + numbers: Record<string, string>; updatePeriodParamsFromUrl(): void; updateDateInTitle(date: string, period: string): void; |