mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-02 10:02:12 +00:00
fix embedding + playground
This commit is contained in:
@@ -16,10 +16,12 @@
|
||||
import { i18n } from '$lib/i18n.svelte';
|
||||
import { settings } from '$lib/logic/settings';
|
||||
import { loadFiles } from '$lib/logic/file-actions';
|
||||
import { onMount } from 'svelte';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { page } from '$app/state';
|
||||
import { gpxStatistics, slicedGPXStatistics } from '$lib/logic/statistics';
|
||||
import { getURLForGoogleDriveFile } from '$lib/components/embedding/Embedding';
|
||||
import { getURLForGoogleDriveFile } from '$lib/components/embedding/embedding';
|
||||
import { db } from '$lib/db';
|
||||
import { fileStateCollection } from '$lib/logic/file-state';
|
||||
|
||||
const {
|
||||
treeFileView,
|
||||
@@ -49,6 +51,14 @@
|
||||
loadFiles(files.filter((file) => file !== null));
|
||||
});
|
||||
}
|
||||
|
||||
fileStateCollection.connectToDatabase(db);
|
||||
settings.connectToDatabase(db);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
fileStateCollection.disconnectFromDatabase();
|
||||
settings.disconnectFromDatabase();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { onMount } from 'svelte';
|
||||
// import Embedding from '$lib/components/embedding/Embedding.svelte';
|
||||
import Embedding from '$lib/components/embedding/Embedding.svelte';
|
||||
import {
|
||||
getMergedEmbeddingOptions,
|
||||
type EmbeddingOptions,
|
||||
} from '$lib/components/embedding/Embedding';
|
||||
} from '$lib/components/embedding/embedding';
|
||||
|
||||
let embeddingOptions: EmbeddingOptions | undefined = undefined;
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
</script>
|
||||
|
||||
{#if embeddingOptions}
|
||||
<!-- <Embedding options={embeddingOptions} hash={$page.url.hash} /> -->
|
||||
<Embedding options={embeddingOptions} hash={page.url.hash} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user