mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-27 02:27:18 +00:00
route - track conversion
This commit is contained in:
1 parent
b6c0f5190a
commit
764d0b233a
15 files changed
+268
-3
No files matched your search
@@ -48,6 +48,7 @@
|
||||
Maximize2,
|
||||
Minimize2,
|
||||
FolderX,
|
||||
ArrowRightLeft,
|
||||
} from '@lucide/svelte';
|
||||
import { map } from '$lib/components/map/map';
|
||||
import { editMetadata } from '$lib/components/file-list/metadata/utils.svelte';
|
||||
@@ -327,6 +328,19 @@
|
||||
{i18n._('menu.new_segment')}
|
||||
</Menubar.Item>
|
||||
{/if}
|
||||
{#if $selection.type === 'route' || $selection.type === 'track' || $selection.type === 'segment'}
|
||||
{#if $selection.type !== 'track'}
|
||||
<Menubar.Separator />
|
||||
{/if}
|
||||
<Menubar.Item onclick={() => engine.convert()}>
|
||||
<ArrowRightLeft size="16" />
|
||||
{i18n._(
|
||||
$selection.type === 'route'
|
||||
? 'menu.convert_to_track'
|
||||
: 'menu.convert_to_route'
|
||||
)}
|
||||
</Menubar.Item>
|
||||
{/if}
|
||||
{/if}
|
||||
<Menubar.Separator />
|
||||
<Menubar.Item onclick={() => engine.selectAll()} disabled={noFiles}>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
FileStack,
|
||||
FileX,
|
||||
Route,
|
||||
ArrowRightLeft,
|
||||
} from '@lucide/svelte';
|
||||
import { getContext, untrack } from 'svelte';
|
||||
import { i18n } from '$lib/i18n/i18n.svelte';
|
||||
@@ -289,6 +290,14 @@
|
||||
<Plus size="16" />
|
||||
{i18n._('menu.new_segment')}
|
||||
</ContextMenu.Item>
|
||||
{/if}
|
||||
{#if isPath || node.type === 'segment'}
|
||||
<ContextMenu.Item onclick={() => engine.convert()}>
|
||||
<ArrowRightLeft size="16" />
|
||||
{i18n._(
|
||||
node.type === 'route' ? 'menu.convert_to_track' : 'menu.convert_to_route'
|
||||
)}
|
||||
</ContextMenu.Item>
|
||||
<ContextMenu.Separator />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user