Merge master
This commit is contained in:
commit
daa23fad95
6 changed files with 51 additions and 34 deletions
|
@ -50,6 +50,22 @@ export class ChangesetHandler {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new list which contains every key at most once
|
||||||
|
*/
|
||||||
|
public static removeDuplicateMetaTags(extraMetaTags: ChangesetTag[]): ChangesetTag[]{
|
||||||
|
const r : ChangesetTag[] = []
|
||||||
|
const seen = new Set<string>()
|
||||||
|
for (const extraMetaTag of extraMetaTags) {
|
||||||
|
if(seen.has(extraMetaTag.key)){
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
r.push(extraMetaTag)
|
||||||
|
seen.add(extraMetaTag.key)
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inplace rewrite of extraMetaTags
|
* Inplace rewrite of extraMetaTags
|
||||||
* If the metatags contain a special motivation of the format "<change-type>:node/-<number>", this method will rewrite this negative number to the actual ID
|
* If the metatags contain a special motivation of the format "<change-type>:node/-<number>", this method will rewrite this negative number to the actual ID
|
||||||
|
@ -95,7 +111,7 @@ export class ChangesetHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
extraMetaTags = [...extraMetaTags, ...this.defaultChangesetTags()]
|
extraMetaTags = [...extraMetaTags, ...this.defaultChangesetTags()]
|
||||||
|
extraMetaTags = ChangesetHandler.removeDuplicateMetaTags(extraMetaTags)
|
||||||
if (this.userDetails.data.csCount == 0) {
|
if (this.userDetails.data.csCount == 0) {
|
||||||
// The user became a contributor!
|
// The user became a contributor!
|
||||||
this.userDetails.data.csCount = 1;
|
this.userDetails.data.csCount = 1;
|
||||||
|
@ -316,6 +332,7 @@ export class ChangesetHandler {
|
||||||
private async UpdateTags(
|
private async UpdateTags(
|
||||||
csId: number,
|
csId: number,
|
||||||
tags: ChangesetTag[]) {
|
tags: ChangesetTag[]) {
|
||||||
|
tags = ChangesetHandler.removeDuplicateMetaTags(tags)
|
||||||
|
|
||||||
console.trace("Updating tags of " + csId)
|
console.trace("Updating tags of " + csId)
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import {Utils} from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
export default class Constants {
|
||||||
|
|
||||||
public static vNumber = "0.17.0-alpha-2";
|
public static vNumber = "0.17.0-alpha-3";
|
||||||
|
|
||||||
public static ImgurApiKey = '7070e7167f0a25a'
|
public static ImgurApiKey = '7070e7167f0a25a'
|
||||||
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||||
|
|
|
@ -3370,18 +3370,6 @@
|
||||||
"nl": "Moet men betalen om dit oplaadpunt te gebruiken?"
|
"nl": "Moet men betalen om dit oplaadpunt te gebruiken?"
|
||||||
},
|
},
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
|
||||||
"if": {
|
|
||||||
"and": [
|
|
||||||
"fee=no"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"then": {
|
|
||||||
"nl": "Gratis te gebruiken",
|
|
||||||
"en": "Free to use"
|
|
||||||
},
|
|
||||||
"hideInAnswer": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"if": {
|
"if": {
|
||||||
"and": [
|
"and": [
|
||||||
|
@ -3410,6 +3398,18 @@
|
||||||
"en": "Free to use, but one has to authenticate"
|
"en": "Free to use, but one has to authenticate"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"fee=no"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Gratis te gebruiken",
|
||||||
|
"en": "Free to use"
|
||||||
|
},
|
||||||
|
"hideInAnswer": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"if": {
|
"if": {
|
||||||
"and": [
|
"and": [
|
||||||
|
|
|
@ -224,18 +224,6 @@
|
||||||
"nl": "Moet men betalen om dit oplaadpunt te gebruiken?"
|
"nl": "Moet men betalen om dit oplaadpunt te gebruiken?"
|
||||||
},
|
},
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
|
||||||
"if": {
|
|
||||||
"and": [
|
|
||||||
"fee=no"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"then": {
|
|
||||||
"nl": "Gratis te gebruiken",
|
|
||||||
"en": "Free to use"
|
|
||||||
},
|
|
||||||
"hideInAnswer": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"if": {
|
"if": {
|
||||||
"and": [
|
"and": [
|
||||||
|
@ -264,6 +252,18 @@
|
||||||
"en": "Free to use, but one has to authenticate"
|
"en": "Free to use, but one has to authenticate"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"fee=no"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"nl": "Gratis te gebruiken",
|
||||||
|
"en": "Free to use"
|
||||||
|
},
|
||||||
|
"hideInAnswer": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"if": {
|
"if": {
|
||||||
"and": [
|
"and": [
|
||||||
|
|
|
@ -1797,14 +1797,14 @@
|
||||||
"fee": {
|
"fee": {
|
||||||
"mappings": {
|
"mappings": {
|
||||||
"0": {
|
"0": {
|
||||||
"then": "Free to use"
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"then": "Free to use (without authenticating)"
|
"then": "Free to use (without authenticating)"
|
||||||
},
|
},
|
||||||
"2": {
|
"1": {
|
||||||
"then": "Free to use, but one has to authenticate"
|
"then": "Free to use, but one has to authenticate"
|
||||||
},
|
},
|
||||||
|
"2": {
|
||||||
|
"then": "Free to use"
|
||||||
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"then": "Paid use, but free for customers of the hotel/pub/hospital/... who operates the charging station"
|
"then": "Paid use, but free for customers of the hotel/pub/hospital/... who operates the charging station"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1806,14 +1806,14 @@
|
||||||
"fee": {
|
"fee": {
|
||||||
"mappings": {
|
"mappings": {
|
||||||
"0": {
|
"0": {
|
||||||
"then": "Gratis te gebruiken"
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"then": "Gratis te gebruiken (zonder aan te melden)"
|
"then": "Gratis te gebruiken (zonder aan te melden)"
|
||||||
},
|
},
|
||||||
"2": {
|
"1": {
|
||||||
"then": "Gratis te gebruiken, maar aanmelden met een applicatie is verplicht"
|
"then": "Gratis te gebruiken, maar aanmelden met een applicatie is verplicht"
|
||||||
},
|
},
|
||||||
|
"2": {
|
||||||
|
"then": "Gratis te gebruiken"
|
||||||
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"then": "Betalend te gebruiken, maar gratis voor klanten van het bijhorende hotel/café/ziekenhuis/..."
|
"then": "Betalend te gebruiken, maar gratis voor klanten van het bijhorende hotel/café/ziekenhuis/..."
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue