refactor(components): extract data models into shared models package
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
package components
|
package components
|
||||||
|
|
||||||
import "encoding/json"
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
// OHLCData represents a single candlestick data point
|
|
||||||
type OHLCData struct {
|
type OHLCData struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Open float64 `json:"open"`
|
Open float64 `json:"open"`
|
||||||
@@ -11,27 +14,11 @@ type OHLCData struct {
|
|||||||
Close float64 `json:"close"`
|
Close float64 `json:"close"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AreaSeriesData represents time series data for stacked area chart
|
|
||||||
type AreaSeriesData struct {
|
|
||||||
Date string `json:"date"`
|
|
||||||
Industry string `json:"industry"`
|
|
||||||
Value float64 `json:"value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BubbleData represents data for bubble/circle packing chart
|
|
||||||
type BubbleData struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Sector string `json:"sector"`
|
|
||||||
Value float64 `json:"value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TimeSeriesData represents simple time series data
|
|
||||||
type TimeSeriesData struct {
|
type TimeSeriesData struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Value float64 `json:"value"`
|
Value float64 `json:"value"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to convert data to JSON string for JS
|
|
||||||
func toJSON(v interface{}) string {
|
func toJSON(v interface{}) string {
|
||||||
b, _ := json.Marshal(v)
|
b, _ := json.Marshal(v)
|
||||||
return string(b)
|
return string(b)
|
||||||
@@ -661,15 +648,13 @@ templ CandleChart(id string, data []OHLCData) {
|
|||||||
@initCandleChart(id, toJSON(data))
|
@initCandleChart(id, toJSON(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
// StackedAreaChart component
|
templ StackedAreaChart(id string, data []models.AreaSeriesData) {
|
||||||
templ StackedAreaChart(id string, data []AreaSeriesData) {
|
|
||||||
<div id={ id } class="stacked-area-chart" style="width: 100%;"></div>
|
<div id={ id } class="stacked-area-chart" style="width: 100%;"></div>
|
||||||
@initRosenCharts()
|
@initRosenCharts()
|
||||||
@initStackedAreaChart(id, toJSON(data))
|
@initStackedAreaChart(id, toJSON(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
// BubbleChart component
|
templ BubbleChart(id string, data []models.BubbleData) {
|
||||||
templ BubbleChart(id string, data []BubbleData) {
|
|
||||||
<div id={ id } class="bubble-chart"></div>
|
<div id={ id } class="bubble-chart"></div>
|
||||||
@initRosenCharts()
|
@initRosenCharts()
|
||||||
@initBubbleChart(id, toJSON(data))
|
@initBubbleChart(id, toJSON(data))
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ package components
|
|||||||
import "github.com/a-h/templ"
|
import "github.com/a-h/templ"
|
||||||
import templruntime "github.com/a-h/templ/runtime"
|
import templruntime "github.com/a-h/templ/runtime"
|
||||||
|
|
||||||
import "encoding/json"
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
// OHLCData represents a single candlestick data point
|
|
||||||
type OHLCData struct {
|
type OHLCData struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Open float64 `json:"open"`
|
Open float64 `json:"open"`
|
||||||
@@ -19,27 +22,11 @@ type OHLCData struct {
|
|||||||
Close float64 `json:"close"`
|
Close float64 `json:"close"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AreaSeriesData represents time series data for stacked area chart
|
|
||||||
type AreaSeriesData struct {
|
|
||||||
Date string `json:"date"`
|
|
||||||
Industry string `json:"industry"`
|
|
||||||
Value float64 `json:"value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BubbleData represents data for bubble/circle packing chart
|
|
||||||
type BubbleData struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Sector string `json:"sector"`
|
|
||||||
Value float64 `json:"value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TimeSeriesData represents simple time series data
|
|
||||||
type TimeSeriesData struct {
|
type TimeSeriesData struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Value float64 `json:"value"`
|
Value float64 `json:"value"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to convert data to JSON string for JS
|
|
||||||
func toJSON(v interface{}) string {
|
func toJSON(v interface{}) string {
|
||||||
b, _ := json.Marshal(v)
|
b, _ := json.Marshal(v)
|
||||||
return string(b)
|
return string(b)
|
||||||
@@ -721,7 +708,7 @@ func CandleChart(id string, data []OHLCData) templ.Component {
|
|||||||
var templ_7745c5c3_Var2 string
|
var templ_7745c5c3_Var2 string
|
||||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 659, Col: 13}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 646, Col: 13}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -743,8 +730,7 @@ func CandleChart(id string, data []OHLCData) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// StackedAreaChart component
|
func StackedAreaChart(id string, data []models.AreaSeriesData) templ.Component {
|
||||||
func StackedAreaChart(id string, data []AreaSeriesData) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -772,7 +758,7 @@ func StackedAreaChart(id string, data []AreaSeriesData) templ.Component {
|
|||||||
var templ_7745c5c3_Var4 string
|
var templ_7745c5c3_Var4 string
|
||||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 666, Col: 13}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 652, Col: 13}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -794,8 +780,7 @@ func StackedAreaChart(id string, data []AreaSeriesData) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// BubbleChart component
|
func BubbleChart(id string, data []models.BubbleData) templ.Component {
|
||||||
func BubbleChart(id string, data []BubbleData) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -823,7 +808,7 @@ func BubbleChart(id string, data []BubbleData) templ.Component {
|
|||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 673, Col: 13}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 658, Col: 13}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -904,7 +889,7 @@ func SemiFilledAreaChartWithColors(id string, data []TimeSeriesData, lineColor s
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 685, Col: 13}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 670, Col: 13}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -955,7 +940,7 @@ func ChartCard(title string, subtitle string) templ.Component {
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 695, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 680, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -973,7 +958,7 @@ func ChartCard(title string, subtitle string) templ.Component {
|
|||||||
var templ_7745c5c3_Var12 string
|
var templ_7745c5c3_Var12 string
|
||||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle)
|
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 697, Col: 87}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts.templ`, Line: 682, Col: 87}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ func DefaultSidebarItems(activeTab string) []SidebarItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SecondarySidebarItems returns the bottom navigation items
|
// SecondarySidebarItems returns the bottom navigation items
|
||||||
func SecondarySidebarItems() []SidebarItem {
|
func SecondarySidebarItems(activeTab string) []SidebarItem {
|
||||||
return []SidebarItem{
|
return []SidebarItem{
|
||||||
{ID: "settings", Icon: "gear", Label: "Settings", Href: "/settings", Active: false},
|
{ID: "settings", Icon: "gear", Label: "Settings", Href: "/settings", Active: activeTab == "settings"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ templ NavigationItems(activeTab string) {
|
|||||||
}
|
}
|
||||||
<div class="nav-section">
|
<div class="nav-section">
|
||||||
<div class="nav-section-title">Settings</div>
|
<div class="nav-section-title">Settings</div>
|
||||||
for _, item := range SecondarySidebarItems() {
|
for _, item := range SecondarySidebarItems(activeTab) {
|
||||||
<a
|
<a
|
||||||
href={ templ.SafeURL(item.Href) }
|
href={ templ.SafeURL(item.Href) }
|
||||||
class={ "nav-item", templ.KV("active", item.Active) }
|
class={ "nav-item", templ.KV("active", item.Active) }
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ func DefaultSidebarItems(activeTab string) []SidebarItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SecondarySidebarItems returns the bottom navigation items
|
// SecondarySidebarItems returns the bottom navigation items
|
||||||
func SecondarySidebarItems() []SidebarItem {
|
func SecondarySidebarItems(activeTab string) []SidebarItem {
|
||||||
return []SidebarItem{
|
return []SidebarItem{
|
||||||
{ID: "settings", Icon: "gear", Label: "Settings", Href: "/settings", Active: false},
|
{ID: "settings", Icon: "gear", Label: "Settings", Href: "/settings", Active: activeTab == "settings"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ func NavigationItems(activeTab string) templ.Component {
|
|||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
for _, item := range SecondarySidebarItems() {
|
for _, item := range SecondarySidebarItems(activeTab) {
|
||||||
var templ_7745c5c3_Var9 = []any{"nav-item", templ.KV("active", item.Active)}
|
var templ_7745c5c3_Var9 = []any{"nav-item", templ.KV("active", item.Active)}
|
||||||
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var9...)
|
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var9...)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"nebula/models"
|
||||||
"nebula/views"
|
"nebula/views"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,6 +27,8 @@ func RegisterRoutes(mux *http.ServeMux) {
|
|||||||
mux.HandleFunc("POST /authorize/deny", handleAuthorizeDeny)
|
mux.HandleFunc("POST /authorize/deny", handleAuthorizeDeny)
|
||||||
|
|
||||||
mux.HandleFunc("GET /dashboard", handleDashboard)
|
mux.HandleFunc("GET /dashboard", handleDashboard)
|
||||||
|
|
||||||
|
mux.HandleFunc("GET /settings", handleSettings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleWelcome renders the full welcome page at step 1
|
// handleWelcome renders the full welcome page at step 1
|
||||||
@@ -52,7 +55,7 @@ func handleWelcomeStep(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleRegister(w http.ResponseWriter, r *http.Request) {
|
func handleRegister(w http.ResponseWriter, r *http.Request) {
|
||||||
state := views.RegisterState{Step: 1}
|
state := models.RegisterState{Step: 1}
|
||||||
views.RegisterPage(state).Render(r.Context(), w)
|
views.RegisterPage(state).Render(r.Context(), w)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +71,7 @@ func handleRegisterStep(w http.ResponseWriter, r *http.Request) {
|
|||||||
method = "passkey"
|
method = "passkey"
|
||||||
}
|
}
|
||||||
|
|
||||||
state := views.RegisterState{Step: step, Method: method}
|
state := models.RegisterState{Step: step, Method: method}
|
||||||
|
|
||||||
if r.Header.Get("HX-Request") == "true" {
|
if r.Header.Get("HX-Request") == "true" {
|
||||||
views.RegisterStepWithStepper(state).Render(r.Context(), w)
|
views.RegisterStepWithStepper(state).Render(r.Context(), w)
|
||||||
@@ -79,7 +82,7 @@ func handleRegisterStep(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleRegisterCapabilities(w http.ResponseWriter, r *http.Request) {
|
func handleRegisterCapabilities(w http.ResponseWriter, r *http.Request) {
|
||||||
caps := views.DeviceCapabilities{
|
caps := models.DeviceCapabilities{
|
||||||
Platform: true,
|
Platform: true,
|
||||||
CrossPlatform: true,
|
CrossPlatform: true,
|
||||||
Conditional: true,
|
Conditional: true,
|
||||||
@@ -88,7 +91,7 @@ func handleRegisterCapabilities(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleRegisterVerifyCode(w http.ResponseWriter, r *http.Request) {
|
func handleRegisterVerifyCode(w http.ResponseWriter, r *http.Request) {
|
||||||
state := views.RegisterState{Step: 3}
|
state := models.RegisterState{Step: 3}
|
||||||
if r.Header.Get("HX-Request") == "true" {
|
if r.Header.Get("HX-Request") == "true" {
|
||||||
views.RegisterStepWithStepper(state).Render(r.Context(), w)
|
views.RegisterStepWithStepper(state).Render(r.Context(), w)
|
||||||
return
|
return
|
||||||
@@ -97,7 +100,7 @@ func handleRegisterVerifyCode(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleLogin(w http.ResponseWriter, r *http.Request) {
|
func handleLogin(w http.ResponseWriter, r *http.Request) {
|
||||||
state := views.LoginState{Step: "1"}
|
state := models.LoginState{Step: "1"}
|
||||||
views.LoginPage(state).Render(r.Context(), w)
|
views.LoginPage(state).Render(r.Context(), w)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +110,7 @@ func handleLoginStep(w http.ResponseWriter, r *http.Request) {
|
|||||||
step = "1"
|
step = "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
state := views.LoginState{Step: step}
|
state := models.LoginState{Step: step}
|
||||||
|
|
||||||
if r.Header.Get("HX-Request") == "true" {
|
if r.Header.Get("HX-Request") == "true" {
|
||||||
views.LoginStepWithOOB(state).Render(r.Context(), w)
|
views.LoginStepWithOOB(state).Render(r.Context(), w)
|
||||||
@@ -131,58 +134,7 @@ func handleLoginQRStatus(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
func handleAuthorize(w http.ResponseWriter, r *http.Request) {
|
func handleAuthorize(w http.ResponseWriter, r *http.Request) {
|
||||||
reqType := r.URL.Query().Get("type")
|
reqType := r.URL.Query().Get("type")
|
||||||
if reqType == "" {
|
req := models.DefaultAuthRequest(reqType)
|
||||||
reqType = "connect"
|
|
||||||
}
|
|
||||||
|
|
||||||
req := views.AuthRequest{
|
|
||||||
Type: reqType,
|
|
||||||
App: views.AppInfo{
|
|
||||||
Name: "Uniswap",
|
|
||||||
Domain: "app.uniswap.org",
|
|
||||||
LogoIcon: "cube",
|
|
||||||
Verified: true,
|
|
||||||
},
|
|
||||||
Wallet: views.WalletInfo{
|
|
||||||
Name: "Main Wallet",
|
|
||||||
Address: "sonr1x9f...7k2m",
|
|
||||||
Balance: "1,234.56 SNR",
|
|
||||||
},
|
|
||||||
Message: `Welcome to Uniswap!
|
|
||||||
|
|
||||||
Click to sign in and accept the Uniswap Terms of Service.
|
|
||||||
|
|
||||||
This request will not trigger a blockchain transaction or cost any gas fees.
|
|
||||||
|
|
||||||
Wallet address:
|
|
||||||
sonr1x9f4h2k8m3n5p7q2r4s6t8v0w3x5y7z9a1b3c5d7k2m
|
|
||||||
|
|
||||||
Nonce: 8f4a2b1c`,
|
|
||||||
MessageHex: "0x57656c636f6d6520746f20556e697377617021...",
|
|
||||||
Transaction: &views.TxDetails{
|
|
||||||
Type: "Swap",
|
|
||||||
FromToken: views.TokenAmount{
|
|
||||||
Symbol: "ETH",
|
|
||||||
Amount: "100.00",
|
|
||||||
USD: "$234,567.00",
|
|
||||||
Initials: "E",
|
|
||||||
},
|
|
||||||
ToToken: views.TokenAmount{
|
|
||||||
Symbol: "USDC",
|
|
||||||
Amount: "125,000",
|
|
||||||
USD: "$125,000.00",
|
|
||||||
Initials: "U",
|
|
||||||
},
|
|
||||||
Network: "Sonr Mainnet",
|
|
||||||
NetworkFee: "~$0.12",
|
|
||||||
MaxFee: "$0.26",
|
|
||||||
Slippage: "0.5%",
|
|
||||||
Contract: "0x7a25...3f8b",
|
|
||||||
Function: "swapExactTokensForTokens()",
|
|
||||||
RawData: "0x38ed1739\n0000000000000000000000000000000000000056bc75e2d63100000...",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
views.AuthorizePage(req).Render(r.Context(), w)
|
views.AuthorizePage(req).Render(r.Context(), w)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +156,7 @@ func handleDashboard(w http.ResponseWriter, r *http.Request) {
|
|||||||
if tab == "" {
|
if tab == "" {
|
||||||
tab = "overview"
|
tab = "overview"
|
||||||
}
|
}
|
||||||
data := views.DefaultDashboardData()
|
data := models.DefaultDashboardData()
|
||||||
|
|
||||||
if r.Header.Get("HX-Request") == "true" {
|
if r.Header.Get("HX-Request") == "true" {
|
||||||
views.DashboardContent(data, tab).Render(r.Context(), w)
|
views.DashboardContent(data, tab).Render(r.Context(), w)
|
||||||
@@ -213,3 +165,12 @@ func handleDashboard(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
views.DashboardPage(data, tab).Render(r.Context(), w)
|
views.DashboardPage(data, tab).Render(r.Context(), w)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func handleSettings(w http.ResponseWriter, r *http.Request) {
|
||||||
|
tab := r.URL.Query().Get("tab")
|
||||||
|
if tab == "" {
|
||||||
|
tab = "profile"
|
||||||
|
}
|
||||||
|
data := models.DefaultSettingsData()
|
||||||
|
views.SettingsPage(data, tab).Render(r.Context(), w)
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,50 +1,11 @@
|
|||||||
package views
|
package views
|
||||||
|
|
||||||
import "nebula/layouts"
|
import (
|
||||||
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
type AppInfo struct {
|
templ AuthorizePage(req models.AuthRequest) {
|
||||||
Name string
|
|
||||||
Domain string
|
|
||||||
LogoIcon string
|
|
||||||
Verified bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type WalletInfo struct {
|
|
||||||
Name string
|
|
||||||
Address string
|
|
||||||
Balance string
|
|
||||||
}
|
|
||||||
|
|
||||||
type TokenAmount struct {
|
|
||||||
Symbol string
|
|
||||||
Amount string
|
|
||||||
USD string
|
|
||||||
Initials string
|
|
||||||
}
|
|
||||||
|
|
||||||
type TxDetails struct {
|
|
||||||
Type string
|
|
||||||
FromToken TokenAmount
|
|
||||||
ToToken TokenAmount
|
|
||||||
Network string
|
|
||||||
NetworkFee string
|
|
||||||
MaxFee string
|
|
||||||
Slippage string
|
|
||||||
Contract string
|
|
||||||
Function string
|
|
||||||
RawData string
|
|
||||||
}
|
|
||||||
|
|
||||||
type AuthRequest struct {
|
|
||||||
Type string
|
|
||||||
App AppInfo
|
|
||||||
Wallet WalletInfo
|
|
||||||
Message string
|
|
||||||
MessageHex string
|
|
||||||
Transaction *TxDetails
|
|
||||||
}
|
|
||||||
|
|
||||||
templ AuthorizePage(req AuthRequest) {
|
|
||||||
@layouts.CenteredCard("Authorize - Sonr") {
|
@layouts.CenteredCard("Authorize - Sonr") {
|
||||||
<div id="auth-content">
|
<div id="auth-content">
|
||||||
@AuthorizeContent(req)
|
@AuthorizeContent(req)
|
||||||
@@ -55,7 +16,7 @@ templ AuthorizePage(req AuthRequest) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ AuthorizeContent(req AuthRequest) {
|
templ AuthorizeContent(req models.AuthRequest) {
|
||||||
@authorizeStyles()
|
@authorizeStyles()
|
||||||
@AppIdentityHeader(req.App)
|
@AppIdentityHeader(req.App)
|
||||||
<wa-divider></wa-divider>
|
<wa-divider></wa-divider>
|
||||||
@@ -65,7 +26,7 @@ templ AuthorizeContent(req AuthRequest) {
|
|||||||
</footer>
|
</footer>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ AppIdentityHeader(app AppInfo) {
|
templ AppIdentityHeader(app models.AppInfo) {
|
||||||
<div class="app-identity">
|
<div class="app-identity">
|
||||||
<div class="app-logo">
|
<div class="app-logo">
|
||||||
<wa-icon name={ app.LogoIcon } style="font-size: 32px; color: var(--wa-color-primary);"></wa-icon>
|
<wa-icon name={ app.LogoIcon } style="font-size: 32px; color: var(--wa-color-primary);"></wa-icon>
|
||||||
@@ -82,7 +43,7 @@ templ AppIdentityHeader(app AppInfo) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ RequestTypeTabs(req AuthRequest) {
|
templ RequestTypeTabs(req models.AuthRequest) {
|
||||||
<wa-tab-group class="request-tabs" id="auth-tabs">
|
<wa-tab-group class="request-tabs" id="auth-tabs">
|
||||||
<wa-tab panel="connect" if req.Type == "connect" || req.Type == "" {
|
<wa-tab panel="connect" if req.Type == "connect" || req.Type == "" {
|
||||||
active?={ true }
|
active?={ true }
|
||||||
@@ -121,7 +82,7 @@ templ RequestTypeTabs(req AuthRequest) {
|
|||||||
@tabScripts()
|
@tabScripts()
|
||||||
}
|
}
|
||||||
|
|
||||||
templ ConnectPanel(wallet WalletInfo) {
|
templ ConnectPanel(wallet models.WalletInfo) {
|
||||||
<div class="wa-stack wa-gap-m">
|
<div class="wa-stack wa-gap-m">
|
||||||
@WalletSelector(wallet, false, "")
|
@WalletSelector(wallet, false, "")
|
||||||
<div class="wa-stack wa-gap-xs">
|
<div class="wa-stack wa-gap-xs">
|
||||||
@@ -140,7 +101,7 @@ templ ConnectPanel(wallet WalletInfo) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ SignPanel(wallet WalletInfo, message string, messageHex string) {
|
templ SignPanel(wallet models.WalletInfo, message string, messageHex string) {
|
||||||
<div class="wa-stack wa-gap-m">
|
<div class="wa-stack wa-gap-m">
|
||||||
@WalletSelector(wallet, true, "Signing")
|
@WalletSelector(wallet, true, "Signing")
|
||||||
<div class="wa-stack wa-gap-xs">
|
<div class="wa-stack wa-gap-xs">
|
||||||
@@ -164,7 +125,7 @@ templ SignPanel(wallet WalletInfo, message string, messageHex string) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionPanel(wallet WalletInfo, tx *TxDetails) {
|
templ TransactionPanel(wallet models.WalletInfo, tx *models.TxDetails) {
|
||||||
<div class="wa-stack wa-gap-m">
|
<div class="wa-stack wa-gap-m">
|
||||||
@WalletSelectorWithBalance(wallet)
|
@WalletSelectorWithBalance(wallet)
|
||||||
if tx != nil {
|
if tx != nil {
|
||||||
@@ -196,7 +157,7 @@ templ TransactionPanel(wallet WalletInfo, tx *TxDetails) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) {
|
templ WalletSelector(wallet models.WalletInfo, showBadge bool, badgeText string) {
|
||||||
<div class="wallet-selector">
|
<div class="wallet-selector">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-cluster wa-gap-s">
|
<div class="wa-cluster wa-gap-s">
|
||||||
@@ -215,7 +176,7 @@ templ WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ WalletSelectorWithBalance(wallet WalletInfo) {
|
templ WalletSelectorWithBalance(wallet models.WalletInfo) {
|
||||||
<div class="wallet-selector">
|
<div class="wallet-selector">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-cluster wa-gap-s">
|
<div class="wa-cluster wa-gap-s">
|
||||||
@@ -245,7 +206,7 @@ templ PermissionItem(icon string, variant string, title string, description stri
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionCard(tx *TxDetails) {
|
templ TransactionCard(tx *models.TxDetails) {
|
||||||
<wa-card>
|
<wa-card>
|
||||||
<div class="wa-stack wa-gap-s">
|
<div class="wa-stack wa-gap-s">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
@@ -282,7 +243,7 @@ templ TransactionCard(tx *TxDetails) {
|
|||||||
</wa-card>
|
</wa-card>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionDetails(tx *TxDetails) {
|
templ TransactionDetails(tx *models.TxDetails) {
|
||||||
<div class="wa-stack wa-gap-2xs">
|
<div class="wa-stack wa-gap-2xs">
|
||||||
<div class="tx-detail-row">
|
<div class="tx-detail-row">
|
||||||
<span class="tx-label">Network</span>
|
<span class="tx-label">Network</span>
|
||||||
|
|||||||
@@ -8,51 +8,12 @@ package views
|
|||||||
import "github.com/a-h/templ"
|
import "github.com/a-h/templ"
|
||||||
import templruntime "github.com/a-h/templ/runtime"
|
import templruntime "github.com/a-h/templ/runtime"
|
||||||
|
|
||||||
import "nebula/layouts"
|
import (
|
||||||
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
type AppInfo struct {
|
func AuthorizePage(req models.AuthRequest) templ.Component {
|
||||||
Name string
|
|
||||||
Domain string
|
|
||||||
LogoIcon string
|
|
||||||
Verified bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type WalletInfo struct {
|
|
||||||
Name string
|
|
||||||
Address string
|
|
||||||
Balance string
|
|
||||||
}
|
|
||||||
|
|
||||||
type TokenAmount struct {
|
|
||||||
Symbol string
|
|
||||||
Amount string
|
|
||||||
USD string
|
|
||||||
Initials string
|
|
||||||
}
|
|
||||||
|
|
||||||
type TxDetails struct {
|
|
||||||
Type string
|
|
||||||
FromToken TokenAmount
|
|
||||||
ToToken TokenAmount
|
|
||||||
Network string
|
|
||||||
NetworkFee string
|
|
||||||
MaxFee string
|
|
||||||
Slippage string
|
|
||||||
Contract string
|
|
||||||
Function string
|
|
||||||
RawData string
|
|
||||||
}
|
|
||||||
|
|
||||||
type AuthRequest struct {
|
|
||||||
Type string
|
|
||||||
App AppInfo
|
|
||||||
Wallet WalletInfo
|
|
||||||
Message string
|
|
||||||
MessageHex string
|
|
||||||
Transaction *TxDetails
|
|
||||||
}
|
|
||||||
|
|
||||||
func AuthorizePage(req AuthRequest) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -107,7 +68,7 @@ func AuthorizePage(req AuthRequest) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func AuthorizeContent(req AuthRequest) templ.Component {
|
func AuthorizeContent(req models.AuthRequest) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -160,7 +121,7 @@ func AuthorizeContent(req AuthRequest) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func AppIdentityHeader(app AppInfo) templ.Component {
|
func AppIdentityHeader(app models.AppInfo) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -188,7 +149,7 @@ func AppIdentityHeader(app AppInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var5 string
|
var templ_7745c5c3_Var5 string
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(app.LogoIcon)
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(app.LogoIcon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 71, Col: 31}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 32, Col: 31}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -201,7 +162,7 @@ func AppIdentityHeader(app AppInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(app.Name)
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(app.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 75, Col: 41}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 36, Col: 41}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -224,7 +185,7 @@ func AppIdentityHeader(app AppInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var7 string
|
var templ_7745c5c3_Var7 string
|
||||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(app.Domain)
|
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(app.Domain)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 80, Col: 86}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 41, Col: 86}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -238,7 +199,7 @@ func AppIdentityHeader(app AppInfo) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func RequestTypeTabs(req AuthRequest) templ.Component {
|
func RequestTypeTabs(req models.AuthRequest) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -331,7 +292,7 @@ func RequestTypeTabs(req AuthRequest) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConnectPanel(wallet WalletInfo) templ.Component {
|
func ConnectPanel(wallet models.WalletInfo) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -384,7 +345,7 @@ func ConnectPanel(wallet WalletInfo) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func SignPanel(wallet WalletInfo, message string, messageHex string) templ.Component {
|
func SignPanel(wallet models.WalletInfo, message string, messageHex string) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -420,7 +381,7 @@ func SignPanel(wallet WalletInfo, message string, messageHex string) templ.Compo
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 148, Col: 36}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 109, Col: 36}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -438,7 +399,7 @@ func SignPanel(wallet WalletInfo, message string, messageHex string) templ.Compo
|
|||||||
var templ_7745c5c3_Var12 string
|
var templ_7745c5c3_Var12 string
|
||||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(messageHex)
|
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(messageHex)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 160, Col: 47}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 121, Col: 47}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -457,7 +418,7 @@ func SignPanel(wallet WalletInfo, message string, messageHex string) templ.Compo
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TransactionPanel(wallet WalletInfo, tx *TxDetails) templ.Component {
|
func TransactionPanel(wallet models.WalletInfo, tx *models.TxDetails) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -506,7 +467,7 @@ func TransactionPanel(wallet WalletInfo, tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var14 string
|
var templ_7745c5c3_Var14 string
|
||||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Contract)
|
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Contract)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 185, Col: 43}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 146, Col: 43}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -519,7 +480,7 @@ func TransactionPanel(wallet WalletInfo, tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var15 string
|
var templ_7745c5c3_Var15 string
|
||||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Function)
|
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Function)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 189, Col: 43}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 150, Col: 43}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -532,7 +493,7 @@ func TransactionPanel(wallet WalletInfo, tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var16 string
|
var templ_7745c5c3_Var16 string
|
||||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(tx.RawData)
|
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(tx.RawData)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 191, Col: 48}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 152, Col: 48}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -551,7 +512,7 @@ func TransactionPanel(wallet WalletInfo, tx *TxDetails) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) templ.Component {
|
func WalletSelector(wallet models.WalletInfo, showBadge bool, badgeText string) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -579,7 +540,7 @@ func WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) templ.C
|
|||||||
var templ_7745c5c3_Var18 string
|
var templ_7745c5c3_Var18 string
|
||||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Name)
|
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 205, Col: 45}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 166, Col: 45}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -592,7 +553,7 @@ func WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) templ.C
|
|||||||
var templ_7745c5c3_Var19 string
|
var templ_7745c5c3_Var19 string
|
||||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Address)
|
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Address)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 206, Col: 50}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 167, Col: 50}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -610,7 +571,7 @@ func WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) templ.C
|
|||||||
var templ_7745c5c3_Var20 string
|
var templ_7745c5c3_Var20 string
|
||||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(badgeText)
|
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(badgeText)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 210, Col: 43}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 171, Col: 43}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -634,7 +595,7 @@ func WalletSelector(wallet WalletInfo, showBadge bool, badgeText string) templ.C
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func WalletSelectorWithBalance(wallet WalletInfo) templ.Component {
|
func WalletSelectorWithBalance(wallet models.WalletInfo) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -662,7 +623,7 @@ func WalletSelectorWithBalance(wallet WalletInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var22 string
|
var templ_7745c5c3_Var22 string
|
||||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Name)
|
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 224, Col: 45}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 185, Col: 45}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -675,7 +636,7 @@ func WalletSelectorWithBalance(wallet WalletInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var23 string
|
var templ_7745c5c3_Var23 string
|
||||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Address)
|
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Address)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 225, Col: 50}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 186, Col: 50}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -688,7 +649,7 @@ func WalletSelectorWithBalance(wallet WalletInfo) templ.Component {
|
|||||||
var templ_7745c5c3_Var24 string
|
var templ_7745c5c3_Var24 string
|
||||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Balance)
|
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(wallet.Balance)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 230, Col: 47}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 191, Col: 47}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -752,7 +713,7 @@ func PermissionItem(icon string, variant string, title string, description strin
|
|||||||
var templ_7745c5c3_Var28 string
|
var templ_7745c5c3_Var28 string
|
||||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 239, Col: 23}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 200, Col: 23}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -765,7 +726,7 @@ func PermissionItem(icon string, variant string, title string, description strin
|
|||||||
var templ_7745c5c3_Var29 string
|
var templ_7745c5c3_Var29 string
|
||||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 242, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 203, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -778,7 +739,7 @@ func PermissionItem(icon string, variant string, title string, description strin
|
|||||||
var templ_7745c5c3_Var30 string
|
var templ_7745c5c3_Var30 string
|
||||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(description)
|
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(description)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 243, Col: 87}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 204, Col: 87}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -792,7 +753,7 @@ func PermissionItem(icon string, variant string, title string, description strin
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TransactionCard(tx *TxDetails) templ.Component {
|
func TransactionCard(tx *models.TxDetails) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -820,7 +781,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var32 string
|
var templ_7745c5c3_Var32 string
|
||||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Type)
|
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Type)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 252, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 213, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -833,7 +794,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var33 string
|
var templ_7745c5c3_Var33 string
|
||||||
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Initials)
|
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 259, Col: 49}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 220, Col: 49}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -846,7 +807,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var34 string
|
var templ_7745c5c3_Var34 string
|
||||||
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Amount)
|
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Amount)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 261, Col: 55}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 222, Col: 55}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -859,7 +820,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var35 string
|
var templ_7745c5c3_Var35 string
|
||||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Symbol)
|
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 261, Col: 79}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 222, Col: 79}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -872,7 +833,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var36 string
|
var templ_7745c5c3_Var36 string
|
||||||
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Symbol)
|
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 262, Col: 99}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 223, Col: 99}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -885,7 +846,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var37 string
|
var templ_7745c5c3_Var37 string
|
||||||
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.USD)
|
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(tx.FromToken.USD)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 265, Col: 90}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 226, Col: 90}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -898,7 +859,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var38 string
|
var templ_7745c5c3_Var38 string
|
||||||
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Initials)
|
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 272, Col: 47}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 233, Col: 47}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -911,7 +872,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var39 string
|
var templ_7745c5c3_Var39 string
|
||||||
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Amount)
|
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Amount)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 274, Col: 54}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 235, Col: 54}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -924,7 +885,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var40 string
|
var templ_7745c5c3_Var40 string
|
||||||
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Symbol)
|
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 274, Col: 76}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 235, Col: 76}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -937,7 +898,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var41 string
|
var templ_7745c5c3_Var41 string
|
||||||
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Symbol)
|
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 275, Col: 97}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 236, Col: 97}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -950,7 +911,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var42 string
|
var templ_7745c5c3_Var42 string
|
||||||
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.USD)
|
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(tx.ToToken.USD)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 278, Col: 89}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 239, Col: 89}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -964,7 +925,7 @@ func TransactionCard(tx *TxDetails) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TransactionDetails(tx *TxDetails) templ.Component {
|
func TransactionDetails(tx *models.TxDetails) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -992,7 +953,7 @@ func TransactionDetails(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var44 string
|
var templ_7745c5c3_Var44 string
|
||||||
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Network)
|
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Network)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 289, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 250, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1005,7 +966,7 @@ func TransactionDetails(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var45 string
|
var templ_7745c5c3_Var45 string
|
||||||
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(tx.NetworkFee)
|
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(tx.NetworkFee)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 293, Col: 41}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 254, Col: 41}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1018,7 +979,7 @@ func TransactionDetails(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var46 string
|
var templ_7745c5c3_Var46 string
|
||||||
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(tx.MaxFee)
|
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(tx.MaxFee)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 297, Col: 37}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 258, Col: 37}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1031,7 +992,7 @@ func TransactionDetails(tx *TxDetails) templ.Component {
|
|||||||
var templ_7745c5c3_Var47 string
|
var templ_7745c5c3_Var47 string
|
||||||
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Slippage)
|
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Slippage)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 301, Col: 39}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 262, Col: 39}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1073,7 +1034,7 @@ func AuthFooterActions(requestType string) templ.Component {
|
|||||||
var templ_7745c5c3_Var49 string
|
var templ_7745c5c3_Var49 string
|
||||||
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(`{"type":"` + requestType + `"}`)
|
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(`{"type":"` + requestType + `"}`)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 328, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/authorize.templ`, Line: 289, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
@@ -3,139 +3,10 @@ package views
|
|||||||
import (
|
import (
|
||||||
"nebula/components"
|
"nebula/components"
|
||||||
"nebula/layouts"
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Token struct {
|
templ DashboardPage(data models.DashboardData, activeTab string) {
|
||||||
Symbol string
|
|
||||||
Name string
|
|
||||||
Balance string
|
|
||||||
Value string
|
|
||||||
Change string
|
|
||||||
Positive bool
|
|
||||||
Color string
|
|
||||||
Initials string
|
|
||||||
Network string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Transaction struct {
|
|
||||||
Type string
|
|
||||||
Asset string
|
|
||||||
Amount string
|
|
||||||
USD string
|
|
||||||
Date string
|
|
||||||
Time string
|
|
||||||
Hash string
|
|
||||||
Positive bool
|
|
||||||
Address string
|
|
||||||
}
|
|
||||||
|
|
||||||
type NFT struct {
|
|
||||||
Name string
|
|
||||||
Collection string
|
|
||||||
Image string
|
|
||||||
Floor string
|
|
||||||
Value string
|
|
||||||
Badge string
|
|
||||||
Verified bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type DashboardData struct {
|
|
||||||
TotalBalance string
|
|
||||||
Change24h string
|
|
||||||
Tokens []Token
|
|
||||||
Transactions []Transaction
|
|
||||||
NFTs []NFT
|
|
||||||
PortfolioChart []components.AreaSeriesData
|
|
||||||
MarketCapBubble []components.BubbleData
|
|
||||||
}
|
|
||||||
|
|
||||||
func DefaultDashboardData() DashboardData {
|
|
||||||
return DashboardData{
|
|
||||||
TotalBalance: "12847.32",
|
|
||||||
Change24h: "+$302.18",
|
|
||||||
Tokens: []Token{
|
|
||||||
{Symbol: "SNR", Name: "Sonr", Balance: "8,432.50", Value: "$4,216.25", Change: "+5.67%", Positive: true, Color: "linear-gradient(135deg, #17c2ff, #0090ff)", Initials: "S", Network: "Sonr Mainnet"},
|
|
||||||
{Symbol: "ETH", Name: "Ethereum", Balance: "2.847", Value: "$6,682.04", Change: "+3.24%", Positive: true, Color: "#627eea", Initials: "E", Network: "Ethereum"},
|
|
||||||
{Symbol: "USDC", Name: "USD Coin", Balance: "1,250.00", Value: "$1,250.00", Change: "0.00%", Positive: true, Color: "#2775ca", Initials: "U", Network: "Ethereum"},
|
|
||||||
{Symbol: "AVAX", Name: "Avalanche", Balance: "24.83", Value: "$699.03", Change: "-2.18%", Positive: false, Color: "#e84142", Initials: "A", Network: "Avalanche"},
|
|
||||||
},
|
|
||||||
Transactions: []Transaction{
|
|
||||||
{Type: "receive", Asset: "ETH", Amount: "+0.25 ETH", USD: "$586.25", Date: "Today", Time: "2:34 PM", Hash: "0x8f4a2b1c...", Positive: true, Address: "0x742d...35Cb"},
|
|
||||||
{Type: "send", Asset: "SNR", Amount: "-500 SNR", USD: "$250.00", Date: "Yesterday", Time: "11:22 AM", Hash: "0x7d3e2a1b...", Positive: false, Address: "sonr1k4m...9p3q"},
|
|
||||||
{Type: "swap", Asset: "ETH → USDC", Amount: "0.5 ETH", USD: "→ 1,172.50 USDC", Date: "Jan 1", Time: "9:15 AM", Hash: "0x1a2b3c4d...", Positive: true, Address: "Uniswap V3"},
|
|
||||||
},
|
|
||||||
NFTs: []NFT{
|
|
||||||
{Name: "Bored Ape #4521", Collection: "Bored Ape Yacht Club", Image: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?w=400&h=400&fit=crop", Floor: "28.5 ETH", Value: "32.0 ETH", Badge: "Listed", Verified: true},
|
|
||||||
{Name: "Sonr Genesis #001", Collection: "Sonr Genesis", Image: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=400&h=400&fit=crop", Floor: "0.8 ETH", Value: "2.5 ETH", Badge: "Rare", Verified: true},
|
|
||||||
},
|
|
||||||
PortfolioChart: DefaultPortfolioChartData(),
|
|
||||||
MarketCapBubble: DefaultMarketCapBubbleData(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultPortfolioChartData returns sample stacked area data for portfolio performance by asset
|
|
||||||
func DefaultPortfolioChartData() []components.AreaSeriesData {
|
|
||||||
return []components.AreaSeriesData{
|
|
||||||
// Day 1
|
|
||||||
{Date: "2024-12-25", Industry: "ETH", Value: 3200},
|
|
||||||
{Date: "2024-12-25", Industry: "SNR", Value: 2100},
|
|
||||||
{Date: "2024-12-25", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-25", Industry: "AVAX", Value: 500},
|
|
||||||
// Day 2
|
|
||||||
{Date: "2024-12-26", Industry: "ETH", Value: 3350},
|
|
||||||
{Date: "2024-12-26", Industry: "SNR", Value: 2200},
|
|
||||||
{Date: "2024-12-26", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-26", Industry: "AVAX", Value: 520},
|
|
||||||
// Day 3
|
|
||||||
{Date: "2024-12-27", Industry: "ETH", Value: 3500},
|
|
||||||
{Date: "2024-12-27", Industry: "SNR", Value: 2350},
|
|
||||||
{Date: "2024-12-27", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-27", Industry: "AVAX", Value: 480},
|
|
||||||
// Day 4
|
|
||||||
{Date: "2024-12-28", Industry: "ETH", Value: 3280},
|
|
||||||
{Date: "2024-12-28", Industry: "SNR", Value: 2400},
|
|
||||||
{Date: "2024-12-28", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-28", Industry: "AVAX", Value: 510},
|
|
||||||
// Day 5
|
|
||||||
{Date: "2024-12-29", Industry: "ETH", Value: 3450},
|
|
||||||
{Date: "2024-12-29", Industry: "SNR", Value: 2550},
|
|
||||||
{Date: "2024-12-29", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-29", Industry: "AVAX", Value: 530},
|
|
||||||
// Day 6
|
|
||||||
{Date: "2024-12-30", Industry: "ETH", Value: 3600},
|
|
||||||
{Date: "2024-12-30", Industry: "SNR", Value: 2680},
|
|
||||||
{Date: "2024-12-30", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-30", Industry: "AVAX", Value: 550},
|
|
||||||
// Day 7
|
|
||||||
{Date: "2024-12-31", Industry: "ETH", Value: 3750},
|
|
||||||
{Date: "2024-12-31", Industry: "SNR", Value: 2800},
|
|
||||||
{Date: "2024-12-31", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-31", Industry: "AVAX", Value: 580},
|
|
||||||
// Day 8
|
|
||||||
{Date: "2025-01-01", Industry: "ETH", Value: 3680},
|
|
||||||
{Date: "2025-01-01", Industry: "SNR", Value: 2900},
|
|
||||||
{Date: "2025-01-01", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2025-01-01", Industry: "AVAX", Value: 600},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultMarketCapBubbleData returns sample bubble chart data for market cap dominance
|
|
||||||
func DefaultMarketCapBubbleData() []components.BubbleData {
|
|
||||||
return []components.BubbleData{
|
|
||||||
{Name: "BTC", Sector: "Layer 1", Value: 45000},
|
|
||||||
{Name: "ETH", Sector: "Layer 1", Value: 28000},
|
|
||||||
{Name: "SNR", Sector: "Layer 1", Value: 8500},
|
|
||||||
{Name: "SOL", Sector: "Layer 1", Value: 12000},
|
|
||||||
{Name: "AVAX", Sector: "Layer 1", Value: 6000},
|
|
||||||
{Name: "USDC", Sector: "Stablecoin", Value: 15000},
|
|
||||||
{Name: "USDT", Sector: "Stablecoin", Value: 18000},
|
|
||||||
{Name: "UNI", Sector: "DeFi", Value: 4500},
|
|
||||||
{Name: "AAVE", Sector: "DeFi", Value: 3200},
|
|
||||||
{Name: "LINK", Sector: "Oracle", Value: 5800},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
templ DashboardPage(data DashboardData, activeTab string) {
|
|
||||||
@layouts.DashboardLayout("Dashboard - Sonr", layouts.WalletUser{Name: "Sonr Wallet", Address: "sonr1x9f...7k2m"}, activeTab) {
|
@layouts.DashboardLayout("Dashboard - Sonr", layouts.WalletUser{Name: "Sonr Wallet", Address: "sonr1x9f...7k2m"}, activeTab) {
|
||||||
@dashboardStyles()
|
@dashboardStyles()
|
||||||
@DashboardContent(data, activeTab)
|
@DashboardContent(data, activeTab)
|
||||||
@@ -145,8 +16,7 @@ templ DashboardPage(data DashboardData, activeTab string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DashboardContent renders just the tab content (for HTMX partial updates)
|
templ DashboardContent(data models.DashboardData, activeTab string) {
|
||||||
templ DashboardContent(data DashboardData, activeTab string) {
|
|
||||||
<div id="dashboard-content">
|
<div id="dashboard-content">
|
||||||
if activeTab == "" || activeTab == "overview" {
|
if activeTab == "" || activeTab == "overview" {
|
||||||
@OverviewPanel(data)
|
@OverviewPanel(data)
|
||||||
@@ -162,7 +32,7 @@ templ DashboardContent(data DashboardData, activeTab string) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ OverviewPanel(data DashboardData) {
|
templ OverviewPanel(data models.DashboardData) {
|
||||||
<header style="margin-bottom: var(--wa-space-l);">
|
<header style="margin-bottom: var(--wa-space-l);">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-stack wa-gap-2xs">
|
<div class="wa-stack wa-gap-2xs">
|
||||||
@@ -269,7 +139,7 @@ templ OverviewPanel(data DashboardData) {
|
|||||||
@ConnectedAccountsCard()
|
@ConnectedAccountsCard()
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TokenRow(token Token) {
|
templ TokenRow(token models.Token) {
|
||||||
<div class="token-row">
|
<div class="token-row">
|
||||||
<div class="token-info">
|
<div class="token-info">
|
||||||
<wa-avatar initials={ token.Initials } style={ "--size: 40px; background: " + token.Color + ";" }></wa-avatar>
|
<wa-avatar initials={ token.Initials } style={ "--size: 40px; background: " + token.Color + ";" }></wa-avatar>
|
||||||
@@ -295,7 +165,7 @@ templ TokenRow(token Token) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionTableRow(tx Transaction) {
|
templ TransactionTableRow(tx models.Transaction) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span class={ "tx-type", tx.Type }>
|
<span class={ "tx-type", tx.Type }>
|
||||||
@@ -371,7 +241,7 @@ templ AccountCard(initials string, name string, address string, color string, ac
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TransactionsPanel(transactions []Transaction) {
|
templ TransactionsPanel(transactions []models.Transaction) {
|
||||||
@components.TxStyles()
|
@components.TxStyles()
|
||||||
<header style="margin-bottom: var(--wa-space-l);">
|
<header style="margin-bottom: var(--wa-space-l);">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
@@ -405,7 +275,7 @@ templ StatCard(label string, value string, subtitle string, variant string) {
|
|||||||
</wa-card>
|
</wa-card>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TokensPanel(tokens []Token) {
|
templ TokensPanel(tokens []models.Token) {
|
||||||
<header style="margin-bottom: var(--wa-space-l);">
|
<header style="margin-bottom: var(--wa-space-l);">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-stack wa-gap-2xs">
|
<div class="wa-stack wa-gap-2xs">
|
||||||
@@ -471,7 +341,7 @@ templ TokensPanel(tokens []Token) {
|
|||||||
</wa-card>
|
</wa-card>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ TokenTableRow(token Token) {
|
templ TokenTableRow(token models.Token) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="token-cell">
|
<div class="token-cell">
|
||||||
@@ -517,7 +387,7 @@ templ TokenTableRow(token Token) {
|
|||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ NFTsPanel(nfts []NFT) {
|
templ NFTsPanel(nfts []models.NFT) {
|
||||||
<header style="margin-bottom: var(--wa-space-l);">
|
<header style="margin-bottom: var(--wa-space-l);">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-stack wa-gap-2xs">
|
<div class="wa-stack wa-gap-2xs">
|
||||||
@@ -561,7 +431,7 @@ templ NFTsPanel(nfts []NFT) {
|
|||||||
</wa-card>
|
</wa-card>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ NFTCard(nft NFT) {
|
templ NFTCard(nft models.NFT) {
|
||||||
<div class="nft-card">
|
<div class="nft-card">
|
||||||
<div class="nft-image">
|
<div class="nft-image">
|
||||||
<img src={ nft.Image } alt={ nft.Name }/>
|
<img src={ nft.Image } alt={ nft.Name }/>
|
||||||
@@ -606,10 +476,10 @@ func nftBadgeVariant(badge string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
templ ActivityPanel() {
|
templ ActivityPanel() {
|
||||||
@ActivityPanelWithData(DefaultMarketCapBubbleData())
|
@ActivityPanelWithData(models.DefaultMarketCapBubbleData())
|
||||||
}
|
}
|
||||||
|
|
||||||
templ ActivityPanelWithData(marketCapData []components.BubbleData) {
|
templ ActivityPanelWithData(marketCapData []models.BubbleData) {
|
||||||
<header style="margin-bottom: var(--wa-space-l);">
|
<header style="margin-bottom: var(--wa-space-l);">
|
||||||
<div class="wa-flank">
|
<div class="wa-flank">
|
||||||
<div class="wa-stack wa-gap-2xs">
|
<div class="wa-stack wa-gap-2xs">
|
||||||
|
|||||||
@@ -11,139 +11,10 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
import (
|
import (
|
||||||
"nebula/components"
|
"nebula/components"
|
||||||
"nebula/layouts"
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Token struct {
|
func DashboardPage(data models.DashboardData, activeTab string) templ.Component {
|
||||||
Symbol string
|
|
||||||
Name string
|
|
||||||
Balance string
|
|
||||||
Value string
|
|
||||||
Change string
|
|
||||||
Positive bool
|
|
||||||
Color string
|
|
||||||
Initials string
|
|
||||||
Network string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Transaction struct {
|
|
||||||
Type string
|
|
||||||
Asset string
|
|
||||||
Amount string
|
|
||||||
USD string
|
|
||||||
Date string
|
|
||||||
Time string
|
|
||||||
Hash string
|
|
||||||
Positive bool
|
|
||||||
Address string
|
|
||||||
}
|
|
||||||
|
|
||||||
type NFT struct {
|
|
||||||
Name string
|
|
||||||
Collection string
|
|
||||||
Image string
|
|
||||||
Floor string
|
|
||||||
Value string
|
|
||||||
Badge string
|
|
||||||
Verified bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type DashboardData struct {
|
|
||||||
TotalBalance string
|
|
||||||
Change24h string
|
|
||||||
Tokens []Token
|
|
||||||
Transactions []Transaction
|
|
||||||
NFTs []NFT
|
|
||||||
PortfolioChart []components.AreaSeriesData
|
|
||||||
MarketCapBubble []components.BubbleData
|
|
||||||
}
|
|
||||||
|
|
||||||
func DefaultDashboardData() DashboardData {
|
|
||||||
return DashboardData{
|
|
||||||
TotalBalance: "12847.32",
|
|
||||||
Change24h: "+$302.18",
|
|
||||||
Tokens: []Token{
|
|
||||||
{Symbol: "SNR", Name: "Sonr", Balance: "8,432.50", Value: "$4,216.25", Change: "+5.67%", Positive: true, Color: "linear-gradient(135deg, #17c2ff, #0090ff)", Initials: "S", Network: "Sonr Mainnet"},
|
|
||||||
{Symbol: "ETH", Name: "Ethereum", Balance: "2.847", Value: "$6,682.04", Change: "+3.24%", Positive: true, Color: "#627eea", Initials: "E", Network: "Ethereum"},
|
|
||||||
{Symbol: "USDC", Name: "USD Coin", Balance: "1,250.00", Value: "$1,250.00", Change: "0.00%", Positive: true, Color: "#2775ca", Initials: "U", Network: "Ethereum"},
|
|
||||||
{Symbol: "AVAX", Name: "Avalanche", Balance: "24.83", Value: "$699.03", Change: "-2.18%", Positive: false, Color: "#e84142", Initials: "A", Network: "Avalanche"},
|
|
||||||
},
|
|
||||||
Transactions: []Transaction{
|
|
||||||
{Type: "receive", Asset: "ETH", Amount: "+0.25 ETH", USD: "$586.25", Date: "Today", Time: "2:34 PM", Hash: "0x8f4a2b1c...", Positive: true, Address: "0x742d...35Cb"},
|
|
||||||
{Type: "send", Asset: "SNR", Amount: "-500 SNR", USD: "$250.00", Date: "Yesterday", Time: "11:22 AM", Hash: "0x7d3e2a1b...", Positive: false, Address: "sonr1k4m...9p3q"},
|
|
||||||
{Type: "swap", Asset: "ETH → USDC", Amount: "0.5 ETH", USD: "→ 1,172.50 USDC", Date: "Jan 1", Time: "9:15 AM", Hash: "0x1a2b3c4d...", Positive: true, Address: "Uniswap V3"},
|
|
||||||
},
|
|
||||||
NFTs: []NFT{
|
|
||||||
{Name: "Bored Ape #4521", Collection: "Bored Ape Yacht Club", Image: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?w=400&h=400&fit=crop", Floor: "28.5 ETH", Value: "32.0 ETH", Badge: "Listed", Verified: true},
|
|
||||||
{Name: "Sonr Genesis #001", Collection: "Sonr Genesis", Image: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=400&h=400&fit=crop", Floor: "0.8 ETH", Value: "2.5 ETH", Badge: "Rare", Verified: true},
|
|
||||||
},
|
|
||||||
PortfolioChart: DefaultPortfolioChartData(),
|
|
||||||
MarketCapBubble: DefaultMarketCapBubbleData(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultPortfolioChartData returns sample stacked area data for portfolio performance by asset
|
|
||||||
func DefaultPortfolioChartData() []components.AreaSeriesData {
|
|
||||||
return []components.AreaSeriesData{
|
|
||||||
// Day 1
|
|
||||||
{Date: "2024-12-25", Industry: "ETH", Value: 3200},
|
|
||||||
{Date: "2024-12-25", Industry: "SNR", Value: 2100},
|
|
||||||
{Date: "2024-12-25", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-25", Industry: "AVAX", Value: 500},
|
|
||||||
// Day 2
|
|
||||||
{Date: "2024-12-26", Industry: "ETH", Value: 3350},
|
|
||||||
{Date: "2024-12-26", Industry: "SNR", Value: 2200},
|
|
||||||
{Date: "2024-12-26", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-26", Industry: "AVAX", Value: 520},
|
|
||||||
// Day 3
|
|
||||||
{Date: "2024-12-27", Industry: "ETH", Value: 3500},
|
|
||||||
{Date: "2024-12-27", Industry: "SNR", Value: 2350},
|
|
||||||
{Date: "2024-12-27", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-27", Industry: "AVAX", Value: 480},
|
|
||||||
// Day 4
|
|
||||||
{Date: "2024-12-28", Industry: "ETH", Value: 3280},
|
|
||||||
{Date: "2024-12-28", Industry: "SNR", Value: 2400},
|
|
||||||
{Date: "2024-12-28", Industry: "USDC", Value: 1200},
|
|
||||||
{Date: "2024-12-28", Industry: "AVAX", Value: 510},
|
|
||||||
// Day 5
|
|
||||||
{Date: "2024-12-29", Industry: "ETH", Value: 3450},
|
|
||||||
{Date: "2024-12-29", Industry: "SNR", Value: 2550},
|
|
||||||
{Date: "2024-12-29", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-29", Industry: "AVAX", Value: 530},
|
|
||||||
// Day 6
|
|
||||||
{Date: "2024-12-30", Industry: "ETH", Value: 3600},
|
|
||||||
{Date: "2024-12-30", Industry: "SNR", Value: 2680},
|
|
||||||
{Date: "2024-12-30", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-30", Industry: "AVAX", Value: 550},
|
|
||||||
// Day 7
|
|
||||||
{Date: "2024-12-31", Industry: "ETH", Value: 3750},
|
|
||||||
{Date: "2024-12-31", Industry: "SNR", Value: 2800},
|
|
||||||
{Date: "2024-12-31", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2024-12-31", Industry: "AVAX", Value: 580},
|
|
||||||
// Day 8
|
|
||||||
{Date: "2025-01-01", Industry: "ETH", Value: 3680},
|
|
||||||
{Date: "2025-01-01", Industry: "SNR", Value: 2900},
|
|
||||||
{Date: "2025-01-01", Industry: "USDC", Value: 1250},
|
|
||||||
{Date: "2025-01-01", Industry: "AVAX", Value: 600},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultMarketCapBubbleData returns sample bubble chart data for market cap dominance
|
|
||||||
func DefaultMarketCapBubbleData() []components.BubbleData {
|
|
||||||
return []components.BubbleData{
|
|
||||||
{Name: "BTC", Sector: "Layer 1", Value: 45000},
|
|
||||||
{Name: "ETH", Sector: "Layer 1", Value: 28000},
|
|
||||||
{Name: "SNR", Sector: "Layer 1", Value: 8500},
|
|
||||||
{Name: "SOL", Sector: "Layer 1", Value: 12000},
|
|
||||||
{Name: "AVAX", Sector: "Layer 1", Value: 6000},
|
|
||||||
{Name: "USDC", Sector: "Stablecoin", Value: 15000},
|
|
||||||
{Name: "USDT", Sector: "Stablecoin", Value: 18000},
|
|
||||||
{Name: "UNI", Sector: "DeFi", Value: 4500},
|
|
||||||
{Name: "AAVE", Sector: "DeFi", Value: 3200},
|
|
||||||
{Name: "LINK", Sector: "Oracle", Value: 5800},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func DashboardPage(data DashboardData, activeTab string) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -214,8 +85,7 @@ func DashboardPage(data DashboardData, activeTab string) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// DashboardContent renders just the tab content (for HTMX partial updates)
|
func DashboardContent(data models.DashboardData, activeTab string) templ.Component {
|
||||||
func DashboardContent(data DashboardData, activeTab string) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -274,7 +144,7 @@ func DashboardContent(data DashboardData, activeTab string) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func OverviewPanel(data DashboardData) templ.Component {
|
func OverviewPanel(data models.DashboardData) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -302,7 +172,7 @@ func OverviewPanel(data DashboardData) templ.Component {
|
|||||||
var templ_7745c5c3_Var5 string
|
var templ_7745c5c3_Var5 string
|
||||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(data.TotalBalance)
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(data.TotalBalance)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 198, Col: 81}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 68, Col: 81}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -315,7 +185,7 @@ func OverviewPanel(data DashboardData) templ.Component {
|
|||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.Change24h)
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.Change24h)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 212, Col: 90}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 82, Col: 90}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -361,7 +231,7 @@ func OverviewPanel(data DashboardData) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TokenRow(token Token) templ.Component {
|
func TokenRow(token models.Token) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -389,7 +259,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var8 string
|
var templ_7745c5c3_Var8 string
|
||||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(token.Initials)
|
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(token.Initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 275, Col: 39}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 145, Col: 39}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -402,7 +272,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 40px; background: " + token.Color + ";")
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 40px; background: " + token.Color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 275, Col: 98}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 145, Col: 98}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -415,7 +285,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var10 string
|
var templ_7745c5c3_Var10 string
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(token.Name)
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(token.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 277, Col: 43}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 147, Col: 43}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -428,7 +298,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 278, Col: 90}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 148, Col: 90}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -441,7 +311,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var12 string
|
var templ_7745c5c3_Var12 string
|
||||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(token.Balance)
|
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(token.Balance)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 283, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 153, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -454,7 +324,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var13 string
|
var templ_7745c5c3_Var13 string
|
||||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(token.Value)
|
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(token.Value)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 284, Col: 89}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 154, Col: 89}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -468,7 +338,7 @@ func TokenRow(token Token) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TransactionTableRow(tx Transaction) templ.Component {
|
func TransactionTableRow(tx models.Transaction) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -538,7 +408,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var17 string
|
var templ_7745c5c3_Var17 string
|
||||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Asset)
|
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Asset)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 314, Col: 16}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 184, Col: 16}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -551,7 +421,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var18 string
|
var templ_7745c5c3_Var18 string
|
||||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(txAmountStyle(tx.Positive))
|
templ_7745c5c3_Var18, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(txAmountStyle(tx.Positive))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 317, Col: 44}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 187, Col: 44}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -564,7 +434,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var19 string
|
var templ_7745c5c3_Var19 string
|
||||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Amount)
|
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Amount)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 317, Col: 58}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 187, Col: 58}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -577,7 +447,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var20 string
|
var templ_7745c5c3_Var20 string
|
||||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(tx.USD)
|
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(tx.USD)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 318, Col: 84}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 188, Col: 84}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -590,7 +460,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var21 string
|
var templ_7745c5c3_Var21 string
|
||||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Date)
|
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Date)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 323, Col: 19}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 193, Col: 19}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -603,7 +473,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var22 string
|
var templ_7745c5c3_Var22 string
|
||||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Time)
|
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Time)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 324, Col: 85}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 194, Col: 85}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -616,7 +486,7 @@ func TransactionTableRow(tx Transaction) templ.Component {
|
|||||||
var templ_7745c5c3_Var23 string
|
var templ_7745c5c3_Var23 string
|
||||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Hash)
|
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(tx.Hash)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 328, Col: 34}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 198, Col: 34}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -710,7 +580,7 @@ func AccountCard(initials string, name string, address string, color string, act
|
|||||||
var templ_7745c5c3_Var26 string
|
var templ_7745c5c3_Var26 string
|
||||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(initials)
|
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 360, Col: 33}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 230, Col: 33}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -723,7 +593,7 @@ func AccountCard(initials string, name string, address string, color string, act
|
|||||||
var templ_7745c5c3_Var27 string
|
var templ_7745c5c3_Var27 string
|
||||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 40px; background: " + color + ";")
|
templ_7745c5c3_Var27, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 40px; background: " + color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 360, Col: 86}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 230, Col: 86}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -736,7 +606,7 @@ func AccountCard(initials string, name string, address string, color string, act
|
|||||||
var templ_7745c5c3_Var28 string
|
var templ_7745c5c3_Var28 string
|
||||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 362, Col: 37}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 232, Col: 37}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -749,7 +619,7 @@ func AccountCard(initials string, name string, address string, color string, act
|
|||||||
var templ_7745c5c3_Var29 string
|
var templ_7745c5c3_Var29 string
|
||||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(address)
|
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(address)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 363, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 233, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -778,7 +648,7 @@ func AccountCard(initials string, name string, address string, color string, act
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TransactionsPanel(transactions []Transaction) templ.Component {
|
func TransactionsPanel(transactions []models.Transaction) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -865,7 +735,7 @@ func StatCard(label string, value string, subtitle string, variant string) templ
|
|||||||
var templ_7745c5c3_Var32 string
|
var templ_7745c5c3_Var32 string
|
||||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 401, Col: 82}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 271, Col: 82}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -900,7 +770,7 @@ func StatCard(label string, value string, subtitle string, variant string) templ
|
|||||||
var templ_7745c5c3_Var35 string
|
var templ_7745c5c3_Var35 string
|
||||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 402, Col: 142}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 272, Col: 142}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -913,7 +783,7 @@ func StatCard(label string, value string, subtitle string, variant string) templ
|
|||||||
var templ_7745c5c3_Var36 string
|
var templ_7745c5c3_Var36 string
|
||||||
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle)
|
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 403, Col: 85}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 273, Col: 85}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -927,7 +797,7 @@ func StatCard(label string, value string, subtitle string, variant string) templ
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TokensPanel(tokens []Token) templ.Component {
|
func TokensPanel(tokens []models.Token) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -966,7 +836,7 @@ func TokensPanel(tokens []Token) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TokenTableRow(token Token) templ.Component {
|
func TokenTableRow(token models.Token) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -994,7 +864,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var39 string
|
var templ_7745c5c3_Var39 string
|
||||||
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(token.Initials)
|
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(token.Initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 478, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 348, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1007,7 +877,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var40 string
|
var templ_7745c5c3_Var40 string
|
||||||
templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 36px; background: " + token.Color + ";")
|
templ_7745c5c3_Var40, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 36px; background: " + token.Color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 478, Col: 99}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 348, Col: 99}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1020,7 +890,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var41 string
|
var templ_7745c5c3_Var41 string
|
||||||
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(token.Name)
|
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(token.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 480, Col: 44}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 350, Col: 44}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1033,7 +903,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var42 string
|
var templ_7745c5c3_Var42 string
|
||||||
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 481, Col: 91}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 351, Col: 91}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1046,7 +916,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var43 string
|
var templ_7745c5c3_Var43 string
|
||||||
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(token.Network)
|
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(token.Network)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 488, Col: 19}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 358, Col: 19}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1092,7 +962,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var46 string
|
var templ_7745c5c3_Var46 string
|
||||||
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(token.Change)
|
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(token.Change)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 498, Col: 18}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 368, Col: 18}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1105,7 +975,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var47 string
|
var templ_7745c5c3_Var47 string
|
||||||
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(token.Balance)
|
templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(token.Balance)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 501, Col: 21}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 371, Col: 21}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1118,7 +988,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var48 string
|
var templ_7745c5c3_Var48 string
|
||||||
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(token.Symbol)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 501, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 371, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1131,7 +1001,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
var templ_7745c5c3_Var49 string
|
var templ_7745c5c3_Var49 string
|
||||||
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(token.Value)
|
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(token.Value)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 504, Col: 44}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 374, Col: 44}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1145,7 +1015,7 @@ func TokenTableRow(token Token) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func NFTsPanel(nfts []NFT) templ.Component {
|
func NFTsPanel(nfts []models.NFT) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -1200,7 +1070,7 @@ func NFTsPanel(nfts []NFT) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func NFTCard(nft NFT) templ.Component {
|
func NFTCard(nft models.NFT) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -1228,7 +1098,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var52 string
|
var templ_7745c5c3_Var52 string
|
||||||
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Image)
|
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Image)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 567, Col: 23}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 437, Col: 23}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1241,7 +1111,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var53 string
|
var templ_7745c5c3_Var53 string
|
||||||
templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Name)
|
templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 567, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 437, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1259,7 +1129,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var54 string
|
var templ_7745c5c3_Var54 string
|
||||||
templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(nftBadgeVariant(nft.Badge))
|
templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(nftBadgeVariant(nft.Badge))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 570, Col: 51}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 440, Col: 51}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1272,7 +1142,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var55 string
|
var templ_7745c5c3_Var55 string
|
||||||
templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Badge)
|
templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Badge)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 570, Col: 70}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 440, Col: 70}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1300,7 +1170,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var56 string
|
var templ_7745c5c3_Var56 string
|
||||||
templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Collection)
|
templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Collection)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 587, Col: 54}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 457, Col: 54}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1313,7 +1183,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var57 string
|
var templ_7745c5c3_Var57 string
|
||||||
templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Name)
|
templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 589, Col: 35}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 459, Col: 35}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1326,7 +1196,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var58 string
|
var templ_7745c5c3_Var58 string
|
||||||
templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Floor)
|
templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Floor)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 591, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 461, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1339,7 +1209,7 @@ func NFTCard(nft NFT) templ.Component {
|
|||||||
var templ_7745c5c3_Var59 string
|
var templ_7745c5c3_Var59 string
|
||||||
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Value)
|
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(nft.Value)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 592, Col: 39}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 462, Col: 39}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1384,7 +1254,7 @@ func ActivityPanel() templ.Component {
|
|||||||
templ_7745c5c3_Var60 = templ.NopComponent
|
templ_7745c5c3_Var60 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
templ_7745c5c3_Err = ActivityPanelWithData(DefaultMarketCapBubbleData()).Render(ctx, templ_7745c5c3_Buffer)
|
templ_7745c5c3_Err = ActivityPanelWithData(models.DefaultMarketCapBubbleData()).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -1392,7 +1262,7 @@ func ActivityPanel() templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func ActivityPanelWithData(marketCapData []components.BubbleData) templ.Component {
|
func ActivityPanelWithData(marketCapData []models.BubbleData) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -1497,7 +1367,7 @@ func ActivityStatCard(icon string, label string, value string, color string) tem
|
|||||||
var templ_7745c5c3_Var63 string
|
var templ_7745c5c3_Var63 string
|
||||||
templ_7745c5c3_Var63, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("background: " + color + "20;")
|
templ_7745c5c3_Var63, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("background: " + color + "20;")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 653, Col: 68}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 523, Col: 68}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1510,7 +1380,7 @@ func ActivityStatCard(icon string, label string, value string, color string) tem
|
|||||||
var templ_7745c5c3_Var64 string
|
var templ_7745c5c3_Var64 string
|
||||||
templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 654, Col: 36}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 524, Col: 36}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1523,7 +1393,7 @@ func ActivityStatCard(icon string, label string, value string, color string) tem
|
|||||||
var templ_7745c5c3_Var65 string
|
var templ_7745c5c3_Var65 string
|
||||||
templ_7745c5c3_Var65, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
templ_7745c5c3_Var65, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 654, Col: 70}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 524, Col: 70}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1536,7 +1406,7 @@ func ActivityStatCard(icon string, label string, value string, color string) tem
|
|||||||
var templ_7745c5c3_Var66 string
|
var templ_7745c5c3_Var66 string
|
||||||
templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 657, Col: 83}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 527, Col: 83}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1549,7 +1419,7 @@ func ActivityStatCard(icon string, label string, value string, color string) tem
|
|||||||
var templ_7745c5c3_Var67 string
|
var templ_7745c5c3_Var67 string
|
||||||
templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(value)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 658, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 528, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1636,7 +1506,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var70 string
|
var templ_7745c5c3_Var70 string
|
||||||
templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 681, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 551, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1649,7 +1519,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var71 string
|
var templ_7745c5c3_Var71 string
|
||||||
templ_7745c5c3_Var71, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
templ_7745c5c3_Var71, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 681, Col: 80}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 551, Col: 80}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1662,7 +1532,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var72 string
|
var templ_7745c5c3_Var72 string
|
||||||
templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 683, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 553, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1675,7 +1545,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var73 string
|
var templ_7745c5c3_Var73 string
|
||||||
templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(desc)
|
templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(desc)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 684, Col: 81}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 554, Col: 81}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1688,7 +1558,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var74 string
|
var templ_7745c5c3_Var74 string
|
||||||
templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(primaryAction)
|
templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(primaryAction)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 688, Col: 58}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 558, Col: 58}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1701,7 +1571,7 @@ func PendingAction(icon string, color string, title string, desc string, primary
|
|||||||
var templ_7745c5c3_Var75 string
|
var templ_7745c5c3_Var75 string
|
||||||
templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(secondaryAction)
|
templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(secondaryAction)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 689, Col: 84}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 559, Col: 84}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1796,7 +1666,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var78 string
|
var templ_7745c5c3_Var78 string
|
||||||
templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 718, Col: 45}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 588, Col: 45}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1809,7 +1679,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var79 string
|
var templ_7745c5c3_Var79 string
|
||||||
templ_7745c5c3_Var79, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
templ_7745c5c3_Var79, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("color: " + color + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 718, Col: 79}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 588, Col: 79}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1822,7 +1692,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var80 string
|
var templ_7745c5c3_Var80 string
|
||||||
templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(device)
|
templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(device)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 722, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 592, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1845,7 +1715,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var81 string
|
var templ_7745c5c3_Var81 string
|
||||||
templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(details)
|
templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(details)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 727, Col: 84}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 597, Col: 84}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1858,7 +1728,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var82 string
|
var templ_7745c5c3_Var82 string
|
||||||
templ_7745c5c3_Var82, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(sessionTimeStyle(current))
|
templ_7745c5c3_Var82, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(sessionTimeStyle(current))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 729, Col: 64}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 599, Col: 64}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1871,7 +1741,7 @@ func SessionRow(icon string, color string, device string, details string, time s
|
|||||||
var templ_7745c5c3_Var83 string
|
var templ_7745c5c3_Var83 string
|
||||||
templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(time)
|
templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(time)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 729, Col: 73}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 599, Col: 73}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1983,7 +1853,7 @@ func ConnectedAppRow(initials string, bg string, name string, domain string, bad
|
|||||||
var templ_7745c5c3_Var86 string
|
var templ_7745c5c3_Var86 string
|
||||||
templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(initials)
|
templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(initials)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 768, Col: 32}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 638, Col: 32}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -1996,7 +1866,7 @@ func ConnectedAppRow(initials string, bg string, name string, domain string, bad
|
|||||||
var templ_7745c5c3_Var87 string
|
var templ_7745c5c3_Var87 string
|
||||||
templ_7745c5c3_Var87, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 36px; background: " + bg + ";")
|
templ_7745c5c3_Var87, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("--size: 36px; background: " + bg + ";")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 768, Col: 82}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 638, Col: 82}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -2009,7 +1879,7 @@ func ConnectedAppRow(initials string, bg string, name string, domain string, bad
|
|||||||
var templ_7745c5c3_Var88 string
|
var templ_7745c5c3_Var88 string
|
||||||
templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(name)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 772, Col: 38}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 642, Col: 38}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -2027,7 +1897,7 @@ func ConnectedAppRow(initials string, bg string, name string, domain string, bad
|
|||||||
var templ_7745c5c3_Var89 string
|
var templ_7745c5c3_Var89 string
|
||||||
templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(badge)
|
templ_7745c5c3_Var89, templ_7745c5c3_Err = templ.JoinStringErrs(badge)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 774, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 644, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -2045,7 +1915,7 @@ func ConnectedAppRow(initials string, bg string, name string, domain string, bad
|
|||||||
var templ_7745c5c3_Var90 string
|
var templ_7745c5c3_Var90 string
|
||||||
templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(domain)
|
templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(domain)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 777, Col: 84}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/dashboard.templ`, Line: 647, Col: 84}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
package views
|
package views
|
||||||
|
|
||||||
import "nebula/layouts"
|
import (
|
||||||
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
type LoginState struct {
|
templ LoginPage(state models.LoginState) {
|
||||||
Step string
|
|
||||||
Method string
|
|
||||||
Error string
|
|
||||||
}
|
|
||||||
|
|
||||||
templ LoginPage(state LoginState) {
|
|
||||||
@layouts.CenteredCard("Sign In - Sonr") {
|
@layouts.CenteredCard("Sign In - Sonr") {
|
||||||
<div id="step-content" class="step-content">
|
<div id="step-content" class="step-content">
|
||||||
@LoginStepContent(state)
|
@LoginStepContent(state)
|
||||||
@@ -22,7 +19,7 @@ templ LoginPage(state LoginState) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ LoginStepContent(state LoginState) {
|
templ LoginStepContent(state models.LoginState) {
|
||||||
switch state.Step {
|
switch state.Step {
|
||||||
case "qr":
|
case "qr":
|
||||||
@LoginQRStep()
|
@LoginQRStep()
|
||||||
@@ -35,7 +32,7 @@ templ LoginStepContent(state LoginState) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templ LoginStepWithOOB(state LoginState) {
|
templ LoginStepWithOOB(state models.LoginState) {
|
||||||
@LoginStepContent(state)
|
@LoginStepContent(state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,12 @@ package views
|
|||||||
import "github.com/a-h/templ"
|
import "github.com/a-h/templ"
|
||||||
import templruntime "github.com/a-h/templ/runtime"
|
import templruntime "github.com/a-h/templ/runtime"
|
||||||
|
|
||||||
import "nebula/layouts"
|
import (
|
||||||
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
|
)
|
||||||
|
|
||||||
type LoginState struct {
|
func LoginPage(state models.LoginState) templ.Component {
|
||||||
Step string
|
|
||||||
Method string
|
|
||||||
Error string
|
|
||||||
}
|
|
||||||
|
|
||||||
func LoginPage(state LoginState) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -79,7 +76,7 @@ func LoginPage(state LoginState) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoginStepContent(state LoginState) templ.Component {
|
func LoginStepContent(state models.LoginState) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -126,7 +123,7 @@ func LoginStepContent(state LoginState) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoginStepWithOOB(state LoginState) templ.Component {
|
func LoginStepWithOOB(state models.LoginState) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -254,7 +251,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(method)
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(method)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 88, Col: 22}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 85, Col: 22}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -267,7 +264,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var10 string
|
var templ_7745c5c3_Var10 string
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("method-" + method)
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("method-" + method)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 89, Col: 25}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 86, Col: 25}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -280,7 +277,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var11 string
|
var templ_7745c5c3_Var11 string
|
||||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(icon)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 91, Col: 39}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 88, Col: 39}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -293,7 +290,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var12 string
|
var templ_7745c5c3_Var12 string
|
||||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 93, Col: 33}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 90, Col: 33}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -306,7 +303,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var13 string
|
var templ_7745c5c3_Var13 string
|
||||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(description)
|
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(description)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 94, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 91, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -324,7 +321,7 @@ func AuthMethodCard(method string, icon string, title string, description string
|
|||||||
var templ_7745c5c3_Var14 string
|
var templ_7745c5c3_Var14 string
|
||||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(method + "-spinner")
|
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(method + "-spinner")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 97, Col: 79}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/login.templ`, Line: 94, Col: 79}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package views
|
|||||||
import (
|
import (
|
||||||
"nebula/components"
|
"nebula/components"
|
||||||
"nebula/layouts"
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var registerSteps = []string{"Detect", "Register", "Complete"}
|
var registerSteps = []string{"Detect", "Register", "Complete"}
|
||||||
@@ -14,23 +15,7 @@ func boolStr(b bool) string {
|
|||||||
return "false"
|
return "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeviceCapabilities holds the WebAuthn capability detection results
|
templ RegisterPage(state models.RegisterState) {
|
||||||
type DeviceCapabilities struct {
|
|
||||||
Platform bool // Biometrics (Face ID, Touch ID, Windows Hello)
|
|
||||||
CrossPlatform bool // Security keys (YubiKey, etc.)
|
|
||||||
Conditional bool // Passkey autofill support
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegisterState holds the current registration state
|
|
||||||
type RegisterState struct {
|
|
||||||
Step int
|
|
||||||
Method string // "passkey", "security-key", or "qr-code"
|
|
||||||
Username string
|
|
||||||
Error string
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegisterPage renders the full registration page with the specified step
|
|
||||||
templ RegisterPage(state RegisterState) {
|
|
||||||
@layouts.CenteredCard("Register - Sonr") {
|
@layouts.CenteredCard("Register - Sonr") {
|
||||||
<div slot="header" id="stepper-container" hx-swap-oob:inherited="true">
|
<div slot="header" id="stepper-container" hx-swap-oob:inherited="true">
|
||||||
@components.OnboardingStepper(state.Step, registerSteps)
|
@components.OnboardingStepper(state.Step, registerSteps)
|
||||||
@@ -47,8 +32,7 @@ templ RegisterPage(state RegisterState) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterStepContent renders the content for a specific step (used for HTMX partials)
|
templ RegisterStepContent(state models.RegisterState) {
|
||||||
templ RegisterStepContent(state RegisterState) {
|
|
||||||
switch state.Step {
|
switch state.Step {
|
||||||
case 1:
|
case 1:
|
||||||
@RegisterStep1()
|
@RegisterStep1()
|
||||||
@@ -68,8 +52,7 @@ templ RegisterStepContent(state RegisterState) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterStepWithStepper renders step content with OOB stepper update for HTMX 4
|
templ RegisterStepWithStepper(state models.RegisterState) {
|
||||||
templ RegisterStepWithStepper(state RegisterState) {
|
|
||||||
@RegisterStepContent(state)
|
@RegisterStepContent(state)
|
||||||
<div id="stepper-container" hx-swap-oob="innerHTML">
|
<div id="stepper-container" hx-swap-oob="innerHTML">
|
||||||
@components.OnboardingStepper(state.Step, registerSteps)
|
@components.OnboardingStepper(state.Step, registerSteps)
|
||||||
@@ -150,14 +133,14 @@ templ CapabilityItem(id string, icon string, label string, supported bool, loadi
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ CapabilitiesResult(caps DeviceCapabilities) {
|
templ CapabilitiesResult(caps models.DeviceCapabilities) {
|
||||||
@CapabilityItem("cap-platform", "fingerprint", "Face or Fingerprint", caps.Platform, false)
|
@CapabilityItem("cap-platform", "fingerprint", "Face or Fingerprint", caps.Platform, false)
|
||||||
@CapabilityItem("cap-cross-platform", "key", "Hardware Security Key", caps.CrossPlatform, false)
|
@CapabilityItem("cap-cross-platform", "key", "Hardware Security Key", caps.CrossPlatform, false)
|
||||||
@CapabilityItem("cap-conditional", "bolt", "Quick Sign-in", caps.Conditional, false)
|
@CapabilityItem("cap-conditional", "bolt", "Quick Sign-in", caps.Conditional, false)
|
||||||
@capabilitiesScript(caps)
|
@capabilitiesScript(caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
templ capabilitiesScript(caps DeviceCapabilities) {
|
templ capabilitiesScript(caps models.DeviceCapabilities) {
|
||||||
<div
|
<div
|
||||||
id="caps-data"
|
id="caps-data"
|
||||||
data-platform={ boolStr(caps.Platform) }
|
data-platform={ boolStr(caps.Platform) }
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import templruntime "github.com/a-h/templ/runtime"
|
|||||||
import (
|
import (
|
||||||
"nebula/components"
|
"nebula/components"
|
||||||
"nebula/layouts"
|
"nebula/layouts"
|
||||||
|
"nebula/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var registerSteps = []string{"Detect", "Register", "Complete"}
|
var registerSteps = []string{"Detect", "Register", "Complete"}
|
||||||
@@ -22,23 +23,7 @@ func boolStr(b bool) string {
|
|||||||
return "false"
|
return "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeviceCapabilities holds the WebAuthn capability detection results
|
func RegisterPage(state models.RegisterState) templ.Component {
|
||||||
type DeviceCapabilities struct {
|
|
||||||
Platform bool // Biometrics (Face ID, Touch ID, Windows Hello)
|
|
||||||
CrossPlatform bool // Security keys (YubiKey, etc.)
|
|
||||||
Conditional bool // Passkey autofill support
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegisterState holds the current registration state
|
|
||||||
type RegisterState struct {
|
|
||||||
Step int
|
|
||||||
Method string // "passkey", "security-key", or "qr-code"
|
|
||||||
Username string
|
|
||||||
Error string
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegisterPage renders the full registration page with the specified step
|
|
||||||
func RegisterPage(state RegisterState) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -109,8 +94,7 @@ func RegisterPage(state RegisterState) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterStepContent renders the content for a specific step (used for HTMX partials)
|
func RegisterStepContent(state models.RegisterState) templ.Component {
|
||||||
func RegisterStepContent(state RegisterState) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -170,8 +154,7 @@ func RegisterStepContent(state RegisterState) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterStepWithStepper renders step content with OOB stepper update for HTMX 4
|
func RegisterStepWithStepper(state models.RegisterState) templ.Component {
|
||||||
func RegisterStepWithStepper(state RegisterState) templ.Component {
|
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -313,7 +296,7 @@ func CapabilityItem(id string, icon string, label string, supported bool, loadin
|
|||||||
var templ_7745c5c3_Var9 string
|
var templ_7745c5c3_Var9 string
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(id)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 140, Col: 9}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 123, Col: 9}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -346,7 +329,7 @@ func CapabilityItem(id string, icon string, label string, supported bool, loadin
|
|||||||
var templ_7745c5c3_Var10 string
|
var templ_7745c5c3_Var10 string
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(label)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 149, Col: 15}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 132, Col: 15}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -360,7 +343,7 @@ func CapabilityItem(id string, icon string, label string, supported bool, loadin
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func CapabilitiesResult(caps DeviceCapabilities) templ.Component {
|
func CapabilitiesResult(caps models.DeviceCapabilities) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -401,7 +384,7 @@ func CapabilitiesResult(caps DeviceCapabilities) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func capabilitiesScript(caps DeviceCapabilities) templ.Component {
|
func capabilitiesScript(caps models.DeviceCapabilities) templ.Component {
|
||||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
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
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
@@ -429,7 +412,7 @@ func capabilitiesScript(caps DeviceCapabilities) templ.Component {
|
|||||||
var templ_7745c5c3_Var13 string
|
var templ_7745c5c3_Var13 string
|
||||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.Platform))
|
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.Platform))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 163, Col: 40}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 146, Col: 40}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -442,7 +425,7 @@ func capabilitiesScript(caps DeviceCapabilities) templ.Component {
|
|||||||
var templ_7745c5c3_Var14 string
|
var templ_7745c5c3_Var14 string
|
||||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.CrossPlatform))
|
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.CrossPlatform))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 164, Col: 51}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 147, Col: 51}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -455,7 +438,7 @@ func capabilitiesScript(caps DeviceCapabilities) templ.Component {
|
|||||||
var templ_7745c5c3_Var15 string
|
var templ_7745c5c3_Var15 string
|
||||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.Conditional))
|
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(boolStr(caps.Conditional))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 165, Col: 46}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/register.templ`, Line: 148, Col: 46}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user