feat(saved-routes): require server capability
This commit is contained in:
@ -98,21 +98,23 @@
|
||||
|
||||
<VehicleSelector />
|
||||
|
||||
{#await getSaved() then saved}
|
||||
{#if saved.length != 0}
|
||||
<div>
|
||||
<h2 style="margin: 5px; margin-left: 0; font-size: 1.2em;">Saved Routes</h2>
|
||||
<RequiresCapability capability="saved-routes">
|
||||
{#await getSaved() then saved}
|
||||
{#if saved.length != 0}
|
||||
<div>
|
||||
<h2 style="margin: 5px; margin-left: 0; font-size: 1.2em;">Saved Routes</h2>
|
||||
|
||||
<div style="display: flex; flex-direction: column; gap: 10px;">
|
||||
{#each saved as save}
|
||||
<Button variant="secondary" onclick={() => {
|
||||
view.switch("trip", { route: JSON.parse(save.data) })
|
||||
}}>{save.name}</Button>
|
||||
{/each}
|
||||
<div style="display: flex; flex-direction: column; gap: 10px;">
|
||||
{#each saved as save}
|
||||
<Button variant="secondary" onclick={() => {
|
||||
view.switch("trip", { route: JSON.parse(save.data) })
|
||||
}}>{save.name}</Button>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/await}
|
||||
{/if}
|
||||
{/await}
|
||||
</RequiresCapability>
|
||||
|
||||
<RequiresCapability capability="post">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user