style: run eslint and prettier
All checks were successful
TrafficCue CI / check (push) Successful in 58s
TrafficCue CI / build (push) Successful in 49s

This commit is contained in:
Cfp
2025-08-14 13:38:34 +02:00
parent 198cd4eb3d
commit 67e5cba264
3 changed files with 19 additions and 8 deletions

View File

@ -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}

View File

@ -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}

View File

@ -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}