forked from MapComplete/MapComplete
Refactoring: fix delete indication, fix splitroad, fix addition of multiple new points snapped onto the same way (all will properly attach now)
This commit is contained in:
parent
1f9aacfb29
commit
4172af6a72
118 changed files with 1422 additions and 1357 deletions
|
@ -30,7 +30,6 @@ export default class FeatureSwitchState {
|
|||
public readonly featureSwitchFilter: UIEventSource<boolean>
|
||||
public readonly featureSwitchEnableExport: UIEventSource<boolean>
|
||||
public readonly featureSwitchFakeUser: UIEventSource<boolean>
|
||||
public readonly featureSwitchExportAsPdf: UIEventSource<boolean>
|
||||
public readonly overpassUrl: UIEventSource<string[]>
|
||||
public readonly overpassTimeout: UIEventSource<number>
|
||||
public readonly overpassMaxZoom: UIEventSource<number>
|
||||
|
@ -125,14 +124,9 @@ export default class FeatureSwitchState {
|
|||
|
||||
this.featureSwitchEnableExport = featSw(
|
||||
"fs-export",
|
||||
(layoutToUse) => layoutToUse?.enableExportButton ?? false,
|
||||
(layoutToUse) => layoutToUse?.enableExportButton ?? true,
|
||||
"Enable the export as GeoJSON and CSV button"
|
||||
)
|
||||
this.featureSwitchExportAsPdf = featSw(
|
||||
"fs-pdf",
|
||||
(layoutToUse) => layoutToUse?.enablePdfDownload ?? false,
|
||||
"Enable the PDF download button"
|
||||
)
|
||||
|
||||
this.featureSwitchApiURL = QueryParameters.GetQueryParameter(
|
||||
"backend",
|
||||
|
|
|
@ -250,6 +250,7 @@ export default class UserRelatedState {
|
|||
const amendedPrefs = new UIEventSource<Record<string, string>>({
|
||||
_theme: layout?.id,
|
||||
_backend: this.osmConnection.Backend(),
|
||||
_applicationOpened: new Date().toISOString(),
|
||||
})
|
||||
|
||||
const osmConnection = this.osmConnection
|
||||
|
@ -299,7 +300,6 @@ export default class UserRelatedState {
|
|||
"" + (total - untranslated_count)
|
||||
amendedPrefs.data["_translation_percentage"] =
|
||||
"" + Math.floor((100 * (total - untranslated_count)) / total)
|
||||
console.log("Setting zenLinks", zenLinks)
|
||||
amendedPrefs.data["_translation_links"] = JSON.stringify(zenLinks)
|
||||
}
|
||||
amendedPrefs.ping()
|
||||
|
@ -355,7 +355,8 @@ export default class UserRelatedState {
|
|||
|
||||
amendedPrefs.addCallbackD((tags) => {
|
||||
for (const key in tags) {
|
||||
if (key.startsWith("_")) {
|
||||
if (key.startsWith("_") || key === "mapcomplete-language") {
|
||||
// Language is managed seperately
|
||||
continue
|
||||
}
|
||||
this.osmConnection.GetPreference(key, undefined, { prefix: "" }).setData(tags[key])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue