From fc39a7df6c12baa69db098cbfb909efb9515e253 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 4 Jul 2026 18:06:54 +0000 Subject: [PATCH] Fix: copy button was storing literal template string HEEX doesn't interpolate {} inside quoted attribute values. Use data-token attribute + .dataset.token instead. --- flake.lock | 27 +++++++++++++++++++ .../setting_html/setting_form.html.heex | 8 +++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3e70b10 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1782959384, + "narHash": "sha256-xnJJk+ct+D2+wdRxj1wk36w5zV9RVESwRqcklPdt3fM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "65179426c83bb3f6bc14898b42ea1c6f01d374b0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex index 0285864..0c94257 100644 --- a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex +++ b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex @@ -38,10 +38,11 @@
<%= if Settings.get!(:api_token) do %> + <% token = Settings.get!(:api_token) %>
- {String.slice(Settings.get!(:api_token), 0, 12)}•••••••• - {Settings.get!(:api_token)} + {String.slice(token, 0, 12)}•••••••• + {token}