Remove Reload
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2024-02-28 17:42:10 +01:00
Ursprung c613cef5c4
Commit 77bf19a1c8
2 geänderte Dateien mit 12 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -9,11 +9,13 @@ import {t} from "astro-i18n";
import {l} from "../util/util";
import {navigate} from "astro:transitions/client";
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
if ((localStorage.getItem("sw-session") ?? "") === "") {
navigate(l("/login"), {});
document.addEventListener("astro:page-load", () => {
if (window.location.href.endsWith("/dashboard") || window.location.href.endsWith("/dashboard/")) {
if ((localStorage.getItem("sw-session") ?? "") === "") {
navigate(l("/login"), {});
}
}
}
});
</script>
<Dashboard client:only="svelte"/>
</PageLayout>

Datei anzeigen

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