fix(ext/popup): auto-popout for attachment types, keep login/note in popup

- Login and secure_note types stay in popup without attachment UI
- All other types (identity, card, key, totp, document) auto-redirect
  to full tab when selected
- Attachments only shown for login/secure_note when opened in tab

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-27 01:42:35 -04:00
parent c59e6892d8
commit 446949c5ce
5 changed files with 62 additions and 45 deletions

View File

@@ -78,7 +78,11 @@ function renderTypeSelection(app: HTMLElement): void {
btn.addEventListener('click', () => {
const type = btn.dataset.type as ItemType;
setState({ newType: type });
renderItemForm(app, 'add');
if (type === 'login' || type === 'secure_note') {
renderItemForm(app, 'add');
} else {
popOutToTab();
}
});
});
}