diff --git a/assets/layers/charging_station/bs1363.svg b/assets/layers/charging_station/bs1363.svg
new file mode 100644
index 0000000000..fc53c587f8
--- /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 0000000000..b4ccbe777f
--- /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 5b75592164..cd9069fda1 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 b3e7f14bc9..8f25c84e1c 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 d3780f61de..4a9444e362 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),*,,
diff --git a/assets/layers/food_courts/food_court.svg b/assets/layers/food_courts/food_court.svg
new file mode 100644
index 0000000000..5339efbc35
--- /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 0000000000..bb226dbab0
--- /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 0000000000..bfaa854b04
--- /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 0000000000..6c60b1953a
--- /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 0000000000..88d851378f
--- /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 0000000000..3bf1caebae
--- /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 0000000000..f06745579f
--- /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 0000000000..6f71e23321
--- /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 6dba31fa2a..38ac213b4f 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/cyclenodes/cyclenodes.json b/assets/themes/cyclenodes/cyclenodes.json
index 94c17b99df..6b38fa4356 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/food/food.json b/assets/themes/food/food.json
index f0c9e0b00b..d48f52412c 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
diff --git a/assets/themes/walkingnodes/walkingnodes.json b/assets/themes/walkingnodes/walkingnodes.json
index bd59bf50b6..e1afe13030 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
diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css
index 0f5db9ed3b..5edcd85bea 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/Logic/DetermineLayout.ts b/src/Logic/DetermineLayout.ts
index f8fac7ec8b..22a64a5cce 100644
--- a/src/Logic/DetermineLayout.ts
+++ b/src/Logic/DetermineLayout.ts
@@ -170,7 +170,7 @@ export default class DetermineLayout {
.map((mr) => mr?.marker?.find((icon) => icon.icon !== undefined)?.icon)
.find((i) => i !== undefined)
) ?? "bug"
- const icon = new TagRenderingConfig(iconTr).render.txt
+ const icon = new TagRenderingConfig(iconTr)?.render?.txt ?? "./assets/svg/bug.svg"
json = {
id: json.id,
description: json.description,
diff --git a/src/UI/StudioGUI.svelte b/src/UI/StudioGUI.svelte
index 9bc19ea725..382ee91397 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"
@@ -55,25 +56,64 @@
const studio = new StudioServer(studioUrl, uid)
let layersWithErr = studio.fetchOverview()
+ let layerFilterTerm: string = ""
let layers: Store<{ owner: number; id: string }[]> = layersWithErr.mapD((l) =>
l["success"]?.filter((l) => l.category === "layers")
)
- let selfLayers: Store<{ owner: number; id: string }[]> = layers.mapD((ls) => ls.filter((l) => l.owner === uid.data), [uid])
- let otherLayers: Store<{ owner: number; id: string }[]> = 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]
+ )
+ $: otherLayers = layers.mapD(
+ (ls) =>
+ ls.filter(
+ (l) =>
+ l.owner !== undefined &&
+ l.owner !== uid.data &&
+ l.id.toLowerCase().includes(layerFilterTerm.toLowerCase())
+ ),
[uid]
)
- let officialLayers = layers.mapD((ls) => ls.filter((l) => l.owner === undefined), [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 +264,22 @@
MapComplete Studio
Choose a layer to edit
+
+
+
Your layers
@@ -257,6 +313,22 @@
MapComplete Studio
Choose a theme to edit
+
+
+
Your themes