store settings

This commit is contained in:
vcoppe
2024-05-04 15:10:30 +02:00
parent b85dc81c14
commit 71d68a3b5c
10 changed files with 114 additions and 75 deletions

View File

@@ -7,7 +7,8 @@
import { CircleHelp } from 'lucide-svelte';
import { map, selectedFiles, Tool } from '$lib/stores';
import { brouterProfiles, privateRoads, routing, routingProfile } from './Routing';
import { settings } from '$lib/db';
import { brouterProfiles, routingProfileSelectItem } from './Routing';
import { _ } from 'svelte-i18n';
import { get } from 'svelte/store';
@@ -23,6 +24,8 @@
let selectedId: string | null = null;
let active = false;
const { privateRoads, routing } = settings;
$: if ($map) {
// remove controls for deleted files
routingControls.forEach((controls, fileId) => {
@@ -82,7 +85,7 @@
<ToolbarItemMenu tool={Tool.ROUTING} bind:active>
<div class="w-full flex flex-row justify-between items-center gap-2">
<Label>{$_('toolbar.routing.activity')}</Label>
<Select.Root bind:selected={$routingProfile}>
<Select.Root bind:selected={$routingProfileSelectItem}>
<Select.Trigger class="h-8 w-40">
<Select.Value />
</Select.Trigger>