From d18f77bd57fa238b48e903ad897006208ddfa3ed Mon Sep 17 00:00:00 2001 From: vcoppe Date: Mon, 30 Sep 2024 18:17:20 +0200 Subject: [PATCH] drop file tabs to desktop --- gpx/src/io.ts | 2 +- .../file-list/FileListNodeContent.svelte | 662 +++++++++--------- 2 files changed, 339 insertions(+), 325 deletions(-) diff --git a/gpx/src/io.ts b/gpx/src/io.ts index f40e29f7..fdd28e5a 100644 --- a/gpx/src/io.ts +++ b/gpx/src/io.ts @@ -61,7 +61,7 @@ export function parseGPX(gpxData: string): GPXFile { return new GPXFile(parsed); } -export function buildGPX(file: GPXFile, exclude: string[]): string { +export function buildGPX(file: GPXFile, exclude: string[] = []): string { const gpx = file.toGPXFileType(exclude); const builder = new XMLBuilder({ diff --git a/website/src/lib/components/file-list/FileListNodeContent.svelte b/website/src/lib/components/file-list/FileListNodeContent.svelte index 5ce40fc5..b0961a0a 100644 --- a/website/src/lib/components/file-list/FileListNodeContent.svelte +++ b/website/src/lib/components/file-list/FileListNodeContent.svelte @@ -1,374 +1,388 @@
- {#if node instanceof Map} - {#each node as [fileId, file] (fileId)} -
- -
- {/each} - {:else if node instanceof GPXFile} - {#if item instanceof ListWaypointsItem} - {#each node.wpt as wpt, i (wpt)} -
- -
- {/each} - {:else if waypointRoot} - {#if node.wpt.length > 0} -
- -
- {/if} - {:else} - {#each node.children as child, i (child)} -
- -
- {/each} - {/if} - {:else if node instanceof Track} - {#each node.children as child, i (child)} -
- -
- {/each} - {/if} + {#if node instanceof Map} + {#each node as [fileId, file] (fileId)} +
+ +
+ {/each} + {:else if node instanceof GPXFile} + {#if item instanceof ListWaypointsItem} + {#each node.wpt as wpt, i (wpt)} +
+ +
+ {/each} + {:else if waypointRoot} + {#if node.wpt.length > 0} +
+ +
+ {/if} + {:else} + {#each node.children as child, i (child)} +
+ +
+ {/each} + {/if} + {:else if node instanceof Track} + {#each node.children as child, i (child)} +
+ +
+ {/each} + {/if}
{#if node instanceof GPXFile && item instanceof ListFileItem} - {#if !waypointRoot} - - {/if} + {#if !waypointRoot} + + {/if} {/if}