Files
sonr/pkg/gateway/views/register.templ
T

56 lines
1.6 KiB
Templ
Raw Normal View History

2024-12-16 15:29:54 -05:00
package views
import (
"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"
)
2024-12-18 15:53:45 -05:00
templ RegisterProfileView(firstNumber int, lastNumber int) {
2024-12-16 15:29:54 -05:00
@layout.View("New Profile | Sonr.ID") {
@layout.Container() {
@hero.TitleDesc("Basic Info", "Tell us a little about yourself.")
@form.Root("/register/passkey", "create-profile") {
@form.Body() {
@form.Header() {
<div class="w-full py-2">
<sl-icon name="at-sign" library="sonr"></sl-icon>
<sl-avatar shape="circle" size="large" src="https://avatars.githubusercontent.com/u/101929?v=4"></sl-avatar>
</div>
}
@input.Handle()
@input.Name()
2024-12-18 15:53:45 -05:00
@input.HumanSlider(firstNumber, lastNumber)
2024-12-16 15:29:54 -05:00
@form.Footer() {
@form.CancelButton()
@form.SubmitButton("Next")
}
}
}
}
}
}
2024-12-18 15:53:45 -05:00
templ RegisterPasskeyView(address string, handle string, name string, challenge string, creationBlock string) {
2024-12-16 15:29:54 -05:00
@layout.View("Register | Sonr.ID") {
@layout.Container() {
@hero.TitleDesc("Link a PassKey", "This will be used to login to your vault.")
@form.Root("/register/finish", "passkey-form") {
<input type="hidden" name="credential" id="credential-data" required/>
@form.Body() {
@form.Header() {
2024-12-18 15:53:45 -05:00
@card.SonrProfile(address, name, handle, creationBlock)
2024-12-16 15:29:54 -05:00
}
@input.CoinSelect()
@form.Footer() {
2024-12-18 15:53:45 -05:00
@input.Passkey(address, handle, challenge)
2024-12-16 15:29:54 -05:00
@form.CancelButton()
}
}
}
}
}
}