diff --git a/README.md b/README.md index 0113245..a03ed44 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,10 @@ - [x] Email - [x] Pasword - [x] Delete Account - - [ ] Password Recovery - - [ ] Custom Error Pages from Supabase Reponse (400) - - [ ] 2FA Support - - [ ] Passwordless Login (OTP Email) - - [ ] Banners (Success and Error Messages) + - [x] Banners (Success and Error Messages) + - [ ] ~~Password Recovery~~ (Failed) + - [ ] ~~Custom Error Pages from Supabase Reponse (400)~~ (FAILED) + - [ ] ~~Passwordless Login (OTP Email)~~ (FAILED) ## Setting Up Supabase ### Selfhosting diff --git a/src/components/Banner.astro b/src/components/Banner.astro new file mode 100644 index 0000000..8d22332 --- /dev/null +++ b/src/components/Banner.astro @@ -0,0 +1,71 @@ +--- +if (Astro.url.href.endsWith('CheckEmail')) {var MessageCheckEmail = true} +else {var MessageCheckEmail = false} + +if (Astro.url.href.endsWith('AvatarUpdated')) {var MessageAvatarUpdated = true} +else {var MessageAvatarUpdated = false} + +if (Astro.url.href.endsWith('NameUpdated')) {var MessageNameUpdated = true} +else {var MessageNameUpdated = false} + +if (Astro.url.href.endsWith('EmailConfirmed')) {var MessageEmailConfirmed = true} +else {var MessageEmailConfirmed = false} + +if (Astro.url.href.endsWith('PasswordReset')) {var MessagePasswordReset = true} +else {var MessagePasswordReset = false} +--- + +{MessageCheckEmail ? +
+ : + null +} + +{MessageAvatarUpdated ? + + : + null +} + +{MessageNameUpdated ? + + : + null +} + +{MessageEmailConfirmed ? + + : + null +} + +{MessagePasswordReset ? + + : + null +} + + + \ No newline at end of file diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 8763377..16a19eb 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -1,5 +1,6 @@ --- const {Title} = Astro.props +import Banner from "@components/Banner.astro" import Head from "@components/Head.astro" import Header from "@components/Header.astro" import '@styles/root.scss' @@ -10,6 +11,7 @@ import '@styles/root.scss'{Message}
+