mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-12 13:59:08 +02:00
fix logout and modal size
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
</script>
|
||||
|
||||
<div class="modal modal-open" transition:fade>
|
||||
<div class="modal-box max-h-screen w-full max-w-5xl overflow-y-auto">
|
||||
<div class="modal-box max-h-screen w-full max-h-80 max-w-5xl overflow-y-auto">
|
||||
<div class="bg-base-100 sticky top-0 z-7">
|
||||
<ModalButtons {editorMode} onClose={close} onSave={save} onToggleEdit={toggleEdit} />
|
||||
<div class="divider"></div>
|
||||
|
@@ -203,10 +203,8 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal modal-open" transition:fade>
|
||||
<div
|
||||
class="modal-box flex max-h-screen w-full max-w-5xl flex-col items-center justify-center overflow-y-auto"
|
||||
>
|
||||
<div class="modal modal-open max-h-screen" transition:fade>
|
||||
<div class="modal-box flex w-full max-w-5xl flex-col items-center justify-center overflow-y-auto">
|
||||
<div class="flex w-full max-w-5xl items-center justify-between p-2">
|
||||
<h3 class="text-left text-lg font-bold">{create_relationship_and_person()}</h3>
|
||||
<div>
|
||||
|
@@ -74,7 +74,7 @@ export const load: PageServerLoad = async (event: RequestEvent) => {
|
||||
});
|
||||
|
||||
if (response.response.status === 200) {
|
||||
if (response.data?.Id) {
|
||||
if (response.data?.Id !== undefined) {
|
||||
if (!event.platform || !event.platform.env || !event.platform.env.GH_SESSIONS) {
|
||||
return error(500, {
|
||||
message: 'Server configuration error. GH_SESSIONS KeyValue store missing'
|
||||
@@ -93,6 +93,14 @@ export const load: PageServerLoad = async (event: RequestEvent) => {
|
||||
});
|
||||
}
|
||||
|
||||
event.cookies.delete('already_loaded', {
|
||||
path: '/login/google/callback',
|
||||
sameSite: 'lax',
|
||||
httpOnly: true,
|
||||
maxAge: 0,
|
||||
secure: import.meta.env.PROD
|
||||
});
|
||||
|
||||
setSessionTokenCookie(event, sessionToken, session.expiresAt);
|
||||
|
||||
return redirect(302, '/');
|
||||
|
@@ -3,7 +3,7 @@ import { invalidateSession, deleteSessionTokenCookie } from '$lib/server/session
|
||||
|
||||
import type { RequestEvent } from './$types';
|
||||
|
||||
export async function GET(event: RequestEvent): Promise<Response> {
|
||||
export async function load(event: RequestEvent): Promise<Response> {
|
||||
if (event.locals.session === null) {
|
||||
return redirect(302, '/login');
|
||||
}
|
Reference in New Issue
Block a user