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

User pages and a bunch of other things #37

Merged
merged 19 commits into from
Apr 27, 2024
Merged

User pages and a bunch of other things #37

merged 19 commits into from
Apr 27, 2024

Conversation

haydenrou
Copy link
Contributor

@haydenrou haydenrou commented Mar 5, 2024

Adds correct redirects for:

  • Successful and unsuccessful registration
  • Successful and unsuccessful sign in
  • Successful and unsuccessful logout

Dependencies:

  • Add dependencies to create Flash notifications for every route using gorilla/sessions, and clear them when you've viewed them.

Features:

  • Extract page base to automatically know if the user is logged in via the render method
  • Move links to an unstyled NAV
  • Add page base for nav-less pages to render (i.e. modal, login etc)
  • Adds a pretty useless my-templates route which will be done properly in My templates #43

Closes #36

@haydenrou haydenrou self-assigned this Mar 5, 2024
controllers/templates.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jonnyjones99 jonnyjones99 left a comment

Choose a reason for hiding this comment

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

Smashing it nice one

Move page base usage to render so that you don't have manually use it
each time
Add a render function in case you don't want the page base (i.e. Modals)
Add session flashes for successfully responding, logging in etc
Create NAV
Move flashes in to page base
Move signedIn to page base for now
Clear flashes after returning them
@haydenrou haydenrou changed the title User pages User pages and a bunch of other things Mar 14, 2024
@haydenrou haydenrou marked this pull request as ready for review March 14, 2024 14:35
components/base.templ Outdated Show resolved Hide resolved
@haydenrou haydenrou mentioned this pull request Mar 16, 2024
@haydenrou haydenrou merged commit 49e56a0 into main Apr 27, 2024
4 checks passed
@haydenrou haydenrou deleted the user-pages branch April 27, 2024 14:21
@haydenrou haydenrou added this to the MVP milestone May 21, 2024
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.

Add links and pages for user
2 participants