diff --git a/dist/index.html b/dist/index.html index 76f7aff..bb3c38a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -4840,7 +4840,7 @@ function generateId() { * @typedef {Object} CredentialEntry * @property {string} id - Unique identifier * @property {string} title - Display name (e.g. "GitHub", "Gmail") -* @property {string} username - Login username or email +* @property {string} [username] - Login username or email (optional) * @property {string} encryptedPassword - AES-GCM encrypted password blob (JSON string) * @property {string} [url] - Website URL * @property {string} [notes] - Free-form notes @@ -4854,7 +4854,7 @@ function generateId() { * * @param {Object} data * @param {string} data.title -* @param {string} data.username +* @param {string} [data.username] * @param {string} data.encryptedPassword - Must already be encrypted * @param {string} [data.url] * @param {string} [data.notes] @@ -4867,7 +4867,7 @@ function createEntry(data) { return { id: generateId(), title: data.title.trim(), - username: data.username.trim(), + username: data.username?.trim() || "", encryptedPassword: data.encryptedPassword, url: data.url?.trim() || "", notes: data.notes?.trim() || "", @@ -4888,7 +4888,7 @@ function updateEntry$1(existing, data) { return { ...existing, title: data.title !== void 0 ? data.title.trim() : existing.title, - username: data.username !== void 0 ? data.username.trim() : existing.username, + username: data.username !== void 0 ? data.username?.trim() || "" : existing.username, encryptedPassword: data.encryptedPassword !== void 0 ? data.encryptedPassword : existing.encryptedPassword, url: data.url !== void 0 ? data.url.trim() : existing.url, notes: data.notes !== void 0 ? data.notes.trim() : existing.notes, @@ -4940,7 +4940,6 @@ function createGroup(name, color) { function validateEntry(data) { const errors = []; if (!data.title || !data.title.trim()) errors.push("Title is required"); - if (!data.username || !data.username.trim()) errors.push("Username is required"); if (!data.encryptedPassword) errors.push("Password is required"); return { valid: errors.length === 0, @@ -6110,7 +6109,7 @@ function EntryList($$anchor, $$props) { reset(tr); template_effect(() => { set_text(text_6, get(entry).title); - set_text(text_7, get(entry).username); + set_text(text_7, get(entry).username || "—"); set_text(text_8, get(entry).url || "—"); }); delegated("click", tr, () => $$props.onSelect(get(entry).id)); @@ -6138,10 +6137,11 @@ var root_1$5 = /* @__PURE__ */ from_html(`