Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: language reactivity

Mayabb1715682a71
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index fc7e58d..ba2f613 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -146,40 +146,44 @@
</svelte:head>
<!-- FIXME: if user resizes between desktop/mobile, highlight of page disappears (only shows on original size) -->
-<div
- class="flex flex-col min-h-screen h-full w-full overflow-x-hidden"
- ondrop={dropFiles}
- ondragenter={(e) => handleDrag(e, true)}
- ondragover={(e) => handleDrag(e, true)}
- ondragleave={(e) => handleDrag(e, false)}
- role="region"
->
- <Layout.UploadRegion />
-
- <div>
- <Layout.MobileLogo />
- <Navbar.Desktop />
- </div>
-
- <!--
+{#key $locale}
+ <div
+ class="flex flex-col min-h-screen h-full w-full overflow-x-hidden"
+ ondrop={dropFiles}
+ ondragenter={(e) => handleDrag(e, true)}
+ ondragover={(e) => handleDrag(e, true)}
+ ondragleave={(e) => handleDrag(e, false)}
+ role="region"
+ >
+ <Layout.UploadRegion />
+
+ <div>
+ <Layout.MobileLogo />
+ <Navbar.Desktop />
+ </div>
+
+ <!--
SvelteKit throws the following warning when developing - safe to ignore as we render the children in this component:
`<slot />` or `{@render ...}` tag missing — inner content will not be rendered
-->
- <Layout.PageContent {children} />
- <div style="display:none">
- {#each locales as locale}
- <a href={localizeHref(page.url.pathname, { locale })}>{locale}</a>
- {/each}
- </div>
-
- <Layout.Toasts />
- <Layout.Dialogs />
-
- <div>
- <Layout.Footer />
- <Navbar.Mobile />
+ <Layout.PageContent {children} />
+ <div style="display:none">
+ {#each locales as locale}
+ <a href={localizeHref(page.url.pathname, { locale })}
+ >{locale}</a
+ >
+ {/each}
+ </div>
+
+ <Layout.Toasts />
+ <Layout.Dialogs />
+
+ <div>
+ <Layout.Footer />
+ <Navbar.Mobile />
+ </div>
</div>
-</div>
+{/key}
<!-- Gradients placed here to prevent it overlapping in transitions -->
<Layout.Gradients />