Revert "Bugfixes"

This commit is contained in:
Moritz Utcke
2025-04-09 19:25:21 -04:00
committed by GitHub
parent 53ea51885a
commit 4f382c150d
46 changed files with 325 additions and 482 deletions

View File

@@ -3,19 +3,22 @@
import "../style/global.css";
import "../../svelte-dialogs.config.js";
import DashboardSidebar from "../components/Dashboard/DashboardSidebar.svelte";
import { BenutzerClient } from "#components/Ausweis/types";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";
import { BenutzerClient, ObjektClient } from "#components/Ausweis/types";
const valid = validateAccessTokenServer(Astro)
if (!valid) {
Astro.redirect("/auth/login", 302)
}
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",
@@ -50,22 +53,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 type="application/ld+json" set:html={schema}></script>
<link rel="icon" type="image/svg+xml" href="/favicon.jpg" />
<meta
@@ -109,6 +112,7 @@ 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
@@ -118,15 +122,16 @@ 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
/>
<article class="box px-6 py-5 h-screen">
<slot />
</article>
<DashboardSidebar lightTheme={lightTheme} benutzer={user} client:load>
</DashboardSidebar>
<article class="box rounded-tl-none
xl:px-10 py-8">
<slot />
</article>
</main>
</body>
</html>
</html>