fixes list saving

This commit is contained in:
Christian Beutel
2025-08-28 14:09:50 +02:00
parent c867fd7319
commit 432176d8f5
4 changed files with 7 additions and 6 deletions

View File

@@ -197,11 +197,10 @@
{/if}
</div>
{/if}
<div class="flex gap-x-4 gap-y-1 text-base flex-wrap">
{#if trail.category}
{#if trail.expand?.category?.name || trail.category}
<p>
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
</p>
{/if}
{#if trail.location}

View File

@@ -152,9 +152,9 @@
</div>
{/if}
<div class="flex flex-wrap gap-x-8 gap-y-1">
{#if trail.category}
{#if trail.expand?.category?.name || trail.category}
<p>
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
</p>
{/if}
{#if trail.location}

View File

@@ -95,7 +95,6 @@ export async function lists_show(id: string, handle?: string, f: (url: RequestIn
for (const trail of response.expand?.trails ?? []) {
const gpxData: string = await fetchGPX(trail, f);
trail.expand.gpx_data = gpxData;
trail.category = trail.expand?.category?.name ?? "-";
}
list.set(response);

View File

@@ -88,6 +88,9 @@ export class LayerManager {
addLayer(id: string, layer: BaseLayer) {
if(!layer.spec) {
return;
}
if (this.layers[id] && this.map.getLayer(id)) {
// update sources and return
for (const [sourceId, s] of Object.entries(layer.spec.sources)) {