mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-11-06 06:21:08 +00:00
progress
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import { selection } from '$lib/components/file-list/Selection';
|
||||
import Help from '$lib/components/Help.svelte';
|
||||
import { MountainSnow } from '@lucide/svelte';
|
||||
import { dbUtils } from '$lib/db';
|
||||
import { map } from '$lib/components/map/map.svelte';
|
||||
import { map } from '$lib/components/map/utils.svelte';
|
||||
import { i18n } from '$lib/i18n.svelte';
|
||||
import { getURLForLanguage } from '$lib/utils';
|
||||
import { selection } from '$lib/logic/selection.svelte';
|
||||
import { fileActions } from '$lib/logic/file-actions.svelte';
|
||||
|
||||
let props: {
|
||||
class?: string;
|
||||
} = $props();
|
||||
|
||||
let validSelection = $derived($selection.size > 0);
|
||||
let validSelection = $derived(selection.value.size > 0);
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-full max-w-80 {props.class ?? ''}">
|
||||
@@ -21,8 +21,8 @@
|
||||
class="whitespace-normal h-fit"
|
||||
disabled={!validSelection}
|
||||
onclick={async () => {
|
||||
if (map.current) {
|
||||
dbUtils.addElevationToSelection(map.current);
|
||||
if (map.value) {
|
||||
fileActions.addElevationToSelection(map.value);
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user