Refactor authentication and implement password reset.
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@@ -9,10 +9,12 @@ import BackgroundImage from "../components/BackgroundImage.astro";
|
||||
<script>
|
||||
import {l} from "../util/util";
|
||||
import {navigate} from "astro:transitions/client";
|
||||
import {loggedIn} from "../components/repo/authv2";
|
||||
import {get} from "svelte/store";
|
||||
|
||||
document.addEventListener("astro:page-load", () => {
|
||||
if (window.location.href.endsWith("/login") || window.location.href.endsWith("/login/")) {
|
||||
if ((localStorage.getItem("sw-session") ?? "") !== "") {
|
||||
if (get(loggedIn)) {
|
||||
navigate(l("/dashboard"), {history: "replace"});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user