Updates
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2024-03-16 00:15:54 +01:00
Ursprung 91978ce03c
Commit 7cf76bc7c7
2 geänderte Dateien mit 14 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -5,14 +5,16 @@ import {t} from "astro-i18n";
--- ---
<PageLayout title={t("dashboard.page")}> <PageLayout title={t("dashboard.page")}>
<script is:inline data-astro-rerun type="module"> <script>
import {l} from "../util/util"; import {l} from "../util/util";
import {navigate} from "astro:transitions/client"; import {navigate} from "astro:transitions/client";
document.addEventListener("astro:page-load", () => {
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) { if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
if ((localStorage.getItem("sw-session") ?? "") === "") { if ((localStorage.getItem("sw-session") ?? "") === "") {
navigate(l("/login"), {}); navigate(l("/login"), {});
} }
} }
});
</script> </script>
<Dashboard client:only="svelte" /> <Dashboard client:only="svelte" />
</PageLayout> </PageLayout>

Datei anzeigen

@ -7,15 +7,17 @@ import localBau from "@images/2023-10-08_20.43.43.png";
--- ---
<NavbarLayout title={t("login.page")}> <NavbarLayout title={t("login.page")}>
<script is:inline data-astro-rerun type="module"> <script>
import {l} from "../util/util"; import {l} from "../util/util";
import {navigate} from "astro:transitions/client"; import {navigate} from "astro:transitions/client";
document.addEventListener("astro:page-load", () => {
if (window.location.href.endsWith("/login") || window.location.href.endsWith("/login/")) { if (window.location.href.endsWith("/login") || window.location.href.endsWith("/login/")) {
if ((localStorage.getItem("sw-session") ?? "") !== "") { if ((localStorage.getItem("sw-session") ?? "") !== "") {
navigate(l("/dashboard"), {history: "replace"}); navigate(l("/dashboard"), {history: "replace"});
} }
} }
});
</script> </script>
<Image src={localBau} alt="Bau" width="1920" height="1080" <Image src={localBau} alt="Bau" width="1920" height="1080"
class="w-screen h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false"/> class="w-screen h-screen dark:brightness-75 fixed -z-10 object-cover" draggable="false"/>