Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Route Not Found" and "Require Authentication" views. #318

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

MelissaAutumn
Copy link
Member

Fixes #315

You'll now get either a Not Found or Auth Required page depending on what you hit in that url field vs logged in status.

Not authenticated:
Screen Shot 2024-03-14 at 10 21 55-fullpage

Not found:
Screen Shot 2024-03-14 at 10 28 28-fullpage

I had to merge the "Not authenticated" and "Is Public" app-level templates in order to fix a bug where having multiple router-view's causes onMounted to run multiple times. (Since we go from a isPublic to isAuth, the router-view for isAuth runs and refreshes the page.)

The redirect was actually quite easy to implement.

* Will redirect the user back to the intended page if logged in from that button.
* Fixed double router-view elements which caused some onMounts to run twice.
@MelissaAutumn MelissaAutumn requested a review from devmount March 14, 2024 17:29
@MelissaAutumn MelissaAutumn self-assigned this Mar 14, 2024
@MelissaAutumn MelissaAutumn changed the title Bugs/315 make 404s nicer Add "Route Not Found" and "Require Authentication" views. Mar 14, 2024
Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Mel! As always really elegant solution 👏🏻 I added the German translation.

frontend/src/views/PostLoginView.vue Show resolved Hide resolved
@MelissaAutumn
Copy link
Member Author

Thanks! Sorry I forgot the l10n tag 😅

@MelissaAutumn MelissaAutumn merged commit 6d9db07 into main Mar 15, 2024
2 checks passed
@MelissaAutumn MelissaAutumn deleted the bugs/315-make-404s-nicer branch March 15, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routing error when confirming a booking while NOT logged in
2 participants