diff --git a/src/components/SidebarRight.astro b/src/components/SidebarRight.astro index b1c968cc..696d5233 100644 --- a/src/components/SidebarRight.astro +++ b/src/components/SidebarRight.astro @@ -1,4 +1,15 @@ +--- +import { validateAccessTokenServer } from "#server/lib/validateAccessToken"; +import SidebarWidgetLogin from "./SidebarWidgetLogin.svelte"; +import SidebarWidgetProfile from "./SidebarWidgetProfile.svelte" + +const loggedin = await validateAccessTokenServer(Astro) +--- +
+ { !loggedin ? + : } +

Rufen Sie uns an
Wir sind gerne für Sie da diff --git a/src/components/SidebarWidgetLogin.svelte b/src/components/SidebarWidgetLogin.svelte new file mode 100644 index 00000000..6cb248dd --- /dev/null +++ b/src/components/SidebarWidgetLogin.svelte @@ -0,0 +1,96 @@ + + + + + diff --git a/src/components/SidebarWidgetProfile.svelte b/src/components/SidebarWidgetProfile.svelte new file mode 100644 index 00000000..18a5f194 --- /dev/null +++ b/src/components/SidebarWidgetProfile.svelte @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/src/components/UMBE_SidebarRight.astro b/src/components/UMBE_SidebarRight.astro index 58f4a799..efce530b 100644 --- a/src/components/UMBE_SidebarRight.astro +++ b/src/components/UMBE_SidebarRight.astro @@ -1,5 +1,5 @@ --- -import Login from "#components/UMBE_card-login.svelte"; +import Login from "#components/SidebarWidgetLogin.svelte"; import Contact from "#components/UMBE_card-contact.svelte"; import Review from "#components/UMBE_card-review.svelte"; import VApromo from "#components/UMBE_card-VA-promo.svelte"; diff --git a/src/components/UMBE_card-login.svelte b/src/components/UMBE_card-login.svelte deleted file mode 100644 index b7a16687..00000000 --- a/src/components/UMBE_card-login.svelte +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 5e2a8d86..160e81aa 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,7 @@ --- import i18next from "i18next"; +import "../style/UMBE_global.css"; import "../style/global.scss"; import "../../svelte-dialogs.config" import Footer from "../components/Footer.astro"; diff --git a/src/pages/dashboard/index.astro b/src/pages/dashboard/index.astro index 220a2ca5..30a7137a 100644 --- a/src/pages/dashboard/index.astro +++ b/src/pages/dashboard/index.astro @@ -12,7 +12,7 @@ if (!accessTokenValid) { const caller = createCaller(Astro); -const user = await caller.v1.benutzer.self(); +const user = await caller.v1.benutzer.self(undefined); const gebaeudeArray = await caller.v1.gebaeude.getMany({ limit: 5 }); ---