feat: Enhance login functionality with Discord integration and improve code formatting
Some checks failed
SteamWarCI Build failed

This commit is contained in:
2025-11-13 14:32:06 +01:00
parent b4099c6b88
commit d79c532009
5 changed files with 268 additions and 334 deletions

View File

@@ -1,21 +1,21 @@
---
import LoginComponent from "@components/Login.svelte";
import NavbarLayout from "@layouts/NavbarLayout.astro";
import {t} from "astro-i18n";
import { t } from "astro-i18n";
import BackgroundImage from "../components/BackgroundImage.astro";
---
<NavbarLayout title={t("login.page")}>
<script>
import {l} from "../util/util";
import {navigate} from "astro:transitions/client";
import {loggedIn} from "../components/repo/authv2";
import {get} from "svelte/store";
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 (get(loggedIn)) {
navigate(l("/dashboard"), {history: "replace"});
navigate(l("/dashboard"), { history: "replace" });
}
}
});
@@ -23,8 +23,8 @@ import BackgroundImage from "../components/BackgroundImage.astro";
<div class="h-screen w-screen fixed -z-10">
<BackgroundImage />
</div>
<div class="h-screen mx-auto p-8 rounded-b-md pt-40 sm:pt-28 md:pt-14 flex flex-col justify-center items-center
dark:text-white " style="width: min(100vw, 75em);">
<LoginComponent client:load/>
<div class="h-screen mx-auto p-8 rounded-b-md pt-40 sm:pt-28 md:pt-14 flex flex-col justify-center items-center
dark:text-white" style="width: min(100vw, 75em);">
<LoginComponent client:load />
</div>
</NavbarLayout>
</NavbarLayout>