From 59e2234f9bd6002f3e427fe382b43121fe927b88 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Mon, 15 Apr 2024 00:21:25 +0200 Subject: [PATCH 1/5] Fix node icons (#1885) --- assets/themes/cyclenodes/cyclenodes.json | 8 ++++---- assets/themes/walkingnodes/walkingnodes.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/themes/cyclenodes/cyclenodes.json b/assets/themes/cyclenodes/cyclenodes.json index 94c17b99d..6b38fa435 100644 --- a/assets/themes/cyclenodes/cyclenodes.json +++ b/assets/themes/cyclenodes/cyclenodes.json @@ -155,15 +155,15 @@ "centroid" ], "label": { - "render": "
?
", + "render": "
?
", "mappings": [ { "if": "rcn_ref~*", - "then": "
{rcn_ref}
" + "then": "
{rcn_ref}
" }, { "if": "proposed:rcn_ref~*", - "then": "
{proposed:rcn_ref}
" + "then": "
{proposed:rcn_ref}
" } ] } @@ -402,4 +402,4 @@ } } ] -} +} \ No newline at end of file diff --git a/assets/themes/walkingnodes/walkingnodes.json b/assets/themes/walkingnodes/walkingnodes.json index bd59bf50b..e1afe1303 100644 --- a/assets/themes/walkingnodes/walkingnodes.json +++ b/assets/themes/walkingnodes/walkingnodes.json @@ -151,15 +151,15 @@ "centroid" ], "label": { - "render": "
?
", + "render": "
?
", "mappings": [ { "if": "rwn_ref~*", - "then": "
{rwn_ref}
" + "then": "
{rwn_ref}
" }, { "if": "proposed:rwn_ref~*", - "then": "
{proposed:rwn_ref}
" + "then": "
{proposed:rwn_ref}
" } ] } @@ -369,4 +369,4 @@ } } ] -} +} \ No newline at end of file From 53ca88d6a5fa2a6f4dd2aa08f640ad402a1db8a0 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Mon, 15 Apr 2024 00:28:39 +0200 Subject: [PATCH 2/5] Change translation for waste_basket (#1859) --- assets/themes/waste_basket/waste_basket.json | 4 ++-- langs/themes/en.json | 2 +- langs/themes/nl.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/themes/waste_basket/waste_basket.json b/assets/themes/waste_basket/waste_basket.json index b8226380c..71830e789 100644 --- a/assets/themes/waste_basket/waste_basket.json +++ b/assets/themes/waste_basket/waste_basket.json @@ -1,8 +1,8 @@ { "id": "waste_basket", "title": { - "en": "Waste Basket", - "nl": "Vuilnisbak", + "en": "Waste Baskets", + "nl": "Vuilnisbakken", "de": "Abfalleimer", "it": "Cestino dei rifiuti", "zh_Hant": "垃圾筒", diff --git a/langs/themes/en.json b/langs/themes/en.json index ab70209a6..207abfa15 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1658,6 +1658,6 @@ "waste_basket": { "description": "On this map, you'll find waste baskets near you. If a waste basket is missing on this map, you can add it yourself", "shortDescription": "A map with waste baskets", - "title": "Waste Basket" + "title": "Waste Baskets" } } \ No newline at end of file diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 5af27d779..290fe3c37 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -1375,6 +1375,6 @@ "waste_basket": { "description": "Op deze kaart vind je vuilnisbakken waar je afval in kan smijten. Ontbreekt er een vuilnisbak? Dan kan je die zelf toevoegen", "shortDescription": "Een kaart met vuilnisbakken", - "title": "Vuilnisbak" + "title": "Vuilnisbakken" } } \ No newline at end of file From f35f326004415603bafe1551882d0636f2ba7bab Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Mon, 15 Apr 2024 01:37:44 +0200 Subject: [PATCH 3/5] Basic food court and outdoor seating layer (#1845) --- assets/layers/bike_shop/bike_shop.json | 5 +- assets/layers/food_courts/food_court.svg | 7 + .../layers/food_courts/food_court.svg.license | 2 + assets/layers/food_courts/food_courts.json | 76 ++++++++ assets/layers/food_courts/license_info.json | 10 + .../layers/outdoor_seating/license_info.json | 12 ++ .../outdoor_seating/outdoor_seating.json | 174 ++++++++++++++++++ .../outdoor_seating/outdoor_seating.svg | 3 + .../outdoor_seating.svg.license | 2 + .../themes/cafes_and_pubs/cafes_and_pubs.json | 4 +- assets/themes/food/food.json | 6 +- 11 files changed, 297 insertions(+), 4 deletions(-) create mode 100644 assets/layers/food_courts/food_court.svg create mode 100644 assets/layers/food_courts/food_court.svg.license create mode 100644 assets/layers/food_courts/food_courts.json create mode 100644 assets/layers/food_courts/license_info.json create mode 100644 assets/layers/outdoor_seating/license_info.json create mode 100644 assets/layers/outdoor_seating/outdoor_seating.json create mode 100644 assets/layers/outdoor_seating/outdoor_seating.svg create mode 100644 assets/layers/outdoor_seating/outdoor_seating.svg.license diff --git a/assets/layers/bike_shop/bike_shop.json b/assets/layers/bike_shop/bike_shop.json index 0d6ae6524..757c3ae9c 100644 --- a/assets/layers/bike_shop/bike_shop.json +++ b/assets/layers/bike_shop/bike_shop.json @@ -281,7 +281,10 @@ }, { "if": { - "and":["service:bicycle:cleaning~*","service:bicycle:cleaning!=no"] + "and": [ + "service:bicycle:cleaning~*", + "service:bicycle:cleaning!=no" + ] }, "then": "circle:#6bc4f7;./assets/layers/bike_cleaning/bike_cleaning_icon.svg" } diff --git a/assets/layers/food_courts/food_court.svg b/assets/layers/food_courts/food_court.svg new file mode 100644 index 000000000..5339efbc3 --- /dev/null +++ b/assets/layers/food_courts/food_court.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/layers/food_courts/food_court.svg.license b/assets/layers/food_courts/food_court.svg.license new file mode 100644 index 000000000..bb226dbab --- /dev/null +++ b/assets/layers/food_courts/food_court.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: OSM Carto +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/assets/layers/food_courts/food_courts.json b/assets/layers/food_courts/food_courts.json new file mode 100644 index 000000000..bfaa854b0 --- /dev/null +++ b/assets/layers/food_courts/food_courts.json @@ -0,0 +1,76 @@ +{ + "id": "food_courts", + "name": { + "en": "Food Courts" + }, + "description": { + "en": "Food courts with a variety of food options." + }, + "title": { + "render": { + "en": "Food Court" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "source": { + "osmTags": "amenity=food_court" + }, + "minzoom": 12, + "tagRenderings": [ + { + "id": "name", + "question": { + "en": "What is the name of this food court?" + }, + "freeform": { + "key": "name", + "type": "string", + "placeholder": { + "en": "Name of the food court" + } + }, + "render": { + "en": "This food court is called {name}." + } + }, + "reviews", + "images", + "opening_hours", + "wheelchair-access", + "website", + "phone", + "smoking" + ], + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/food_courts/food_court.svg" + } + ], + "label": { + "mappings": [ + { + "if": "name~*", + "then": "
{name}
" + } + ] + } + } + ], + "lineRendering": [ + { + "color": "#C77400", + "fillColor": "#C774004D" + } + ] +} \ No newline at end of file diff --git a/assets/layers/food_courts/license_info.json b/assets/layers/food_courts/license_info.json new file mode 100644 index 000000000..6c60b1953 --- /dev/null +++ b/assets/layers/food_courts/license_info.json @@ -0,0 +1,10 @@ +[ + { + "path": "food_court.svg", + "license": "CC0-1.0", + "authors": [ + "OSM Carto" + ], + "sources": [] + } +] \ No newline at end of file diff --git a/assets/layers/outdoor_seating/license_info.json b/assets/layers/outdoor_seating/license_info.json new file mode 100644 index 000000000..88d851378 --- /dev/null +++ b/assets/layers/outdoor_seating/license_info.json @@ -0,0 +1,12 @@ +[ + { + "path": "outdoor_seating.svg", + "license": "CC0-1.0", + "authors": [ + "Adamant36" + ], + "sources": [ + "https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/leisure/outdoor_seating.svg" + ] + } +] \ No newline at end of file diff --git a/assets/layers/outdoor_seating/outdoor_seating.json b/assets/layers/outdoor_seating/outdoor_seating.json new file mode 100644 index 000000000..3bf1caeba --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.json @@ -0,0 +1,174 @@ +{ + "id": "outdoor_seating", + "name": { + "en": "Outdoor Seating" + }, + "description": { + "en": "Outdoor seating areas, usually located near cafes and restaurants." + }, + "title": { + "render": { + "en": "Outdoor Seating area" + }, + "mappings": [ + { + "if": "name~*", + "then": "{name}" + } + ] + }, + "source": { + "osmTags": "leisure=outdoor_seating" + }, + "minzoom": 19, + "tagRenderings": [ + "images", + { + "id": "access", + "question": { + "en": "Who can use this outdoor seating area?" + }, + "mappings": [ + { + "if": "access=yes", + "then": { + "en": "Anyone can use this outdoor seating area." + } + }, + { + "if": "access=customers", + "then": { + "en": "Only customers can use this outdoor seating area." + } + }, + { + "if": "access=private", + "then": { + "en": "This outdoor seating area is private." + } + } + ] + }, + { + "id": "seasonal", + "question": { + "en": "Is this outdoor seating area seasonal?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "seasonal=no", + "then": { + "en": "This outdoor seating area is available all year round." + } + }, + { + "if": "seasonal=spring", + "then": { + "en": "This outdoor seating area is available in spring." + } + }, + { + "if": "seasonal=summer", + "then": { + "en": "This outdoor seating area is available in summer." + } + }, + { + "if": "seasonal=autumn", + "then": { + "en": "This outdoor seating area is available in autumn." + } + }, + { + "if": "seasonal=winter", + "then": { + "en": "This outdoor seating area is available in winter." + } + }, + { + "if": "seasonal=dry_season", + "then": { + "en": "This outdoor seating area is available in the dry season." + } + } + ] + }, + "opening_hours_24_7", + "website", + "internet-all", + "wheelchair-access", + { + "id": "heating", + "question": { + "en": "Is this outdoor seating area heated?" + }, + "mappings": [ + { + "if": "heating=yes", + "then": { + "en": "This outdoor seating area is heated." + } + }, + { + "if": "heating=no", + "then": { + "en": "This outdoor seating area is not heated." + } + } + ] + }, + { + "id": "covered", + "question": { + "en": "Is this outdoor seating area covered?" + }, + "mappings": [ + { + "if": "covered=yes", + "then": { + "en": "This outdoor seating area is covered." + } + }, + { + "if": "covered=no", + "then": { + "en": "This outdoor seating area is not covered." + } + } + ] + }, + { + "builtin": "smoking", + "override": { + "mappings": [ + {}, + {}, + { + "hideInAnswer": true + } + ] + } + } + ], + "pointRendering": [ + { + "location": [ + "point", + "centroid" + ], + "marker": [ + { + "icon": "./assets/layers/outdoor_seating/outdoor_seating.svg" + } + ] + } + ], + "lineRendering": [ + { + "color": "green", + "fillColor": "#00FF004D", + "width": 2 + } + ] +} \ No newline at end of file diff --git a/assets/layers/outdoor_seating/outdoor_seating.svg b/assets/layers/outdoor_seating/outdoor_seating.svg new file mode 100644 index 000000000..f06745579 --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/layers/outdoor_seating/outdoor_seating.svg.license b/assets/layers/outdoor_seating/outdoor_seating.svg.license new file mode 100644 index 000000000..6f71e2332 --- /dev/null +++ b/assets/layers/outdoor_seating/outdoor_seating.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Adamant36 +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/assets/themes/cafes_and_pubs/cafes_and_pubs.json b/assets/themes/cafes_and_pubs/cafes_and_pubs.json index 6dba31fa2..38ac213b4 100644 --- a/assets/themes/cafes_and_pubs/cafes_and_pubs.json +++ b/assets/themes/cafes_and_pubs/cafes_and_pubs.json @@ -37,7 +37,9 @@ }, "icon": "./assets/layers/cafe_pub/pub.svg", "layers": [ - "cafe_pub" + "cafe_pub", + "outdoor_seating", + "food_courts" ], "widenFactor": 1.5 } \ No newline at end of file diff --git a/assets/themes/food/food.json b/assets/themes/food/food.json index f0c9e0b00..d48f52412 100644 --- a/assets/themes/food/food.json +++ b/assets/themes/food/food.json @@ -31,7 +31,9 @@ "icon": "./assets/layers/food/restaurant.svg", "layers": [ "food", - "ice_cream" + "ice_cream", + "outdoor_seating", + "food_courts" ], "widenFactor": 3 -} +} \ No newline at end of file From 7f3f2fc492bbe2c661e38e2fb12491936f84dd30 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 21 Apr 2024 00:38:04 +0200 Subject: [PATCH 4/5] Add BS1363 plug (#1907) --- assets/layers/charging_station/bs1363.svg | 6 + .../charging_station/bs1363.svg.license | 2 + .../charging_station/charging_station.json | 113 ++++++++++++++++++ .../layers/charging_station/license_info.json | 10 ++ assets/layers/charging_station/types.csv | 1 + 5 files changed, 132 insertions(+) create mode 100644 assets/layers/charging_station/bs1363.svg create mode 100644 assets/layers/charging_station/bs1363.svg.license diff --git a/assets/layers/charging_station/bs1363.svg b/assets/layers/charging_station/bs1363.svg new file mode 100644 index 000000000..fc53c587f --- /dev/null +++ b/assets/layers/charging_station/bs1363.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/layers/charging_station/bs1363.svg.license b/assets/layers/charging_station/bs1363.svg.license new file mode 100644 index 000000000..b4ccbe777 --- /dev/null +++ b/assets/layers/charging_station/bs1363.svg.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Yanpas +SPDX-License-Identifier: CC-BY-SA-4.0 \ No newline at end of file diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 5b7559216..cd9069fda 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -1221,6 +1221,85 @@ "path": "./assets/layers/charging_station/bosch-5pin.svg", "class": "medium" } + }, + { + "if": "socket:bs1363=1", + "ifnot": "socket:bs1363=", + "then": { + "en": "BS1363 (Type G)", + "nl": "BS1363 (VK 3-pin)" + }, + "icon": { + "path": "./assets/layers/charging_station/bs1363.svg", + "class": "medium" + }, + "hideInAnswer": { + "and": [ + "_country!=bh", + "_country!=bd", + "_country!=bz", + "_country!=bt", + "_country!=bw", + "_country!=bn", + "_country!=kh", + "_country!=cy", + "_country!=dm", + "_country!=gh", + "_country!=gi", + "_country!=gd", + "_country!=gg", + "_country!=gy", + "_country!=id", + "_country!=iq", + "_country!=ie", + "_country!=im", + "_country!=je", + "_country!=jo", + "_country!=ke", + "_country!=kw", + "_country!=lb", + "_country!=mo", + "_country!=mw", + "_country!=mv", + "_country!=mt", + "_country!=mu", + "_country!=ng", + "_country!=om", + "_country!=pk", + "_country!=qa", + "_country!=rw", + "_country!=sa", + "_country!=sc", + "_country!=sl", + "_country!=sb", + "_country!=lk", + "_country!=sd", + "_country!=tz", + "_country!=ug", + "_country!=vu", + "_country!=vn", + "_country!=ye", + "_country!=zm", + "_country!=zw" + ] + } + }, + { + "if": { + "and": [ + "socket:bs1363~*", + "socket:bs1363!=1" + ] + }, + "then": { + "en": "BS1363 (Type G)", + "nl": "BS1363 (VK 3-pin)" + }, + "hideInAnswer": true, + "icon": { + "path": "./assets/layers/charging_station/bs1363.svg", + "class": "medium" + } } ] }, @@ -1561,6 +1640,24 @@ [], [], [] + ], + [ + "socket:bs1363", + "socket:bs1363", + { + "en": "BS1363 (Type G)", + "nl": "BS1363 (VK 3-pin)" + }, + "bs1363.svg", + [ + "230" + ], + [ + "13" + ], + [ + "3kW" + ] ] ] }, @@ -2607,6 +2704,13 @@ "de": "Hat einen
Bosch Active Connect Anschluss mit 5 Pins
und Kabel" }, "osmTags": "socket:bosch_5pin~*" + }, + { + "question": { + "en": "Has a
BS1363 (Type G)
connector", + "nl": "Heeft een
BS1363 (VK 3-pin)
" + }, + "osmTags": "socket:bs1363~*" } ] } @@ -2757,6 +2861,15 @@ "mW", "kW" ] + }, + "socket:bs1363:voltage": "voltage", + "socket:bs1363:current": "current", + "socket:bs1363:output": { + "quantity": "power", + "denominations": [ + "mW", + "kW" + ] } } ], diff --git a/assets/layers/charging_station/license_info.json b/assets/layers/charging_station/license_info.json index b3e7f14bc..8f25c84e1 100644 --- a/assets/layers/charging_station/license_info.json +++ b/assets/layers/charging_station/license_info.json @@ -115,6 +115,16 @@ ], "sources": [] }, + { + "path": "bs1363.svg", + "license": "CC-BY-SA-4.0", + "authors": [ + "Yanpas" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:Plug_types.svg" + ] + }, { "path": "under_construction.svg", "license": "CC0-1.0", diff --git a/assets/layers/charging_station/types.csv b/assets/layers/charging_station/types.csv index d3780f61d..4a9444e36 100644 --- a/assets/layers/charging_station/types.csv +++ b/assets/layers/charging_station/types.csv @@ -15,3 +15,4 @@ socket:tesla_destination,,Type2_tethered.svg,Tesla supercharger (destination) socket:USB-A,,usb_port.svg,USB to charge phones and small electronics,,,5,1;2,5W;10W,USB om GSMs en kleine electronica op te laden,*,, socket:bosch_3pin,,bosch-3pin.svg,Bosch Active Connect with 3 pins and cable,,,,,,Bosch Active Connect met 3 pinnen aan een kabel,bicycle,car;motorcar;hgv;bus, socket:bosch_5pin,,bosch-5pin.svg,Bosch Active Connect with 5 pins and cable,,,,,,Bosch Active Connect met 5 pinnen aan een kabel,bicycle,car;motorcar;hgv;bus, +socket:bs1363,,bs1363.svg,BS1363 (Type G),bh;bd;bz;bt;bw;bn;kh;cy;dm;gh;gi;gd;gg;gy;id;iq;ie;im;je;jo;ke;kw;lb;mo;mw;mv;mt;mu;ng;om;pk;qa;rw;sa;sc;sl;sb;lk;sd;tz;ug;vu;vn;ye;zm;zw,,230,13,3kW,BS1363 (VK 3-pin),*,, From 1bde81f5f1519f29d87a093f74f514be47f690b9 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sun, 21 Apr 2024 01:19:48 +0200 Subject: [PATCH 5/5] Basic filtering in studio (#1898) --- public/css/index-tailwind-output.css | 82 ++++++++++++------------- src/UI/StudioGUI.svelte | 89 +++++++++++++++++++++++++--- 2 files changed, 120 insertions(+), 51 deletions(-) diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index 0f5db9ed3..5edcd85be 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -693,6 +693,10 @@ video { position: relative; } +.\!relative { + position: relative !important; +} + .sticky { position: -webkit-sticky; position: sticky; @@ -717,6 +721,10 @@ video { top: 14rem; } +.bottom-0 { + bottom: 0px; +} + .top-0 { top: 0px; } @@ -725,10 +733,6 @@ video { left: 0px; } -.bottom-0 { - bottom: 0px; -} - .right-4 { right: 1rem; } @@ -896,14 +900,6 @@ video { margin-right: 4rem; } -.mb-4 { - margin-bottom: 1rem; -} - -.mb-8 { - margin-bottom: 2rem; -} - .mt-4 { margin-top: 1rem; } @@ -936,6 +932,10 @@ video { margin-right: 0.25rem; } +.mb-4 { + margin-bottom: 1rem; +} + .ml-1 { margin-left: 0.25rem; } @@ -968,6 +968,10 @@ video { margin-top: 2rem; } +.mb-8 { + margin-bottom: 2rem; +} + .-ml-6 { margin-left: -1.5rem; } @@ -1076,12 +1080,18 @@ video { height: 6rem; } +.h-full { + height: 100%; +} + .h-screen { height: 100vh; } -.h-full { - height: 100%; +.h-fit { + height: -webkit-fit-content; + height: -moz-fit-content; + height: fit-content; } .h-32 { @@ -1105,16 +1115,6 @@ video { height: 1.5rem; } -.h-fit { - height: -webkit-fit-content; - height: -moz-fit-content; - height: fit-content; -} - -.h-96 { - height: 24rem; -} - .h-0 { height: 0px; } @@ -1786,10 +1786,6 @@ video { background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } -.bg-white\/50 { - background-color: rgb(255 255 255 / 0.5); -} - .bg-red-400 { --tw-bg-opacity: 1; background-color: rgb(248 113 113 / var(--tw-bg-opacity)); @@ -1876,6 +1872,10 @@ video { padding-right: 0.5rem; } +.pl-2 { + padding-left: 0.5rem; +} + .pr-12 { padding-right: 3rem; } @@ -1888,10 +1888,6 @@ video { padding-right: 0.25rem; } -.pl-2 { - padding-left: 0.5rem; -} - .pt-0\.5 { padding-top: 0.125rem; } @@ -2122,6 +2118,11 @@ video { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } +.outline-none { + outline: 2px solid transparent; + outline-offset: 2px; +} + .outline { outline-style: solid; } @@ -2217,12 +2218,6 @@ video { backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); } -.transition-colors { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - .transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, -webkit-transform, -webkit-filter, -webkit-backdrop-filter; transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; @@ -2231,6 +2226,12 @@ video { transition-duration: 150ms; } +.transition-colors { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + .duration-200 { transition-duration: 200ms; } @@ -2928,11 +2929,6 @@ svg.apply-fill path { max-width: 100%; } -.hover\:bg-white:hover { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); -} - .hover\:bg-indigo-200:hover { --tw-bg-opacity: 1; background-color: rgb(199 210 254 / var(--tw-bg-opacity)); diff --git a/src/UI/StudioGUI.svelte b/src/UI/StudioGUI.svelte index 10f544bfa..2a240a238 100644 --- a/src/UI/StudioGUI.svelte +++ b/src/UI/StudioGUI.svelte @@ -29,6 +29,7 @@ import Translations from "./i18n/Translations" import Tr from "./Base/Tr.svelte" import Add from "../assets/svg/Add.svelte" + import { SearchIcon } from "@rgossiaux/svelte-heroicons/solid" export let studioUrl = window.location.hostname === "127.0.0.2" @@ -54,26 +55,66 @@ const uid = osmConnection.userDetails.map((ud) => ud?.uid) const studio = new StudioServer(studioUrl, uid) + let layerFilterTerm: string = "" + let layersWithErr = UIEventSource.FromPromiseWithErr(studio.fetchOverview()) let layers: Store<{ owner: number; id: string }[]> = layersWithErr.mapD((l) => l["success"]?.filter((l) => l.category === "layers") ) - let selfLayers = layers.mapD((ls) => ls.filter((l) => l.owner === uid.data), [uid]) - let otherLayers = layers.mapD( - (ls) => ls.filter((l) => l.owner !== undefined && l.owner !== uid.data), + $: selfLayers = layers.mapD( + (ls) => + ls.filter( + (l) => l.owner === uid.data && l.id.toLowerCase().includes(layerFilterTerm.toLowerCase()) + ), [uid] ) - let officialLayers = layers.mapD((ls) => ls.filter((l) => l.owner === undefined), [uid]) + $: otherLayers = layers.mapD( + (ls) => + ls.filter( + (l) => + l.owner !== undefined && + l.owner !== uid.data && + l.id.toLowerCase().includes(layerFilterTerm.toLowerCase()) + ), + [uid] + ) + $: officialLayers = layers.mapD( + (ls) => + ls.filter( + (l) => l.owner === undefined && l.id.toLowerCase().includes(layerFilterTerm.toLowerCase()) + ), + [uid] + ) + + let themeFilterTerm: string = "" let themes: Store<{ owner: number; id: string }[]> = layersWithErr.mapD((l) => l["success"]?.filter((l) => l.category === "themes") ) - let selfThemes = themes.mapD((ls) => ls.filter((l) => l.owner === uid.data), [uid]) - let otherThemes = themes.mapD( - (ls) => ls.filter((l) => l.owner !== undefined && l.owner !== uid.data), + $: selfThemes = themes.mapD( + (ls) => + ls.filter( + (l) => l.owner === uid.data && l.id.toLowerCase().includes(themeFilterTerm.toLowerCase()) + ), + [uid] + ) + $: otherThemes = themes.mapD( + (ls) => + ls.filter( + (l) => + l.owner !== undefined && + l.owner !== uid.data && + l.id.toLowerCase().includes(themeFilterTerm.toLowerCase()) + ), + [uid] + ) + $: officialThemes = themes.mapD( + (ls) => + ls.filter( + (l) => l.owner === undefined && l.id.toLowerCase().includes(themeFilterTerm.toLowerCase()) + ), [uid] ) - let officialThemes = themes.mapD((ls) => ls.filter((l) => l.owner === undefined), [uid]) let state: | undefined @@ -224,6 +265,22 @@ MapComplete Studio

Choose a layer to edit

+ +
+ +
+

Your layers

@@ -257,6 +314,22 @@ MapComplete Studio

Choose a theme to edit

+ +
+ +
+

Your themes