feat: add share target to PWA
This commit is contained in:
7 files changed
+91
-8
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user