Revert "Revert "Bugfixes""

This commit is contained in:
Moritz Utcke
2025-04-09 20:13:52 -04:00
committed by GitHub
parent eb8bae6d69
commit 3cb71b8e2c
46 changed files with 492 additions and 335 deletions

View File

@@ -3,22 +3,19 @@
import "../style/global.css";
import "../../svelte-dialogs.config.js";
import DashboardSidebar from "../components/Dashboard/DashboardSidebar.svelte";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { BenutzerClient, ObjektClient } from "#components/Ausweis/types";
const valid = validateAccessTokenServer(Astro)
if (!valid) {
Astro.redirect("/auth/login", 302)
}
import { BenutzerClient } from "#components/Ausweis/types";
export interface Props {
title: string;
user: BenutzerClient
user: BenutzerClient;
}
const { title, user } = Astro.props;
if (!user) {
Astro.redirect("/auth/login", 302);
}
const schema = JSON.stringify({
"@context": "http://schema.org",
"@type": "Corporation",
@@ -53,22 +50,22 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
if (import.meta.env.PROD) {
H.init("1jdkoe52", {
serviceName: "online-energieausweis",
backendUrl: "https://highlight-backend.online-energieausweis.org/public",
backendUrl:
"https://highlight-backend.online-energieausweis.org/public",
tracingOrigins: true,
networkRecording: {
enabled: true,
recordHeadersAndBody: true
}
})
recordHeadersAndBody: true,
},
});
}
</script>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<script type="application/ld+json" set:html={schema}></script>
<script type="application/ld+json" set:html={schema} />
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
<meta
@@ -112,7 +109,6 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
</head>
<body>
<main
class="p-0 grid max-w-[1920px]
xs:grid-cols-[minmax(1fr,1fr)] xs:gap-1 xs:p-0
@@ -122,16 +118,15 @@ let lightTheme = Astro.cookies.get("theme")?.value === "light";
xl:grid-cols-[minmax(150px,350px)1fr] xl:gap-4 xl:p-6
2xl:grid-cols-[minmax(150px,300px)1fr] 2xl:gap-5 2xl:p-6"
>
<DashboardSidebar
lightTheme={lightTheme}
benutzer={user}
client:load
/>
<DashboardSidebar lightTheme={lightTheme} benutzer={user} client:load>
</DashboardSidebar>
<article class="box rounded-tl-none
xl:px-10 py-8">
<slot />
</article>
<article class="box px-6 py-5 h-screen">
<slot />
</article>
</main>
</body>
</html>
</html>