style: run eslint and prettier
This commit is contained in:
@ -18,4 +18,4 @@
|
|||||||
{#if tags["internet_access:ssid"]}
|
{#if tags["internet_access:ssid"]}
|
||||||
<Badge>{tags["internet_access:ssid"]}</Badge>
|
<Badge>{tags["internet_access:ssid"]}</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@ -3,15 +3,21 @@
|
|||||||
|
|
||||||
let { tags } = $props();
|
let { tags } = $props();
|
||||||
|
|
||||||
const TAGS = ["cuisine", "indoor_seating", "outdoor_seating", "takeaway", "drive_through"];
|
const TAGS = [
|
||||||
|
"cuisine",
|
||||||
|
"indoor_seating",
|
||||||
|
"outdoor_seating",
|
||||||
|
"takeaway",
|
||||||
|
"drive_through",
|
||||||
|
];
|
||||||
|
|
||||||
const matchingTags = TAGS.filter(tag => tag in tags);
|
const matchingTags = TAGS.filter((tag) => tag in tags);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if matchingTags.length > 0}
|
{#if matchingTags.length > 0}
|
||||||
<h3 class="text-lg font-bold mt-2">Restaurant</h3>
|
<h3 class="text-lg font-bold mt-2">Restaurant</h3>
|
||||||
<ul class="flex gap-2 flex-wrap">
|
<ul class="flex gap-2 flex-wrap">
|
||||||
{#each matchingTags as tag}
|
{#each matchingTags as tag, _index (tag)}
|
||||||
{#if tag != "no"}
|
{#if tag != "no"}
|
||||||
<Badge>
|
<Badge>
|
||||||
{tag}{tags[tag] == "yes" ? "" : ": " + tags[tag]}
|
{tag}{tags[tag] == "yes" ? "" : ": " + tags[tag]}
|
||||||
@ -19,4 +25,4 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@ -215,9 +215,10 @@
|
|||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
alert(JSON.stringify(elements, null, 3))
|
alert(JSON.stringify(elements, null, 3));
|
||||||
console.log(elements);
|
console.log(elements);
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
Show raw data
|
Show raw data
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
@ -257,7 +258,11 @@
|
|||||||
<h3 class="text-lg font-bold mt-2">Payment Methods</h3>
|
<h3 class="text-lg font-bold mt-2">Payment Methods</h3>
|
||||||
<ul style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
|
<ul style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
|
||||||
{#each Object.entries(tags).filter( ([key]) => key.startsWith("payment:"), ) as [key, value] (key)}
|
{#each Object.entries(tags).filter( ([key]) => key.startsWith("payment:"), ) as [key, value] (key)}
|
||||||
<Badge>{key.replace("payment:", "")}{value == "yes" ? "" : ": " + value}</Badge>
|
<Badge
|
||||||
|
>{key.replace("payment:", "")}{value == "yes"
|
||||||
|
? ""
|
||||||
|
: ": " + value}</Badge
|
||||||
|
>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user