Mercurial > gemma
changeset 4267:c5642480eb9b
styles: rename 'currency' to recency
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 27 Aug 2019 14:30:30 +0200 |
parents | fbe2f1aa2757 |
children | 5738cf79a0be |
files | client/src/components/identify/Identify.vue client/src/components/map/styles.js |
diffstat | 2 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/identify/Identify.vue Tue Aug 27 14:22:45 2019 +0200 +++ b/client/src/components/identify/Identify.vue Tue Aug 27 14:30:30 2019 +0200 @@ -46,10 +46,10 @@ <font-awesome-icon icon="caret-up" fixed-width - :style="{ color: currencyColor(feature), 'font-size': 'x-large' }" + :style="{ color: recencyColor(feature), 'font-size': 'x-large' }" /> <small class="my-auto"> - {{ currency(feature) }} + {{ recency(feature) }} </small> </div> <small @@ -161,7 +161,12 @@ import classifications from "../../lib/classifications"; import { styleFactory } from "@/components/map/styles"; -const { currencyColorCodes } = styleFactory(); +const { + recencyColorCodes + // gmAvailabilityColorCodes, + // forecastAccuracyColorCodes, + // forecastVsRealityColorCodes +} = styleFactory(); export default { name: "identify", @@ -178,7 +183,7 @@ } }, methods: { - currency(feature) { + recency(feature) { const revisitingFactor = this.config.bn_revtime_multiplier; const messagesPerState = { OK: this.$gettext("Data within the revisiting time"), @@ -190,8 +195,8 @@ }; return messagesPerState[classifications.surveyCurrency(feature)]; }, - currencyColor(feature) { - return currencyColorCodes[classifications.surveyCurrency(feature)]; + recencyColor(feature) { + return recencyColorCodes[classifications.surveyCurrency(feature)]; }, showBottleneckMeta(feature) { const result = /bottleneck/.test(feature.getId().toLowerCase());
--- a/client/src/components/map/styles.js Tue Aug 27 14:22:45 2019 +0200 +++ b/client/src/components/map/styles.js Tue Aug 27 14:30:30 2019 +0200 @@ -130,7 +130,7 @@ }; const styleFactory = function(mapId) { - const currencyColorCodes = { + const recencyColorCodes = { OK: "lime", WARNING: "yellow", DANGER: "red", @@ -156,7 +156,7 @@ NEUTRAL: "white" }; return { - currencyColorCodes: currencyColorCodes, + recencyColorCodes: recencyColorCodes, gmAvailabilityColorCodes: gmAvailabilityColorCodes, forecastAccuracyColorCodes: forecastAccuracyColorCodes, forecastVsRealityColorCodes: forecastVsRealityColorCodes, @@ -308,7 +308,7 @@ feature.getId().indexOf("bottlenecks") > -1 ) { let colorUniformTriangle = - currencyColorCodes[classifications.surveyCurrency(feature)]; + recencyColorCodes[classifications.surveyCurrency(feature)]; let frame = `<polyline points='16,0 32,28 0,28 16,0' stroke='grey' stroke-width='1' fill='${colorUniformTriangle}'/>`; let svg = `data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='28'><g>${frame}</g></svg>`; s.push(