Some Code Cleanup

This commit is contained in:
2023-12-27 19:16:54 +01:00
parent 3108d9bf20
commit 9a16c4b560
38 changed files with 87 additions and 105 deletions

View File

@ -5,10 +5,9 @@ import {t} from "astro-i18n";
---
<PageLayout title={t("dashboard.page")}>
<script>
import {AES} from "crypto-js";
<script is:inline>
import {l} from "../util/util";
if (AES.decrypt(localStorage.getItem("sw-session") ?? "", import.meta.env.PUBLIC_SECRET)?.toString() === "") {
if ((localStorage.getItem("sw-session") ?? "") === "") {
window.location.href = l("/login");
}
</script>