feat: add share target to PWA

This commit is contained in:
Xylight committed 2025-11-17 18:17:23 -08:00
1 parent 9945ef64cb
commit 5b0caf62a2
7 files changed
+91 -8

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { photonify } from '$lib/app/markdown/renderers/plugins'
import { redirect } from '@sveltejs/kit'
export async function load({ url }) {
const link = url.searchParams.get('localize')
if (link) {
const localized = photonify(link)
if (localized) redirect(302, localized)
}
}
+5
View File
@@ -0,0 +1,5 @@
import { redirect } from '@sveltejs/kit'
export async function load({ params }) {
redirect(302, `/go?localize=${params.link}`)
}
@@ -58,8 +58,7 @@
<Button
{loading}
disabled={loading}
size="md"
rounding="pill"
size="lg"
color="primary"
onclick={fetchOnHome}
>
@@ -68,7 +67,7 @@
})}
</Button>
{/if}
<Button size="md" rounding="pill" onclick={() => history.back()}>
<Button size="lg" onclick={() => history.back()}>
{$t('routes.postRedirect.actions.back')}
</Button>
</div>