Skip to content

Commit 48a47fd

Browse files
committed
Make req and resp sections more obvious on headers view
1 parent 2b2f2e7 commit 48a47fd

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

assets/css/05_headers.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#headers-view h2 {
2+
font-size: var(--fsize-xxl);
3+
color: var(--fg-2);
4+
}
5+
16
.hdr-legend {
27
display: flex;
38
flex-direction: column;
@@ -55,8 +60,16 @@ div.hdr-table {
5560
font-size: var(--fsize-normal);
5661
font-weight: bold;
5762
padding: 8px 0 8px 0;
58-
border-bottom: 1px solid var(--mild);
63+
}
64+
65+
& div.hdr-tx-req {
5966
color: var(--mild);
67+
border-bottom: 1px solid var(--mild);
68+
}
69+
70+
& div.hdr-tx-resp {
71+
color: var(--calm);
72+
border-bottom: 1px solid var(--calm);
6073
}
6174

6275
& div.hdr-title {

render/headers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func headersView(ts vsl.TransactionSet, tx *vsl.Transaction, visited map[vsl.VXI
2727
switch record := r.(type) {
2828
case vsl.BeginRecord:
2929
if tx.TXType != vsl.TxTypeSession {
30-
lines = append(lines, fmt.Sprintf(`<div class="hdr-tx">Request of %s</div>`, tx.TXID))
30+
lines = append(lines, fmt.Sprintf(`<div class="hdr-tx hdr-tx-req">Request of %s</div>`, tx.TXID))
3131
lines = append(lines, renderHeaders(tx.ReqHeaders)...)
3232
}
3333

@@ -39,7 +39,7 @@ func headersView(ts vsl.TransactionSet, tx *vsl.Transaction, visited map[vsl.VXI
3939

4040
case vsl.EndRecord:
4141
if tx.TXType != vsl.TxTypeSession {
42-
lines = append(lines, fmt.Sprintf(`<div class="hdr-tx">Response of %s</div>`, tx.TXID))
42+
lines = append(lines, fmt.Sprintf(`<div class="hdr-tx hdr-tx-resp">Response of %s</div>`, tx.TXID))
4343
lines = append(lines, renderHeaders(tx.RespHeaders)...)
4444
}
4545
}

0 commit comments

Comments
 (0)