mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
feat: implement authentication register finish endpoint
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Current Account</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<a href="/logout">Logout</a>
|
||||
</p>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Current Account</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<a href="/logout">Logout</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user