⬆️ Upgraded SvelteKit
This commit is contained in:
+11
-7
@@ -4,14 +4,18 @@
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script lang="ts" context="module">
|
||||
import { signedIn } from '$lib/stores';
|
||||
throw new Error(
|
||||
'@migration task: Check code was safely removed (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292722)'
|
||||
);
|
||||
|
||||
export async function load({ session }) {
|
||||
if (session.authenticated) {
|
||||
signedIn.set(true);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
// import { signedIn } from '$lib/stores';
|
||||
|
||||
// export async function load({ session }) {
|
||||
// if (session.authenticated) {
|
||||
// signedIn.set(true);
|
||||
// }
|
||||
// return {};
|
||||
// }
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
+4
-22
@@ -3,29 +3,11 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script context="module" lang="ts">
|
||||
export async function load({ session, url }) {
|
||||
const verified = url.searchParams.get('verified');
|
||||
const returnTo =
|
||||
url.searchParams.get('returnTo') !== null
|
||||
? url.searchParams.get('returnTo')
|
||||
: '/dashboard';
|
||||
if (session.authenticated) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: returnTo
|
||||
};
|
||||
}
|
||||
return {
|
||||
status: 200,
|
||||
props: {
|
||||
verified: verified !== null
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
throw new Error(
|
||||
'@migration task: Add data prop (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292707)'
|
||||
);
|
||||
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import { navbarVisible } from '$lib/stores';
|
||||
import { browser } from '$app/env';
|
||||
+4
-11
@@ -3,18 +3,11 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script lang="ts" context="module">
|
||||
export async function load({ url }) {
|
||||
const error = url.searchParams.get('error');
|
||||
return {
|
||||
props: {
|
||||
error
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
throw new Error(
|
||||
'@migration task: Add data prop (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292707)'
|
||||
);
|
||||
|
||||
export let error: string;
|
||||
</script>
|
||||
|
||||
+5
-13
@@ -3,20 +3,12 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script lang="ts" context="module">
|
||||
export async function load({ url }) {
|
||||
const token = url.searchParams.get('token');
|
||||
|
||||
return {
|
||||
props: {
|
||||
token
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { getLocalization } from '../../lib/i18n';
|
||||
throw new Error(
|
||||
'@migration task: Add data prop (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292707)'
|
||||
);
|
||||
|
||||
import { getLocalization } from '../../../lib/i18n';
|
||||
|
||||
const { t } = getLocalization();
|
||||
export let token: string;
|
||||
-12
@@ -3,18 +3,6 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script context="module" lang="ts">
|
||||
export async function load({ session }) {
|
||||
if (session.authenticated) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: '/dashboard'
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { createForm } from 'felte';
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
-12
@@ -3,18 +3,6 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script context="module" lang="ts">
|
||||
export async function load({ session }) {
|
||||
if (session.authenticated) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: '/dashboard'
|
||||
};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
import { navbarVisible } from '$lib/stores';
|
||||
-16
@@ -3,22 +3,6 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<script context="module" lang="ts">
|
||||
export async function load({ session }) {
|
||||
if (!session.authenticated) {
|
||||
return {
|
||||
status: 302,
|
||||
redirect: '/account/login?returnTo=/account/settings'
|
||||
};
|
||||
}
|
||||
return {
|
||||
props: {
|
||||
email: session.email
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
import { DateTime } from 'luxon';
|
||||
Reference in New Issue
Block a user