mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
502 lines
21 KiB
Go
502 lines
21 KiB
Go
// Code generated by templ - DO NOT EDIT.
|
|||
|
|
|
||
|
|
// templ: version: v0.2.793
|
||
|
|
package views
|
||
|
|
|
||
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||
|
|
|
||
|
|
import "github.com/a-h/templ"
|
||
|
|
import templruntime "github.com/a-h/templ/runtime"
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/onsonr/sonr/internal/gateway/models"
|
||
|
|
"github.com/onsonr/sonr/internal/nebula/card"
|
||
|
|
"github.com/onsonr/sonr/internal/nebula/form"
|
||
|
|
"github.com/onsonr/sonr/internal/nebula/hero"
|
||
|
|
"github.com/onsonr/sonr/internal/nebula/input"
|
||
|
|
"github.com/onsonr/sonr/internal/nebula/layout"
|
||
|
|
)
|
||
|
|
|
||
|
|
func CreateProfileForm(data models.CreateProfileData) templ.Component {
|
||
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||
|
|
return templ_7745c5c3_CtxErr
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||
|
|
if templ_7745c5c3_Var1 == nil {
|
||
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||
|
|
}
|
||
|
|
ctx = templ.ClearChildren(ctx)
|
||
|
|
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = hero.TitleDesc("Basic Info", "Tell us a little about yourself.").Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = formCreateProfile(data).Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.View("New Profile | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func CreatePasskeyForm(data models.CreatePasskeyData) templ.Component {
|
||
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||
|
|
return templ_7745c5c3_CtxErr
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
||
|
|
if templ_7745c5c3_Var4 == nil {
|
||
|
|
templ_7745c5c3_Var4 = templ.NopComponent
|
||
|
|
}
|
||
|
|
ctx = templ.ClearChildren(ctx)
|
||
|
|
templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var6 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = hero.TitleDesc("Link a PassKey", "This will be used to login to your vault.").Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = formCreatePasskey(data).Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.View("Register | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func LoadingVaultView() templ.Component {
|
||
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||
|
|
return templ_7745c5c3_CtxErr
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var7 := templ.GetChildren(ctx)
|
||
|
|
if templ_7745c5c3_Var7 == nil {
|
||
|
|
templ_7745c5c3_Var7 = templ.NopComponent
|
||
|
|
}
|
||
|
|
ctx = templ.ClearChildren(ctx)
|
||
|
|
templ_7745c5c3_Var8 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var9 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = hero.TitleDesc("Loading Vault", "This will be used to login to your vault.").Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var9), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = layout.View("Loading... | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func formCreatePasskey(data models.CreatePasskeyData) templ.Component {
|
||
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||
|
|
return templ_7745c5c3_CtxErr
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||
|
|
if templ_7745c5c3_Var10 == nil {
|
||
|
|
templ_7745c5c3_Var10 = templ.NopComponent
|
||
|
|
}
|
||
|
|
ctx = templ.ClearChildren(ctx)
|
||
|
|
templ_7745c5c3_Var11 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<input type=\"hidden\" name=\"credential\" id=\"credential-data\" required>")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Var12 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var13 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = card.SonrProfile(data.Address, data.Name, data.Handle, data.CreationBlock).Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Header().Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = input.CoinSelect().Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Var14 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = input.Passkey(data.Address, data.Handle, data.Challenge).Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = form.CancelButton().Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Footer().Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var12), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Root("/register/finish", "POST", "passkey-form").Render(templ.WithChildren(ctx, templ_7745c5c3_Var11), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
func formCreateProfile(data models.CreateProfileData) templ.Component {
|
||
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||
|
|
return templ_7745c5c3_CtxErr
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var15 := templ.GetChildren(ctx)
|
||
|
|
if templ_7745c5c3_Var15 == nil {
|
||
|
|
templ_7745c5c3_Var15 = templ.NopComponent
|
||
|
|
}
|
||
|
|
ctx = templ.ClearChildren(ctx)
|
||
|
|
templ_7745c5c3_Var16 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var17 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Var18 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<sl-progress-bar value=\"50\"></sl-progress-bar>")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Header().Render(templ.WithChildren(ctx, templ_7745c5c3_Var18), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = input.Name().Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = input.Handle().Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = input.HumanSlider(data.FirstNumber, data.LastNumber).Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Var19 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||
|
|
if !templ_7745c5c3_IsBuffer {
|
||
|
|
defer func() {
|
||
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err == nil {
|
||
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|
||
|
|
ctx = templ.InitializeContext(ctx)
|
||
|
|
templ_7745c5c3_Err = form.CancelButton().Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
templ_7745c5c3_Err = form.SubmitButton("Next").Render(ctx, templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Footer().Render(templ.WithChildren(ctx, templ_7745c5c3_Var19), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var17), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
templ_7745c5c3_Err = form.Root("/register/passkey", "POST", "create-profile").Render(templ.WithChildren(ctx, templ_7745c5c3_Var16), templ_7745c5c3_Buffer)
|
||
|
|
if templ_7745c5c3_Err != nil {
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
}
|
||
|
|
return templ_7745c5c3_Err
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
var _ = templruntime.GeneratedTemplate
|