feat(entries): add Copy value to the custom-field row menu
The inline copy button stays: copy is the frequent action and burying it costs a click every time. Unlike the old lock-versus-eye pair, two ways to copy are not confusable.
This commit is contained in:
@@ -4318,6 +4318,14 @@ function buildCustomFieldRow(field, idx, rerender) {
|
||||
kebabMenu.classList.toggle('is-open');
|
||||
});
|
||||
|
||||
const copyItem = el('button', { class: 'kebab-item', type: 'button' }, 'Copy value');
|
||||
copyItem.addEventListener('click', ev => {
|
||||
ev.stopPropagation();
|
||||
kebabMenu.classList.remove('is-open');
|
||||
copyBtn.click();
|
||||
});
|
||||
kebabMenu.appendChild(copyItem);
|
||||
|
||||
const secretItem = el('button', { class: 'kebab-item', type: 'button' });
|
||||
const paintSecretItem = () => {
|
||||
secretItem.textContent = field.is_secret ? 'Make public' : 'Store as secret';
|
||||
|
||||
Reference in New Issue
Block a user