mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
fix: correct title of profile creation page
This commit is contained in:
parent
305efbea5d
commit
0d4f2946f3
@ -6,6 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
|
"golang.org/x/exp/rand"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Define the credential structure matching our frontend data
|
// Define the credential structure matching our frontend data
|
||||||
@ -76,3 +77,10 @@ func extractCredentialDescriptor(jsonString string) (*Credential, error) {
|
|||||||
)
|
)
|
||||||
return cred, nil
|
return cred, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func randomCreateProfileData() CreateProfileData {
|
||||||
|
return CreateProfileData{
|
||||||
|
FirstNumber: rand.Intn(5) + 1,
|
||||||
|
LastNumber: rand.Intn(4) + 1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -8,11 +8,11 @@ import (
|
|||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"github.com/onsonr/sonr/crypto/mpc"
|
"github.com/onsonr/sonr/crypto/mpc"
|
||||||
"github.com/onsonr/sonr/pkg/common/response"
|
"github.com/onsonr/sonr/pkg/common/response"
|
||||||
"golang.org/x/exp/rand"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandleCreateProfile(c echo.Context) error {
|
func HandleCreateProfile(c echo.Context) error {
|
||||||
return response.TemplEcho(c, ProfileFormView(randomCreateProfileData()))
|
d := randomCreateProfileData()
|
||||||
|
return response.TemplEcho(c, ProfileFormView(d))
|
||||||
}
|
}
|
||||||
|
|
||||||
func HandlePasskeyStart(c echo.Context) error {
|
func HandlePasskeyStart(c echo.Context) error {
|
||||||
@ -47,10 +47,3 @@ func HandlePasskeyFinish(c echo.Context) error {
|
|||||||
}
|
}
|
||||||
return response.TemplEcho(c, LoadingVaultView())
|
return response.TemplEcho(c, LoadingVaultView())
|
||||||
}
|
}
|
||||||
|
|
||||||
func randomCreateProfileData() CreateProfileData {
|
|
||||||
return CreateProfileData{
|
|
||||||
FirstNumber: rand.Intn(5) + 1,
|
|
||||||
LastNumber: rand.Intn(4) + 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
templ ProfileFormView(data CreateProfileData) {
|
templ ProfileFormView(data CreateProfileData) {
|
||||||
@layout.Root("Create Profile | Sonr.ID") {
|
@layout.Root("New Profile | Sonr.ID") {
|
||||||
@layout.Container() {
|
@layout.Container() {
|
||||||
@text.Header("Basic Info", "Tell us a little about yourself.")
|
@text.Header("Basic Info", "Tell us a little about yourself.")
|
||||||
@formCreateProfile("/register/start", "POST", data)
|
@formCreateProfile("/register/start", "POST", data)
|
||||||
|
@ -78,7 +78,7 @@ func ProfileFormView(data CreateProfileData) templ.Component {
|
|||||||
}
|
}
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
})
|
})
|
||||||
templ_7745c5c3_Err = layout.Root("Create Profile | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
templ_7745c5c3_Err = layout.Root("New Profile | Sonr.ID").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ templ Columns() {
|
|||||||
templ Container() {
|
templ Container() {
|
||||||
<div id="container" class="flex fixed inset-0 z-[99] w-screen h-screen">
|
<div id="container" class="flex fixed inset-0 z-[99] w-screen h-screen">
|
||||||
<div class="relative flex flex-wrap items-center w-full h-full px-8">
|
<div class="relative flex flex-wrap items-center w-full h-full px-8">
|
||||||
<div class="relative w-full max-w-sm mx-auto lg:mb-0">
|
<div class="relative w-full max-w-screen-lg mx-auto lg:mb-0">
|
||||||
<div class="flex flex-col items-center justify-center h-full">
|
<div class="flex flex-col items-center justify-center h-full">
|
||||||
{ children... }
|
{ children... }
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,7 +67,7 @@ func Container() templ.Component {
|
|||||||
templ_7745c5c3_Var2 = templ.NopComponent
|
templ_7745c5c3_Var2 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"container\" class=\"flex fixed inset-0 z-[99] w-screen h-screen\"><div class=\"relative flex flex-wrap items-center w-full h-full px-8\"><div class=\"relative w-full max-w-sm mx-auto lg:mb-0\"><div class=\"flex flex-col items-center justify-center h-full\">")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div id=\"container\" class=\"flex fixed inset-0 z-[99] w-screen h-screen\"><div class=\"relative flex flex-wrap items-center w-full h-full px-8\"><div class=\"relative w-full max-w-screen-lg mx-auto lg:mb-0\"><div class=\"flex flex-col items-center justify-center h-full\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user