Fix build, remove no longer used 'favourite layers

This commit is contained in:
pietervdvn 2022-06-22 20:18:17 +02:00
parent 98c6113cbe
commit 174a0e1852
7 changed files with 149 additions and 32 deletions

View file

@ -33,14 +33,10 @@ export default class UserRelatedState extends ElementsState {
* The key for mangrove
*/
public mangroveIdentity: MangroveIdentity;
/**
* Which layers are enabled in the personal theme
*/
public favouriteLayers: UIEventSource<string[]>;
public readonly isTranslator : Store<boolean>;
public readonly installedUserThemes: UIEventSource<string[]>
public readonly installedUserThemes: Store<string[]>
constructor(layoutToUse: LayoutConfig, options?: { attemptLogin: true | boolean }) {
super(layoutToUse);
@ -107,16 +103,6 @@ export default class UserRelatedState extends ElementsState {
}))
}
// Important: the favourite layers are initialized _after_ the installed themes, as these might contain an installedTheme
this.favouriteLayers = LocalStorageSource.Get("favouriteLayers")
.syncWith(this.osmConnection.GetLongPreference("favouriteLayers"))
.sync(
(str) => Utils.Dedup(str?.split(";")) ?? [],
[],
(layers) => Utils.Dedup(layers)?.join(";")
);
this.InitializeLanguage();
new SelectedElementTagsUpdater(this)
this.installedUserThemes = this.InitInstalledUserThemes();
@ -149,7 +135,7 @@ export default class UserRelatedState extends ElementsState {
Locale.language.ping();
}
private InitInstalledUserThemes(): UIEventSource<string[]>{
private InitInstalledUserThemes(): Store<string[]>{
const prefix = "mapcomplete-unofficial-theme-";
const postfix = "-combined-length"
return this.osmConnection.preferencesHandler.preferences.map(prefs =>

View file

@ -335,4 +335,4 @@
"es": "Una capa que muestra cafeterías y bares donde uno se puede reunir con una bebida. La capa hace algunas preguntas relevantes",
"da": "Et lag med caféer og pubber, hvor man kan samles omkring en drink. Laget stiller nogle relevante spørgsmål"
}
}
}

View file

@ -330,4 +330,4 @@
}
}
]
}
}

View file

