mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-03 02:12:12 +00:00
fix embedding + playground
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import Nav from '$lib/components/Nav.svelte';
|
||||
import Footer from '$lib/components/Footer.svelte';
|
||||
import { onMount, type Snippet } from 'svelte';
|
||||
import { convertOldEmbeddingOptions } from '$lib/components/embedding/Embedding';
|
||||
import { convertOldEmbeddingOptions } from '$lib/components/embedding/embedding';
|
||||
import { base } from '$app/paths';
|
||||
import { languages } from '$lib/languages';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import Logo from '$lib/components/Logo.svelte';
|
||||
import { getURLForLanguage } from '$lib/utils';
|
||||
import { Home, Map, BookOpenText } from '@lucide/svelte';
|
||||
import { House, Map, BookOpenText } from '@lucide/svelte';
|
||||
import { i18n } from '$lib/i18n.svelte';
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
href={getURLForLanguage(i18n.lang, '/')}
|
||||
class="text-base w-1/4 min-w-fit rounded-full"
|
||||
>
|
||||
<Home size="18" />
|
||||
<House size="18" />
|
||||
{i18n._('homepage.home')}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@@ -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