SpecialVis: add readonly mode to ComparisonTable

This commit is contained in:
Pieter Vander Vennet 2024-01-16 04:21:11 +01:00
parent 915cad2253
commit b26ffaaf22
3 changed files with 60 additions and 28 deletions

View file

@ -16,6 +16,8 @@
export let feature: Feature
export let layer: LayerConfig
export let readonly = false
let currentStep: "init" | "applying" | "done" = "init"
/**
@ -49,17 +51,19 @@
{externalProperties[key]}
{/if}
</td>
<td>
{#if currentStep === "init"}
<button class="small" on:click={() => apply(key)}>
Apply
</button>
{:else if currentStep === "applying"}
<Loading />
{:else if currentStep === "done"}
<div class="thanks">Done</div>
{:else }
<div class="alert">Error</div>
{/if}
</td>
{#if !readonly}
<td>
{#if currentStep === "init"}
<button class="small" on:click={() => apply(key)}>
Apply
</button>
{:else if currentStep === "applying"}
<Loading />
{:else if currentStep === "done"}
<div class="thanks">Done</div>
{:else }
<div class="alert">Error</div>
{/if}
</td>
{/if}
</tr>