route - track conversion

This commit is contained in:
vcoppe committed 2026-10-26 19:06:19 +01:00
1 parent b6c0f5190a
commit 764d0b233a
15 files changed
+268 -3

No files matched your search

@@ -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}