Reformat
This commit is contained in:
parent
63f8f81321
commit
16647fb3e1
|
@ -2,7 +2,7 @@
|
||||||
import { enhance } from "$app/forms"
|
import { enhance } from "$app/forms"
|
||||||
import type { Theme, User } from "$lib"
|
import type { Theme, User } from "$lib"
|
||||||
import ThemePicker from "./ThemePicker.svelte"
|
import ThemePicker from "./ThemePicker.svelte"
|
||||||
import { page } from '$app/stores';
|
import { page } from "$app/stores"
|
||||||
|
|
||||||
let { theme, user } = $props<{ theme: Theme; user: User }>()
|
let { theme, user } = $props<{ theme: Theme; user: User }>()
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const load = async ({ locals, url }) => {
|
||||||
throw redirect(302, "/")
|
throw redirect(302, "/")
|
||||||
}
|
}
|
||||||
|
|
||||||
let from = url.searchParams.get('from')
|
let from = url.searchParams.get("from")
|
||||||
|
|
||||||
return { from }
|
return { from }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
let { form, data } = $props()
|
let { form, data } = $props()
|
||||||
|
|
||||||
const from = data.from || "/";
|
const from = data.from || "/"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form action="?/login" method="POST" use:enhance>
|
<form action="?/login" method="POST" use:enhance>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<input id="username" name="username" type="text" required />
|
<input id="username" name="username" type="text" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input id="from" name="from" type="hidden" value={from}>
|
<input id="from" name="from" type="hidden" value={from} />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
|
|
Loading…
Reference in New Issue