From ea5a59ebd8cee3446c71d86cb433627a779f2a4c Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Thu, 25 Jun 2026 10:23:13 +0200 Subject: [PATCH 1/2] feat: brighter ETSI buttons, copy-to-clipboard, ISO date picker - Brighten the per-message 103707/103120 buttons (solid accent border + fill) so they stand out in the record card. - Add a copy button to the XML panel that copies the pretty-printed XML to the clipboard (with a brief "copied" confirmation). - Set lang="sv-SE" on the history datetime-local input so Chrome renders it as yyyy-mm-dd instead of the en-US mm/dd/yyyy. --- priv/assets/css/ldf.css | 10 ++++++++-- src/controllers/ldf_www_controller.erl | 3 ++- src/views/history.dtl | 2 +- src/views/message_row.dtl | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/priv/assets/css/ldf.css b/priv/assets/css/ldf.css index af9c7ea..6cb7954 100644 --- a/priv/assets/css/ldf.css +++ b/priv/assets/css/ldf.css @@ -154,12 +154,18 @@ tbody tr.new { animation: flashin .7s ease-out; } /* per-message ETSI conversion */ .rec-etsi { display: flex; gap: 8px; margin-top: 10px; } -.etsi-btn { padding: 5px 11px; font-size: 10.5px; letter-spacing: .08em; } +.etsi-btn { + font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; + padding: 6px 12px; border-radius: 4px; cursor: pointer; transition: background .15s, box-shadow .15s; + border: 1px solid var(--live); background: rgba(46,230,166,.16); color: var(--live); +} +.etsi-btn:hover { background: rgba(46,230,166,.28); box-shadow: 0 0 0 3px rgba(46,230,166,.1); } .etsi:empty { display: none; } .etsi-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; } .etsi-label { color: var(--live); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; } .etsi-label.etsi-err { color: var(--danger); } -.etsi-hide { margin-left: auto; padding: 4px 10px; font-size: 10.5px; } +.etsi-copy { margin-left: auto; padding: 4px 11px; } +.etsi-hide { padding: 4px 10px; font-size: 10.5px; } .etsi-pre { margin: 8px 0 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; max-height: 360px; overflow: auto; font-size: 11.5px; line-height: 1.45; white-space: pre; } .etsi-pre code { color: var(--text); } diff --git a/src/controllers/ldf_www_controller.erl b/src/controllers/ldf_www_controller.erl index 4d5aac7..d86ccf2 100644 --- a/src/controllers/ldf_www_controller.erl +++ b/src/controllers/ldf_www_controller.erl @@ -197,7 +197,8 @@ etsi_block(Format, MessageId, EscapedXml) -> iolist_to_binary([ ~"
ETSI ", Format, - ~"", + ~"
",
         EscapedXml,
diff --git a/src/views/history.dtl b/src/views/history.dtl
index f486f74..2ab3280 100644
--- a/src/views/history.dtl
+++ b/src/views/history.dtl
@@ -13,7 +13,7 @@
       
     
     
- +

Replays messages from this point in time onward (UTC).

diff --git a/src/views/message_row.dtl b/src/views/message_row.dtl index abd6a9e..463ebff 100644 --- a/src/views/message_row.dtl +++ b/src/views/message_row.dtl @@ -1 +1 @@ -
{% if email %}{{ email }}{% endif %}{% if phone %}{{ phone }}{% endif %}{% if not email %}{% if not phone %}unidentified{% endif %}{% endif %}{{ time }}
{% if link %}{{ link }}{% else %}{{ text }}{% endif %}
type{{ type }}{% if action %} / {{ action }}{% endif %}msg{{ id }}chat{{ chat }}sender{{ sender }}to{{ recipient }}{% if agent %}agent{{ agent }}{% endif %}
{% if full_id %}
{% endif %}
+
{% if email %}{{ email }}{% endif %}{% if phone %}{{ phone }}{% endif %}{% if not email %}{% if not phone %}unidentified{% endif %}{% endif %}{{ time }}
{% if link %}{{ link }}{% else %}{{ text }}{% endif %}
type{{ type }}{% if action %} / {{ action }}{% endif %}msg{{ id }}chat{{ chat }}sender{{ sender }}to{{ recipient }}{% if agent %}agent{{ agent }}{% endif %}
{% if full_id %}
{% endif %}
From 08a0909beca16ee7ce47f30e2741ce18c650942a Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Thu, 25 Jun 2026 10:27:51 +0200 Subject: [PATCH 2/2] fix: wrap long etsi copy-button line; add enter-to-submit - Split the copy-button binary across iolist elements so it respects the elvis line_length limit (was 239 chars on one line). - Listener and history target inputs now submit on Enter, same as the button (data-on:keydown). --- src/controllers/ldf_www_controller.erl | 4 +++- src/views/admin.dtl | 2 +- src/views/history.dtl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/controllers/ldf_www_controller.erl b/src/controllers/ldf_www_controller.erl index d86ccf2..949711a 100644 --- a/src/controllers/ldf_www_controller.erl +++ b/src/controllers/ldf_www_controller.erl @@ -197,7 +197,9 @@ etsi_block(Format, MessageId, EscapedXml) -> iolist_to_binary([ ~"
ETSI ", Format, - ~"", + ~"", ~"
",
diff --git a/src/views/admin.dtl b/src/views/admin.dtl
index d2b040b..8a94605 100644
--- a/src/views/admin.dtl
+++ b/src/views/admin.dtl
@@ -10,7 +10,7 @@
     
- +
diff --git a/src/views/history.dtl b/src/views/history.dtl index 2ab3280..0d8c63a 100644 --- a/src/views/history.dtl +++ b/src/views/history.dtl @@ -10,7 +10,7 @@
- +