feat(quicksearch): remap fill modes — left/Enter=password, right/Shift=full
Per user request, swap the quick-search click/key mapping so the common case (fill just the password) is the plain left-click / Enter: left click / Enter → password only (was: full user+Tab+pwd) right click / Shift+Enter → full user+pwd (was: username only) Ctrl+click / Ctrl+Enter → username only (was: password only) Keyboard mirrors the mouse. Copy-mode (tray/palette, no HWND target) shares the same `mode`, so it shifts too: click/Enter copies password, Ctrl+click/ Ctrl+Enter copies username (right-click's 'full' has no copy meaning → pwd). Updated the dynamic hint, the static index.html hint, and CLAUDE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -841,11 +841,13 @@ après chaque `DELETE /attachments/{id}`. Un petit vault sain ne paie rien.
|
||||
(`avatarColorFor(username)`). Upload downscale 128px JPEG via `FileReader`
|
||||
→ `data:` URI (PAS `blob:` — la CSP `img-src 'self' data:` bloque blob).
|
||||
Inclus dans l'export JSON (`avatar_b64`), restauré à l'import si absent.
|
||||
- **Quick search — modes fill** (Ctrl+Shift+Q) : Enter/clic-gauche = full
|
||||
(user + Tab + pwd), Shift+Enter/clic-droit = username seul, Ctrl+Enter/
|
||||
Ctrl+clic = password seul. `Bridge.executeAutofill(u, p, hide, 'user')`
|
||||
- **Quick search — modes fill** (Ctrl+Shift+Q) : Enter/clic-gauche =
|
||||
password seul, Shift+Enter/clic-droit = full (user + Tab + pwd), Ctrl+Enter/
|
||||
Ctrl+clic = username seul. `Bridge.executeAutofill(u, p, hide, 'user')`
|
||||
→ `field=user` → `ExecuteAutofill(..., AUsernameOnly=True)`. En copy-mode
|
||||
(tray/palette, pas de HWND cible) : clic = copy pwd, clic-droit = copy user.
|
||||
(tray/palette, pas de HWND cible) le même `mode` pilote la copie : clic/Enter
|
||||
= copy pwd, Ctrl+clic/Ctrl+Enter = copy user (`full` n'a pas de sens en copie
|
||||
→ retombe sur pwd).
|
||||
Fix clipboard : `MinimizeToTray(AClearClipboard=False)` via `keepclip=1`
|
||||
pour ne pas effacer le pwd juste copié quand on re-minimise.
|
||||
- **Custom fields combobox éditable** : les champs avec `options` (card
|
||||
|
||||
+1
-2
@@ -1067,8 +1067,7 @@
|
||||
</div>
|
||||
<div class="quick-search-results" id="quickSearchResults"></div>
|
||||
<div class="quick-search-hint">
|
||||
Enter = copy password · Shift+Enter = copy username ·
|
||||
click = copy password · Esc = close
|
||||
Enter / click = copy password · Ctrl+Enter / Ctrl+click = copy username · Esc = close
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -801,16 +801,16 @@ function quickSearchRender() {
|
||||
main.appendChild(el('div', { class: 'quick-search-sub' }, e.username));
|
||||
row.appendChild(avatar);
|
||||
row.appendChild(main);
|
||||
// Left click → full (user + Tab + password); Ctrl+click → password
|
||||
// only (step-2 forms / unlock screens).
|
||||
// Left click → password only; Ctrl+click → username only
|
||||
// (step-2 forms / unlock screens).
|
||||
row.addEventListener('click', ev =>
|
||||
quickSearchPickEntry(e, (ev.ctrlKey || ev.metaKey) ? 'pwd' : 'full'));
|
||||
// Right click → username only. preventDefault + stopPropagation so
|
||||
// the custom context menu (installCustomContextMenu) doesn't pop.
|
||||
quickSearchPickEntry(e, (ev.ctrlKey || ev.metaKey) ? 'user' : 'pwd'));
|
||||
// Right click → full (user + Tab + password). preventDefault +
|
||||
// stopPropagation so the custom context menu doesn't pop.
|
||||
row.addEventListener('contextmenu', ev => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
quickSearchPickEntry(e, 'user');
|
||||
quickSearchPickEntry(e, 'full');
|
||||
});
|
||||
box.appendChild(row);
|
||||
});
|
||||
@@ -1073,8 +1073,8 @@ function openQuickSearchModal(hideAfter, forFill) {
|
||||
const hintEl = modal.querySelector('.quick-search-hint');
|
||||
if (hintEl) {
|
||||
hintEl.textContent = forFill
|
||||
? 'Enter = fill user+password · Shift+Enter = username · Ctrl+Enter = password · Esc = cancel'
|
||||
: 'Enter / click = copy password · Shift+Enter / right-click = copy username · Esc = close';
|
||||
? 'Enter / click = password · Shift+Enter / right-click = user+password · Ctrl+Enter / Ctrl+click = username · Esc = cancel'
|
||||
: 'Enter / click = copy password · Ctrl+Enter / Ctrl+click = copy username · Esc = close';
|
||||
}
|
||||
quickSearchRender();
|
||||
setTimeout(() => input.focus(), 50);
|
||||
@@ -9738,11 +9738,11 @@ async function init() {
|
||||
if (!sel) return;
|
||||
const id = parseInt(sel.dataset.id, 10);
|
||||
const entry = state.entries.find(x => x.id === id);
|
||||
// Shift+Enter → username, Ctrl+Enter → password only,
|
||||
// plain Enter → full (user + Tab + password).
|
||||
const mode = e.shiftKey ? 'user'
|
||||
: (e.ctrlKey || e.metaKey) ? 'pwd'
|
||||
: 'full';
|
||||
// Shift+Enter → full (user + Tab + password), Ctrl+Enter →
|
||||
// username only, plain Enter → password only.
|
||||
const mode = e.shiftKey ? 'full'
|
||||
: (e.ctrlKey || e.metaKey) ? 'user'
|
||||
: 'pwd';
|
||||
if (entry) quickSearchPickEntry(entry, mode);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user