diff --git a/pkg/nebula/components/authentication/modal.templ b/pkg/nebula/components/authentication/modal.templ index b5e39eb8a..1970264f5 100644 --- a/pkg/nebula/components/authentication/modal.templ +++ b/pkg/nebula/components/authentication/modal.templ @@ -6,18 +6,21 @@ import ( "github.com/onsonr/sonr/pkg/nebula/global/styles" ) +// RegisterModal returns the Register Modal. templ RegisterModal(c echo.Context) { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @sections.RegisterStart() } } +// LoginModal returns the Login Modal. templ LoginModal(c echo.Context) { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @sections.LoginStart() } } +// AuthorizeModal returns the Authorize Modal. templ AuthorizeModal(c echo.Context) { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @sections.AuthorizeStart() diff --git a/pkg/nebula/components/authentication/route.go b/pkg/nebula/components/authentication/route.go index 2e85d2de1..42b18a7c0 100644 --- a/pkg/nebula/components/authentication/route.go +++ b/pkg/nebula/components/authentication/route.go @@ -11,6 +11,7 @@ import ( // │ DWN Routes - Authentication │ // ╰───────────────────────────────────────────────────────────╯ +// CurrentViewRoute returns the current view route. func CurrentViewRoute(c echo.Context) error { s, err := ctx.GetDWNContext(c) if err != nil { @@ -24,14 +25,17 @@ func CurrentViewRoute(c echo.Context) error { // │ Hway Routes - Authentication │ // ╰───────────────────────────────────────────────────────────╯ +// AuthorizeModalRoute returns the Authorize Modal route. func AuthorizeModalRoute(c echo.Context) error { return ctx.RenderTempl(c, AuthorizeModal(c)) } +// LoginModalRoute returns the Login Modal route. func LoginModalRoute(c echo.Context) error { return ctx.RenderTempl(c, LoginModal(c)) } +// RegisterModalRoute returns the Register Modal route. func RegisterModalRoute(c echo.Context) error { return ctx.RenderTempl(c, RegisterModal(c)) } diff --git a/pkg/nebula/components/authentication/view.templ b/pkg/nebula/components/authentication/view.templ index bb631cd74..8a646b65c 100644 --- a/pkg/nebula/components/authentication/view.templ +++ b/pkg/nebula/components/authentication/view.templ @@ -2,22 +2,22 @@ package authentication import echo "github.com/labstack/echo/v4" +// CurrentView checks if the user is logged in. templ CurrentView(c echo.Context) { -