diff --git a/UI/BigComponents/MoreScreen.ts b/UI/BigComponents/MoreScreen.ts index 05a78660e..1dd04ecb4 100644 --- a/UI/BigComponents/MoreScreen.ts +++ b/UI/BigComponents/MoreScreen.ts @@ -119,9 +119,9 @@ export default class MoreScreen extends Combine { ]).SetClass("flex flex-col border border-gray-300 p-2 rounded-lg") } - private static createButtonFor(state: UserRelatedState, id: string): BaseUIElement { + private static createUnofficialButtonFor(state: UserRelatedState, id: string): BaseUIElement { const allPreferences = state.osmConnection.preferencesHandler.preferences.data; - const length = Number(allPreferences[id + "-combined-length"]) + const length = Number(allPreferences[id + "-length"]) let str = ""; for (let i = 0; i < length; i++) { str += allPreferences[id + "-" + i] @@ -136,7 +136,7 @@ export default class MoreScreen extends Combine { return MoreScreen.createLinkButton(state, value, true) } catch (e) { - console.debug("Could not parse unofficial theme information for " + id, e) + console.debug("Could not parse unofficial theme information for " + id, "The json is: ", str, e) return undefined } } @@ -157,13 +157,18 @@ export default class MoreScreen extends Combine { return ids }); + currentIds.addCallback(ids => { + console.log("Current special ids are:", ids) + }) var stableIds = UIEventSource.ListStabilized(currentIds) - + currentIds.addCallback(ids => { + console.log("Stabilized special ids are:", ids) + }) return new VariableUiElement( stableIds.map(ids => { const allThemes: BaseUIElement[] = [] for (const id of ids) { - const link = this.createButtonFor(state, id) + const link = this.createUnofficialButtonFor(state, id) if (link !== undefined) { allThemes.push(link.SetClass(buttonClass)) } diff --git a/assets/layers/bike_repair_station/license_info.json b/assets/layers/bike_repair_station/license_info.json index 1ae3b7f3d..d7f8d4e4b 100644 --- a/assets/layers/bike_repair_station/license_info.json +++ b/assets/layers/bike_repair_station/license_info.json @@ -27,20 +27,6 @@ "https://osoc.be/editions/2020/cyclofix" ] }, - { - "path": "broken_pump_2.svg", - "license": "CC-BY-SA", - "authors": [ - "Pieter Fiers", - "Thibault Declercq", - "Pierre Barban", - "Joost Schouppe", - "Pieter Vander Vennet" - ], - "sources": [ - "https://osoc.be/editions/2020/cyclofix" - ] - }, { "path": "pump.svg", "license": "CC-BY-SA", diff --git a/assets/layers/etymology/logo.svg b/assets/layers/etymology/logo.svg index 43c997166..84b464808 100644 --- a/assets/layers/etymology/logo.svg +++ b/assets/layers/etymology/logo.svg @@ -1,15 +1,86 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/assets/svg/pin.svg b/assets/svg/pin.svg index 0675ec07a..9094012e2 100644 --- a/assets/svg/pin.svg +++ b/assets/svg/pin.svg @@ -1,7 +1,33 @@ - - - - - - - \ No newline at end of file + + + + + + diff --git a/assets/themes/bicycle_rental/bicycle_rental.json b/assets/themes/bicycle_rental/bicycle_rental.json index 973b33a2b..9f30efca3 100644 --- a/assets/themes/bicycle_rental/bicycle_rental.json +++ b/assets/themes/bicycle_rental/bicycle_rental.json @@ -5,11 +5,11 @@ "nl": "Fietsverhuur" }, "shortDescription": { - "en": "A map with biyccle rental stations and bicycle rental shops", + "en": "A map with bicycle rental stations and bicycle rental shops", "nl": "Een kaart met fietsverhuurpunten en fietsverhuurzaken" }, "description": { - "en": "On this map, you'll find the many biycle rental stations as they are known by OpenStreetMap", + "en": "On this map, you'll find the many bicycle rental stations as they are known by OpenStreetMap", "nl": "Op deze kaart vind je verschillende fietsverhuurpunten en fietsverhuurzaken" }, "maintainer": "", diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index a9ef48a38..e1454adb3 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -221,7 +221,7 @@ }, { "if": "theme=notes", - "then": "./assets/svg/resolved.svg" + "then": "./assets/themes/notes/logo.svg" }, { "if": "theme=observation_towers", diff --git a/assets/themes/notes/notes.json b/assets/themes/notes/notes.json index aa621316a..08c83279d 100644 --- a/assets/themes/notes/notes.json +++ b/assets/themes/notes/notes.json @@ -13,10 +13,10 @@ "en": "A note is a pin on the map with some text to indicate something wrong.

Make sure to checkout the filter view to search for users and text.", "hu": "A jegyzet egy gombostű a térképen egy szöveggel, amely azt jelzi, hogy valami nem stimmel.

Felhasználók vagy szövegek kereséséhez nézd meg a szűrő nézetet." }, - "icon": "./assets/svg/resolved.svg", + "icon": "./assets/themes/notes/logo.svg", "clustering": false, "enableDownload": true, "layers": [ "note" ] -} \ No newline at end of file +} diff --git a/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair.svg b/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair.svg new file mode 100644 index 000000000..51ebec297 --- /dev/null +++ b/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair_and_pump.svg b/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair_and_pump.svg new file mode 100644 index 000000000..91028718b --- /dev/null +++ b/assets/themes/toerisme_vlaanderen/NEGATIEF/cycle_repair_and_pump.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/NEGATIEF/license_info.json b/assets/themes/toerisme_vlaanderen/NEGATIEF/license_info.json index 24e17f3e9..4885cc3ba 100644 --- a/assets/themes/toerisme_vlaanderen/NEGATIEF/license_info.json +++ b/assets/themes/toerisme_vlaanderen/NEGATIEF/license_info.json @@ -7,7 +7,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -18,7 +18,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -29,7 +29,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -40,7 +40,29 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" + ] + }, + { + "path": "cycle_repair.svg", + "license": "CC0", + "authors": [ + "Toerisme Vlaanderen" + ], + "sources": [ + "https://toerismevlaanderen.be/pinjepunt", + "https://mapcomplete.osm.be/toerisme_vlaanderen" + ] + }, + { + "path": "cycle_repair_and_pump.svg", + "license": "CC0", + "authors": [ + "Toerisme Vlaanderen" + ], + "sources": [ + "https://toerismevlaanderen.be/pinjepunt", + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -51,7 +73,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -62,7 +84,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -73,7 +95,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -84,7 +106,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -95,7 +117,7 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, { @@ -106,7 +128,18 @@ ], "sources": [ "https://toerismevlaanderen.be/pinjepunt", - "https://mapcomplete.osm.be/toerisme_vlaanderenn" + "https://mapcomplete.osm.be/toerisme_vlaanderen" + ] + }, + { + "path": "toilets_wheelchair.svg", + "license": "CC0", + "authors": [ + "Toerisme Vlaanderen" + ], + "sources": [ + "https://toerismevlaanderen.be/pinjepunt", + "https://mapcomplete.osm.be/toerisme_vlaanderen" ] } ] \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/cycle_repair.svg b/assets/themes/toerisme_vlaanderen/cycle_repair.svg new file mode 100644 index 000000000..0fda014ab --- /dev/null +++ b/assets/themes/toerisme_vlaanderen/cycle_repair.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/cycle_repair_and_pump.svg b/assets/themes/toerisme_vlaanderen/cycle_repair_and_pump.svg new file mode 100644 index 000000000..510948ab7 --- /dev/null +++ b/assets/themes/toerisme_vlaanderen/cycle_repair_and_pump.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/themes/toerisme_vlaanderen/license_info.json b/assets/themes/toerisme_vlaanderen/license_info.json index 905903e13..61362aaeb 100644 --- a/assets/themes/toerisme_vlaanderen/license_info.json +++ b/assets/themes/toerisme_vlaanderen/license_info.json @@ -73,6 +73,28 @@ "https://mapcomplete.osm.be/toerisme_vlaanderen" ] }, + { + "path": "cycle_repair.svg", + "license": "CC0", + "authors": [ + "Toerisme Vlaanderen" + ], + "sources": [ + "https://toerismevlaanderen.be/pinjepunt", + "https://mapcomplete.osm.be/toerisme_vlaanderen" + ] + }, + { + "path": "cycle_repair_and_pump.svg", + "license": "CC0", + "authors": [ + "Toerisme Vlaanderen" + ], + "sources": [ + "https://toerismevlaanderen.be/pinjepunt", + "https://mapcomplete.osm.be/toerisme_vlaanderen" + ] + }, { "path": "logo.png", "license": "Logo (all rights reserved)", diff --git a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json index 5e6d303ff..05a0d977a 100644 --- a/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json +++ b/assets/themes/toerisme_vlaanderen/toerisme_vlaanderen.json @@ -2,9 +2,8 @@ "id": "toerisme_vlaanderen", "credits": "Commissioned theme for Toerisme Vlaandere", "maintainer": "MapComplete", - "version": "0.0.2", + "version": "0.0.3", "customCss": "./assets/themes/toerisme_vlaanderen/custom.css", - "defaultBackgroundId": "CartoDB.Voyager", "mustHaveLanguage": [ "nl" ], @@ -109,7 +108,21 @@ "centroid" ], "icon": { - "render": "./assets/themes/toerisme_vlaanderen/cycle_pump.svg" + "render": "./assets/themes/toerisme_vlaanderen/cycle_pump.svg", + "mappings":[ + { + "if": {"and": + ["service:bicycle:tools=yes","service:bicycle:pump=yes"] + }, + "then": "./assets/themes/toerisme_vlaanderen/cycle_repair_and_pump.svg" + }, + { + "if": {"and": + ["service:bicycle:tools=yes","service:bicycle:pump=no"] + }, + "then": "./assets/themes/toerisme_vlaanderen/cycle_repair.svg" + } + ] }, "badges": [ { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 0f59254fb..97b7115c7 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3448,29 +3448,29 @@ } }, "picnic_table": { - "description": "Deze laag toont picknicktafels", - "name": "Picknicktafels", + "description": "Deze laag toont picnictafels", + "name": "Picnictafels", "presets": { "0": { - "title": "picknicktafel" + "title": "picnic-tafel" } }, "tagRenderings": { "picnic_table-material": { "mappings": { "0": { - "then": "Deze picknicktafel is gemaakt uit hout" + "then": "Deze picnictafel is gemaakt uit hout" }, "1": { - "then": "Deze picknicktafel is gemaakt uit beton" + "then": "Deze picnictafel is gemaakt uit beton" } }, - "question": "Van welk materiaal is deze picknicktafel gemaakt?", - "render": "Deze picknicktafel is gemaakt van {material}" + "question": "Van welk materiaal is deze picnictafel gemaakt?", + "render": "Deze picnictafel is gemaakt van {material}" } }, "title": { - "render": "Picknicktafel" + "render": "Picnictafel" } }, "play_forest": { diff --git a/langs/themes/en.json b/langs/themes/en.json index 322d5816a..888e786c8 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -13,8 +13,8 @@ "title": "Benches" }, "bicycle_rental": { - "description": "On this map, you'll find the many biycle rental stations as they are known by OpenStreetMap", - "shortDescription": "A map with biyccle rental stations and bicycle rental shops", + "description": "On this map, you'll find the many bicycle rental stations as they are known by OpenStreetMap", + "shortDescription": "A map with bicycle rental stations and bicycle rental shops", "title": "Bicycle rental" }, "bicyclelib": { diff --git a/scripts/generateLayouts.ts b/scripts/generateLayouts.ts index bf26fad07..0f654759e 100644 --- a/scripts/generateLayouts.ts +++ b/scripts/generateLayouts.ts @@ -70,16 +70,6 @@ async function createManifest(layout: LayoutConfig, alreadyWritten: string[]) { const height: string = svg.$.height; if(width !== height){ console.warn("WARNING: the icon for theme "+layout.id+" is not square. Please square the icon at "+icon+"\n Width = "+width, "height =", height) - /* const process = exec("inkscape " + icon, ((error, stdout, stderr) => { - console.log("Inkscape: ", stdout) - if (error !== null) { - console.error(error) - } - if (stderr !== "") { - console.error(stderr) - } - }))//*/ - } const builder = new xml2js.Builder();