refactor(entries): drop the inline copy button, the row menu carries it

Row is down to label | value (eye inside) | menu.
This commit is contained in:
r-zakarya
2026-08-01 12:05:44 +01:00
parent e5758f984c
commit a8c1a88ec4
2 changed files with 7 additions and 10 deletions
+2 -2
View File
@@ -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;
}
+5 -8
View File
@@ -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;