@ -1,13 +1,24 @@
{
"id": "mapcomplete-changes",
"title": {
"en": "Changes made with MapComplete"
"en": "Changes made with MapComplete",
"de": "Änderungen mit MapComplete",
"es": "Cambios hechos con MapComplete",
"nb_NO": "Endringer utført med MapComplete",
"nl": "Wijzigingen gemaakt met MapComplete"
},
"shortDescription": {
"en": "Shows changes made by MapComplete"
"en": "Shows changes made by MapComplete",
"de": "Zeigt Änderungen von MapComplete",
"es": "Muestra los cambios hechos por MapComplete",
"nb_NO": "Vis endringer utført med MapComplete",
"nl": "Toont wijzigingen gemaakt met MapComplete"
},
"description": {
"en": "This maps shows all the changes made with MapComplete"
"en": "This maps shows all the changes made with MapComplete",
"de": "Diese Karte zeigt alle Änderungen die mit MapComplete gemacht wurden",
"es": "Este mapa muestra todos los cambios hechos con MapComplete",
"nl": "Deze kaart toont alle wijzigingen die met MapComplete werden gemaakt"
},
"maintainer": "",
"icon": "./assets/svg/logo.svg",
@ -22,7 +33,10 @@
{
"id": "mapcomplete-changes",
"name": {
"en": "Changeset centers"
"en": "Changeset centers",
"de": "Schwerpunkte von Änderungssätzen",
"es": "Centros de conjuntos de cambios",
"nb_NO": "Endringssettsenter"
},
"minzoom": 0,
"source": {
@ -36,35 +50,55 @@
],
"title": {
"render": {
"en": "Changeset for {theme}"
"en": "Changeset for {theme}",
"de": "Änderungen für {theme}",
"es": "Conjunto de cambios para {theme}",
"nb_NO": "Endringssett for {theme}",
"nl": "Wijzigingset voor {theme}"
}
},
"description": {
"en": "Shows all MapComplete changes"
"en": "Shows all MapComplete changes",
"de": "Zeigt alle MapComplete Änderungen",
"es": "Muestra todos los cambios de MapComplete",
"nl": "Toont alle wijzigingen met MapComplete"
},
"tagRenderings": [
{
"id": "render_id",
"render": {
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderung <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"es": "Conjunto de cambios <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"nb_NO": "Endringssett <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"nl": "Wijzigingset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
}
},
{
"id": "contributor",
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
"de": "Änderung wurde von <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a> gemacht",
"es": "Cambio hecho por <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
"nl": "Wijziging gemaakt door <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
}
},
{
"id": "theme",
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
"de": "Änderung mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
"es": "Cambio con tema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
"nl": "Wijziging met thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
},
"mappings": [
{
"if": "theme~http.*",
"then": {
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
"de": "Änderung mit <b>inoffiziellem</b> Thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
"es": "Cambio con tema <b>no oficial</b> <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
"nl": "Wijziging met <b>officieus</b> thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
}
}
]
@ -340,7 +374,11 @@
}
],
"question": {
"en": "Themename contains {search}"
"en": "Themename contains {search}",
"de": "Themenname enthält {search}",
"es": "Nombre del tema contiene {search}",
"nb_NO": "Temanavn inneholder {search}",
"nl": "Themanaam bevat {search}"
}
}
]
@ -356,7 +394,10 @@
}
],
"question": {
"en": "Made by contributor {search}"
"en": "Made by contributor {search}",
"de": "Erstellt von {search}",
"es": "Hecho por contributor/a {search}",
"nl": "Gemaakt door bijdrager {search}"
}
}
]
@ -372,7 +413,10 @@
}
],
"question": {
"en": "<b>Not</b> made by contributor {search}"
"en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von {search}",
"es": "<b>No</b> hecho por contributor/a {search}",
"nl": "<b>Niet</b> gemaakt door bijdrager {search}"
}
}
]
@ -387,7 +431,10 @@
{
"id": "link_to_more",
"render": {
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
"de": "Weitere Statistiken finden Sie <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
"es": "Se pueden encontrar más estadísticas <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>aquí</a>",
"nl": "Meer statistieken kunnen <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a> gevonden worden"
}
},
{

View file

@ -3895,6 +3895,37 @@
}
},
"tagRenderings": {
"6": {
"renderings": {
"0": {
"mappings": {
"0": {
"then": "There is {device-name} available at this hackerspace"
},
"1": {
"then": "There is no {negative-name} available at this hackerspace"
}
},
"question": "Is {device-name} available at this hackerspace?"
}
},
"rewrite": {
"into": {
"0": {
"1": "a 3D-printer",
"2": "3D-printer"
},
"1": {
"1": "a laser cutter",
"2": "laser cutter"
},
"2": {
"1": "a CNC drill",
"2": "CNC drill"
}
}
}
},
"hackerspaces-name": {
"question": "What is the name of this hackerspace?",
"render": "This hackerspace is named <b>{name}</b>"

View file

@ -2612,6 +2612,28 @@
"render": "Mapa"
}
},
"maxspeed": {
"name": "Velocidad",
"tagRenderings": {
"maxspeed-maxspeed": {
"question": "Qué velocidad tiene"
}
},
"units": {
"0": {
"applicableUnits": {
"0": {
"human": "kilómetros/hora",
"humanShort": "km/h"
},
"1": {
"human": "millas/hora",
"humanShort": "mph"
}
}
}
}
},
"nature_reserve": {
"description": "",
"tagRenderings": {

View file

@ -3824,6 +3824,37 @@
}
},
"tagRenderings": {
"6": {
"renderings": {
"0": {
"mappings": {
"0": {
"then": "Er is {device-name} beschikbaar in deze hackerspace"
},
"1": {
"then": "Er is geen {negative-name} beschikbaar in deze hackerspace"
}
},
"question": "Is er {device-name} beschikbaar in deze hackerspace?"
}
},
"rewrite": {
"into": {
"0": {
"1": "een 3D-printer",
"2": "3D-printer"
},
"1": {
"1": "een lasercutter",
"2": "lasercutter"
},
"2": {
"1": "een CNC-boormachine",
"2": "CNC-boormachine"
}
}
}
},
"hackerspaces-name": {
"question": "Wat is de naam van deze hackerspace?",
"render": "Deze hackerspace heet <b>{name}</b>"