Dieser Commit ist enthalten in:
Ursprung
91978ce03c
Commit
7cf76bc7c7
@ -5,14 +5,16 @@ import {t} from "astro-i18n";
|
||||
---
|
||||
|
||||
<PageLayout title={t("dashboard.page")}>
|
||||
<script is:inline data-astro-rerun type="module">
|
||||
<script>
|
||||
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>
|
@ -7,15 +7,17 @@ import localBau from "@images/2023-10-08_20.43.43.png";
|
||||
---
|
||||
|
||||
<NavbarLayout title={t("login.page")}>
|
||||
<script is:inline data-astro-rerun type="module">
|
||||
<script>
|
||||
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"), {history: "replace"});
|
||||
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"/>
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren