Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update TOTP editor init logic, update cargo lock (#1465)
Leendert de Borst9f2e6a0ab71b
diff --git a/apps/browser-extension/src/entrypoints/popup/components/Credentials/Details/TotpEditor.tsx b/apps/browser-extension/src/entrypoints/popup/components/Credentials/Details/TotpEditor.tsxindex d0cb19d0f..c841403b0 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Credentials/Details/TotpEditor.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Credentials/Details/TotpEditor.tsx@@ -211,15 +211,18 @@ const TotpEditor: React.FC<TotpEditorProps> = ({<h4 className="text-lg font-medium text-gray-900 dark:text-white">{t('totp.addCode')}</h4>- <button- type="button"- onClick={hideAddForm}- className="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"- >- <svg className="w-3 h-3" fill="none" viewBox="0 0 14 14">- <path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>- </svg>- </button>+ {/* Only show close button if there are existing TOTP codes */}+ {hasActiveTotpCodes && (+ <button+ type="button"+ onClick={hideAddForm}+ className="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"+ >+ <svg className="w-3 h-3" fill="none" viewBox="0 0 14 14">+ <path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>+ </svg>+ </button>+ )}</div><p className="mb-4 text-sm text-gray-500 dark:text-gray-400">diff --git a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemAddEdit.tsx b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemAddEdit.tsxindex f41a541cb..23571b755 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemAddEdit.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemAddEdit.tsx@@ -842,9 +842,15 @@ const ItemAddEdit: React.FC = () => {/*** Handle adding 2FA section.+ * Also opens the TOTP add form directly since the user's intent is to add a code.*/const handleAdd2FA = useCallback((): void => {setShow2FA(true);+ // Auto-open the add form since user intends to add a TOTP code+ setTotpEditorState({+ isAddFormVisible: true,+ formData: { name: '', secretKey: '' }+ });}, []);/**diff --git a/core/rust/Cargo.lock b/core/rust/Cargo.lockindex 3ec0b765f..603964d76 100644--- a/core/rust/Cargo.lock+++ b/core/rust/Cargo.lock@@ -4,7 +4,7 @@ version = 4[[package]]name = "aliasvault-core"-version = "0.1.0"+version = "0.26.0"dependencies = ["argon2","chrono",