From ab1da7e319ecb2de022f9e17e3ec349968769271 Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Fri, 18 Sep 2026 15:22:14 +0100 Subject: [PATCH] feat(autofill): etiquette no-autofill pour exclure une entree, copie du mot de passe toujours visible en vue tableau Co-Authored-By: Claude Opus 5 --- css/style.css | 1 + js/app.autofill.js | 13 ++++++++++--- js/app.js | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/css/style.css b/css/style.css index 168ee02..7e81366 100644 --- a/css/style.css +++ b/css/style.css @@ -2885,6 +2885,7 @@ body[data-editor-position="center"]:has(#settingsPanel.is-open)::before { .col-actions { width: 100%; min-width: 80px; text-align: right; white-space: nowrap; } .col-actions .icon-btn { opacity: 0; transition: opacity var(--t-fast); } .entry-row:hover .col-actions .icon-btn { opacity: 0.7; } +.col-actions .icon-btn.is-always { opacity: 0.7; } .col-actions .entry-kebab-wrap { display: inline-block; vertical-align: middle; } /* Hide Edge/IE native password reveal eye (we ship our own toggle). */ diff --git a/js/app.autofill.js b/js/app.autofill.js index c9e5da4..1b144fe 100644 --- a/js/app.autofill.js +++ b/js/app.autofill.js @@ -147,6 +147,8 @@ function autofillPushHotkeys(silent) { const BROWSER_SUFFIX_RE = /\s*[-—–|]\s*(google chrome|chromium|mozilla firefox|firefox|microsoft edge|edge|brave|opera|vivaldi|safari|tor browser|tor|arc)\s*$/i; +const AUTOFILL_SKIP_TAG = 'no-autofill'; + function autofillStripBrowserSuffix(title) { return (title || '').replace(BROWSER_SUFFIX_RE, '').trim(); } @@ -274,9 +276,14 @@ async function autofillHandleRequest(windowTitle, kind) { // The 2FA hotkey can only serve entries that actually carry a TOTP secret // — filtering here (not after scoring) also means the picker never lists a // candidate that would fail once chosen. - const pool = (kind === 'totp') - ? state.entries.filter(e => e.totp_secret && e.totp_iv) - : state.entries; + // EXCLUE DE L'AUTOFILL par l'etiquette reservee AUTOFILL_SKIP_TAG : une + // etiquette et non un champ, car elle voyage deja partout (chiffree, synchro, + // export, rotation) sans une colonne de plus, et un clic dessus liste toutes + // les entrees exclues. La recherche rapide (Ctrl+Shift+Q) les garde : c'est + // un choix explicite, pas une correspondance devinee sur un titre. + const pool = state.entries + .filter(e => !parseTags(e.tags).some(t => t.toLowerCase() === AUTOFILL_SKIP_TAG)) + .filter(e => kind !== 'totp' || (e.totp_secret && e.totp_iv)); const scored = pool .map(e => ({ entry: e, score: autofillScore(e, titleLower) })) .filter(x => x.score > 0) diff --git a/js/app.js b/js/app.js index 866748a..bebc6e7 100644 --- a/js/app.js +++ b/js/app.js @@ -3606,8 +3606,10 @@ function renderTableRow(e) { break; case 'actions': { td = el('td', { class: 'col-actions' }); + // TOUJOURS VISIBLE, contrairement aux autres actions de la + // ligne : c'est le geste le plus frequent de la vue tableau. const pwBtn = el('button', { - class: 'icon-btn icon-btn-sm', + class: 'icon-btn icon-btn-sm is-always', title: e.kind === 'note' ? 'Copy note content' : 'Copy password', on: { click: ev => { ev.stopPropagation(); copyPassword(e); } }, });