Skip to content

Commit

Permalink
Make browse page look nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 21, 2024
1 parent 78e6cb8 commit c3cd7b7
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/lib/browse/schemes/InterventionPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import { afterUpdate } from "svelte";
export let description: string;
// Note these come from maplibre, meaning nested fields (like pipeline) are stringified
export let props: { [name: string]: any };
export let schemesGj: Schemes;
export let filterSchemeText: string;
Expand Down Expand Up @@ -121,7 +122,7 @@
{/if}

{#if props.pipeline}
{@const p = props.pipeline}
{@const p = JSON.parse(props.pipeline)}
{#if p.atf4_type}
<p>
<b>ATF4 type</b>
Expand All @@ -141,6 +142,30 @@
<DescribePipelineTiming props={p} />
{/if}

{#if props.v2}
{@const p = JSON.parse(props.v2)}
{#if p.intervention_type}
<p>
<b>Type</b>
: {p.intervention_type}
</p>
{/if}
{#if p.work_type}
<p>
<b>What kind of infrastructure is mapped</b>
: {p.work_type}
</p>
{/if}

{#if p.for_cycling && props.v2.for_walking_wheeling}
<p>For cycling, walking, and wheeling</p>
{:else if p.for_cycling}
<p>Only for cycling</p>
{:else if p.for_walking_wheeling}
<p>Only for walking and wheeling</p>
{/if}
{/if}

<hr />

<h2>{description}</h2>
Expand Down

0 comments on commit c3cd7b7

Please sign in to comment.