mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-19 09:22:12 +00:00
import and export of routes, ref #192
This commit is contained in:
1 parent
da9abbae5e
commit
dc36de2a48
10 files changed
+620
-62
No files matched your search
@@ -21,6 +21,7 @@
|
||||
Orbit,
|
||||
Thermometer,
|
||||
SquareActivity,
|
||||
Route,
|
||||
} from '@lucide/svelte';
|
||||
import { i18n } from '$lib/i18n.svelte';
|
||||
import { engine, type ExportOptions } from '$lib/engine';
|
||||
@@ -37,6 +38,7 @@
|
||||
atemp: true,
|
||||
power: true,
|
||||
osm: false,
|
||||
asRoute: false,
|
||||
});
|
||||
// the files that are exported
|
||||
let fileIds: string[] = $derived.by(() => {
|
||||
@@ -61,6 +63,8 @@
|
||||
atemp: !available.atemp,
|
||||
power: !available.power,
|
||||
osm: !available.osm,
|
||||
// always possible
|
||||
asRoute: false,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -113,6 +117,7 @@
|
||||
atemp: exportOptions.atemp && !hide.atemp,
|
||||
power: exportOptions.power && !hide.power,
|
||||
osm: exportOptions.osm && !hide.osm,
|
||||
asRoute: exportOptions.asRoute,
|
||||
};
|
||||
if (exportState.current === ExportState.SELECTION) {
|
||||
exportSelectedFiles(options);
|
||||
@@ -192,6 +197,13 @@
|
||||
{i18n._('quantities.osm_extensions')}
|
||||
</Label>
|
||||
</div>
|
||||
<div class="flex flex-row items-center gap-1.5">
|
||||
<Checkbox id="export-as-route" bind:checked={exportOptions.asRoute} />
|
||||
<Label for="export-as-route" class="flex flex-row items-center gap-1">
|
||||
<Route size="16" />
|
||||
{i18n._('menu.export_as_route', 'Export as route')}
|
||||
</Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Dialog.Content>
|
||||
|
||||
Reference in new issue
Block a user