05/18 Enhanced codes and functionalities 12

This commit is contained in:
2026-05-18 22:05:01 -04:00
parent 6177b72ef8
commit ec1f1fe374
2 changed files with 78 additions and 12 deletions
+2 -1
View File
@@ -1273,6 +1273,7 @@ async function saveCredential(data) {
username: data.username || "",
password: data.password || "",
notes: "",
password_changed_at: new Date().toISOString(),
};
const name = $("save-name").value.trim() || data.siteName || "Untitled";
// Read selected folder — empty string means no folder (null).
@@ -1577,7 +1578,7 @@ async function addItemToVault() {
btn.textContent = "Saving…";
try {
const plain = { url, username, password, notes };
const plain = { url, username, password, notes, password_changed_at: new Date().toISOString() };
const { enc_data, iv } = await ExtCrypto.encryptItem(_vaultKey, plain);
const { enc_name, iv_name } = await ExtCrypto.encryptName(_vaultKey, name);
const res = await apiFetch("/api/vault", {