forked from MapComplete/MapComplete
Enable more privacy for some themes and layers
This commit is contained in:
parent
484adf1ee1
commit
91b836bf66
15 changed files with 59 additions and 16 deletions
|
@ -6,14 +6,6 @@ import Constants from "../../Models/Constants"
|
|||
import { Changes } from "./Changes"
|
||||
import { Utils } from "../../Utils"
|
||||
import FeaturePropertiesStore from "../FeatureSource/Actors/FeaturePropertiesStore"
|
||||
import ChangeLocationAction from "./Actions/ChangeLocationAction"
|
||||
import ChangeTagAction from "./Actions/ChangeTagAction"
|
||||
import DeleteAction from "./Actions/DeleteAction"
|
||||
import LinkImageAction from "./Actions/LinkImageAction"
|
||||
import OsmChangeAction from "./Actions/OsmChangeAction"
|
||||
import RelationSplitHandler from "./Actions/RelationSplitHandler"
|
||||
import ReplaceGeometryAction from "./Actions/ReplaceGeometryAction"
|
||||
import SplitAction from "./Actions/SplitAction"
|
||||
|
||||
export interface ChangesetTag {
|
||||
key: string
|
||||
|
@ -232,7 +224,7 @@ export class ChangesetHandler {
|
|||
if (newMetaTag === undefined) {
|
||||
extraMetaTags.push({
|
||||
key: key,
|
||||
value: oldCsTags[key],
|
||||
value: oldCsTags[key]
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
@ -361,21 +353,22 @@ export class ChangesetHandler {
|
|||
}
|
||||
|
||||
private defaultChangesetTags(): ChangesetTag[] {
|
||||
const usedGps = this.changes.state["currentUserLocation"]?.features?.data?.length > 0
|
||||
const hasMorePrivacy = !!this.changes.state?.featureSwitches?.featureSwitchMorePrivacy?.data
|
||||
const setSourceAsSurvey = !hasMorePrivacy && usedGps
|
||||
return [
|
||||
["created_by", `MapComplete ${Constants.vNumber}`],
|
||||
["locale", Locale.language.data],
|
||||
["host", `${window.location.origin}${window.location.pathname}`],
|
||||
[
|
||||
"source",
|
||||
this.changes.state["currentUserLocation"]?.features?.data?.length > 0
|
||||
? "survey"
|
||||
: undefined,
|
||||
setSourceAsSurvey ? "survey" : undefined
|
||||
],
|
||||
["imagery", this.changes.state["backgroundLayer"]?.data?.id],
|
||||
["imagery", this.changes.state["backgroundLayer"]?.data?.id]
|
||||
].map(([key, value]) => ({
|
||||
key,
|
||||
value,
|
||||
aggregate: false,
|
||||
aggregate: false
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue