mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
fix: remove line-clamp from tailwind config
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/common/response"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/pages/index"
|
||||
@@ -10,13 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func HandleIndex(c echo.Context) error {
|
||||
if isInitial(c) {
|
||||
return response.TemplEcho(c, index.InitialView())
|
||||
}
|
||||
if isExpired(c) {
|
||||
return response.TemplEcho(c, index.ReturningView())
|
||||
}
|
||||
return c.Render(http.StatusOK, "index.templ", nil)
|
||||
return response.TemplEcho(c, index.InitialView())
|
||||
}
|
||||
|
||||
// ╭─────────────────────────────────────────────────────────╮
|
||||
|
||||
@@ -28,8 +28,7 @@ func HandleRegisterStart(c echo.Context) error {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, err.Error())
|
||||
}
|
||||
|
||||
req := getLinkCredentialRequest(c, ks.Address(), handle, ks.UserJSON())
|
||||
return response.TemplEcho(c, register.LinkCredentialView(req))
|
||||
return response.TemplEcho(c, register.LinkCredentialView(ks.Address(), handle))
|
||||
}
|
||||
|
||||
func HandleRegisterFinish(c echo.Context) error {
|
||||
|
||||
@@ -21,16 +21,14 @@ templ ProfileFormView(turnstileSiteKey string) {
|
||||
}
|
||||
}
|
||||
|
||||
templ LinkCredentialView(req LinkCredentialRequest) {
|
||||
templ LinkCredentialView(addr string, handle string) {
|
||||
@layout.Root("Register | Sonr.ID") {
|
||||
@layout.Container() {
|
||||
@text.Header("Link a PassKey", "This will be used to login to your vault.")
|
||||
@form.Form("/register/finish", "POST", form.PasskeyInput("passkey"), "65", false) {
|
||||
@details.PropertyList() {
|
||||
@details.Property("Address", req.Address, "wallet")
|
||||
@details.Property("Handle", req.Handle, "at-sign")
|
||||
@details.Property("Platform", req.Platform, "device-iphone")
|
||||
@details.Property("Model", req.DeviceModel, "laptop")
|
||||
@details.Property("Address", addr, "wallet")
|
||||
@details.Property("Handle", handle, "at-sign")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ func ProfileFormView(turnstileSiteKey string) templ.Component {
|
||||
})
|
||||
}
|
||||
|
||||
func LinkCredentialView(req LinkCredentialRequest) templ.Component {
|
||||
func LinkCredentialView(addr string, handle string) 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 {
|
||||
@@ -199,7 +199,7 @@ func LinkCredentialView(req LinkCredentialRequest) templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = details.Property("Address", req.Address, "wallet").Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = details.Property("Address", addr, "wallet").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -207,23 +207,7 @@ func LinkCredentialView(req LinkCredentialRequest) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = details.Property("Handle", req.Handle, "at-sign").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 = details.Property("Platform", req.Platform, "device-iphone").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 = details.Property("Model", req.DeviceModel, "laptop").Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = details.Property("Handle", handle, "at-sign").Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -33,6 +34,12 @@ func (s *HTTPContext) InitSession() error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
fmt.Println(sess.BrowserName)
|
||||
fmt.Println(sess.BrowserVersion)
|
||||
fmt.Println(sess.UserArchitecture)
|
||||
fmt.Println(sess.Platform)
|
||||
fmt.Println(sess.PlatformVersion)
|
||||
fmt.Println(sess.DeviceModel)
|
||||
|
||||
s.sess = &sess
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user