From a8c1a88ec4ebc2bcde90845e90013e6a984f3f7d Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Sat, 1 Aug 2026 12:05:44 +0100 Subject: [PATCH] refactor(entries): drop the inline copy button, the row menu carries it Row is down to label | value (eye inside) | menu. --- css/style.css | 4 ++-- js/app.js | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/css/style.css b/css/style.css index 9e1bcc7..3368aee 100644 --- a/css/style.css +++ b/css/style.css @@ -1592,9 +1592,9 @@ input[type="range"]::-webkit-slider-thumb { margin-top: 6px; } .so-custom-row { - /* label | value (eye inside) | copy | row menu */ + /* label | value (eye inside) | row menu */ display: grid; - grid-template-columns: 1fr 1.4fr auto auto; + grid-template-columns: 1fr 1.4fr auto; gap: 4px; align-items: center; } diff --git a/js/app.js b/js/app.js index a77647a..f0596d0 100644 --- a/js/app.js +++ b/js/app.js @@ -4291,17 +4291,15 @@ function buildCustomFieldRow(field, idx, rerender) { valueInput.type = field.is_secret ? 'password' : 'text'; } - const copyBtn = el('button', { class: 'icon-btn icon-btn-sm', type: 'button', - title: 'Copy value' }); - copyBtn.appendChild(icon('i-copy')); - copyBtn.addEventListener('click', ev => { - ev.stopPropagation(); + // Copying lives in the row menu only — no button of its own, the row is + // already carrying a label, a value and the reveal eye. + function copyValue() { const v = field.value || ''; if (!v) return; if (Bridge.active) Bridge.copySecure(v, 30000); else { try { navigator.clipboard.writeText(v); } catch (_) {} } toast('Copied' + clipClearSuffix()); - }); + } // Row menu — reuses the card kebab classes, so the document-level // "click outside .entry-kebab-wrap closes it" handler covers it for free. @@ -4322,7 +4320,7 @@ function buildCustomFieldRow(field, idx, rerender) { copyItem.addEventListener('click', ev => { ev.stopPropagation(); kebabMenu.classList.remove('is-open'); - copyBtn.click(); + copyValue(); }); kebabMenu.appendChild(copyItem); @@ -4367,7 +4365,6 @@ function buildCustomFieldRow(field, idx, rerender) { row.appendChild(labelInput); row.appendChild(valueWrap); - row.appendChild(copyBtn); row.appendChild(kebabWrap); applySecretState(); return row;