forked from MapComplete/MapComplete
Compare commits
7 commits
develop
...
Robin-patc
| Author | SHA1 | Date | |
|---|---|---|---|
| e30be5a163 | |||
| bd3c266a4d | |||
| 2cf0bc1866 | |||
| c0ee578df1 | |||
| ccab070938 | |||
| 40bd564f86 | |||
| 36b3faf2d1 |
7 changed files with 122 additions and 15 deletions
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
|
|
@ -60,5 +60,10 @@
|
|||
"type": "Gitea",
|
||||
"name": "MapComplete Forgejo"
|
||||
}
|
||||
]
|
||||
],
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"*": "${capture}.license"
|
||||
},
|
||||
"explorer.fileNesting.expand": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -545,6 +545,23 @@
|
|||
"osmTags": "kids_area!=no"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "self_checkout",
|
||||
"options": [
|
||||
{
|
||||
"question": {
|
||||
"en": "Has self-checkout",
|
||||
"nl": "Heeft zelfscan"
|
||||
},
|
||||
"osmTags": {
|
||||
"or": [
|
||||
"self_checkout=yes",
|
||||
"self_checkout=only"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"allowMove": false
|
||||
|
|
|
|||
|
|
@ -3543,6 +3543,81 @@
|
|||
"filter": [
|
||||
"filters.kids_area"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "self_checkout",
|
||||
"labels": [
|
||||
"self_checkout_questions"
|
||||
],
|
||||
"question": {
|
||||
"en": "Does this place offer self-checkout?",
|
||||
"nl": "Biedt deze plaats zelfscannen aan?"
|
||||
},
|
||||
"questionHint": {
|
||||
"en": "e.g. handheld scanners or a self-checkout kiosk",
|
||||
"nl": "bijv. handscanners of een zelfscankassa"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "self_checkout=yes",
|
||||
"then": {
|
||||
"en": "This place offers self-checkout",
|
||||
"nl": "Deze plaats biedt zelfscannen aan"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "self_checkout=no",
|
||||
"then": {
|
||||
"en": "This place does not offer self-checkout",
|
||||
"nl": "Deze plaats biedt geen zelfscannen aan"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "self_checkout=only",
|
||||
"then": {
|
||||
"en": "This place <b>only</b> offers self-checkout",
|
||||
"nl": "Deze plaats biedt <b>enkel</b> zelfscannen aan"
|
||||
}
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
"filters.self_checkout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "self_checkout_type",
|
||||
"labels": [
|
||||
"self_checkout_questions"
|
||||
],
|
||||
"question": {
|
||||
"en": "What kind of self-checkout does this place offer?",
|
||||
"nl": "Wat voor soort zelfscannen biedt deze plaats aan?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "self_checkout:handheld=yes",
|
||||
"ifnot": "self_checkout:handheld=no",
|
||||
"then": {
|
||||
"en": "This place offers self-checkout using a handheld scanner",
|
||||
"nl": "Deze plaats biedt zelfscannen met een handscanner aan"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": "self_checkout:self_scan=yes",
|
||||
"ifnot": "self_checkout:self_scan=no",
|
||||
"then": {
|
||||
"en": "This place offers self-checkout using a self-checkout kiosk",
|
||||
"nl": "Deze plaats biedt zelfscannen met een zelfscankassa aan"
|
||||
}
|
||||
}
|
||||
],
|
||||
"condition": {
|
||||
"or": [
|
||||
"self_checkout=yes",
|
||||
"self_checkout=only"
|
||||
]
|
||||
},
|
||||
"multiAnswer": true
|
||||
}
|
||||
],
|
||||
"allowMove": false,
|
||||
|
|
|
|||
|
|
@ -1644,7 +1644,8 @@
|
|||
}
|
||||
},
|
||||
"description",
|
||||
"toilet_at_amenity_lib.all"
|
||||
"toilet_at_amenity_lib.all",
|
||||
"self_checkout_questions"
|
||||
],
|
||||
"filter": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,10 @@
|
|||
"parking_spaces",
|
||||
"parking_ticket_machine",
|
||||
{
|
||||
"builtin": "charging_station",
|
||||
"builtin": [
|
||||
"charging_station",
|
||||
"charge_point"
|
||||
],
|
||||
"override": {
|
||||
"minzoom": 18
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
"render": {
|
||||
"special": {
|
||||
"type": "import_button",
|
||||
"targetLayer": "transit_stops",
|
||||
"targetLayer": "all_transit_stops",
|
||||
"tags": "_tags",
|
||||
"text": {
|
||||
"en": "Add this stop"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||
import tag2link from "tag2link/index.json"
|
||||
import { onMount } from "svelte"
|
||||
|
||||
export let tags: UIEventSource<Record<string, any>>
|
||||
export let key: string
|
||||
|
|
@ -30,17 +31,22 @@
|
|||
}
|
||||
|
||||
const url = tag2linkData.find((item) => item.key === `Key:${key}`)?.url
|
||||
|
||||
const values: string[] =
|
||||
typeof $tags[key] === "string" ? $tags[key].split(";").map((v: string) => v.trim()) : []
|
||||
|
||||
console.log(`TagLink for ${key} values: [${values.join(", ")}]`)
|
||||
</script>
|
||||
|
||||
{#if url}
|
||||
<a
|
||||
href={url.replace("$1", $tags[key])}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="tag-link"
|
||||
>
|
||||
{$tags[key]}
|
||||
{#if url && values.length > 0}
|
||||
{#each values as value, index}
|
||||
<span class="tag-link">
|
||||
{#if index > 0}; {/if}
|
||||
<a href={url.replace("$1", value)} target="_blank" rel="noopener noreferrer" class="tag-link">
|
||||
{value}
|
||||
</a>
|
||||
</span>
|
||||
{/each}
|
||||
{:else}
|
||||
{$tags[key]}
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue