diff --git a/api/assets/style.css b/api/assets/style.css index 61c79eb..bce9cff 100644 --- a/api/assets/style.css +++ b/api/assets/style.css @@ -58,6 +58,10 @@ font-family: Inter; } +a { + all: unset; +} + body { text-transform: uppercase; margin: 0; @@ -106,6 +110,7 @@ body.dark { width: 50%; max-height: 18px; margin-bottom: 12px; + cursor: pointer; } #live { @@ -1030,6 +1035,10 @@ body.dark .tx-id-block-copy svg path { min-width: 0px; } + .tr>.end { + display: none; + } + .tx-id-block-value { margin-bottom: 10px; } diff --git a/api/templates/index.templ b/api/templates/index.templ index 8883224..7fc2bf8 100644 --- a/api/templates/index.templ +++ b/api/templates/index.templ @@ -99,8 +99,8 @@ templ Table(events []model.Event, query url.Values) { } templ Row(e model.Event) { -
-
+ } @@ -245,7 +245,7 @@ templ head() { templ header() { ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -792,7 +808,7 @@ func header() templ.Component { templ_7745c5c3_Var37 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Gevulot
Live
Light
Dark
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Gevulot
Live
Light
Dark
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -872,3 +888,13 @@ func formatDuration(d time.Duration) string { second := int(d.Seconds()) % 60 return fmt.Sprintf("%02dH:%02dM:%02dS", hour, minute, second) } + +func txLinkAttrs(txID string) templ.Attributes { + return templ.Attributes{ + "href": "/tx/" + txID, + "hx-trigger": "click", + "hx-get": "/tx/" + txID, + "hx-swap": "outerHTML", + "hx-target": "#table", + } +} diff --git a/integrationtests/integration_test.go b/integrationtests/integration_test.go index 1b3ca6b..111de70 100644 --- a/integrationtests/integration_test.go +++ b/integrationtests/integration_test.go @@ -74,7 +74,7 @@ func receiveFirstEvent(t *testing.T) { select { case e := <-events: - expected := `
State
Transaction ID
0
Prover ID
5678
Time
03:04 PM, 02/01/06
` + expected := `` require.Equal(t, expected, string(e.Data)) case <-time.After(time.Second * 5): t.Fatal("timeout") @@ -103,8 +103,8 @@ func receiveEventsFromBuffer(t *testing.T) { for i := 0; i < expectedEvents; i++ { select { case e := <-events: - expected := `
State
Transaction ID
%d
Prover ID
5678
Time
03:04 PM, 02/01/06
` - assert.Equal(t, fmt.Sprintf(expected, i, i, i, i), string(e.Data)) + expected := `` + assert.Equal(t, fmt.Sprintf(expected, i, i, i, i, i, i, i, i, i), string(e.Data)) case <-time.After(time.Second * 5): t.Fatal("timeout") }