refactor: remove the dead legacy entry modal
openEntryModal had zero callers — the slideover editor replaced it — but the whole cluster still shipped: the #entryModal markup, saveEntry (wired to the form submit), closeEntryModal, populateFolderSelect, updateEntryStrength, and the entire tag-chip subsystem (editingTags, renderChips, addTag, the suggest dropdown) plus their init wirings and the Esc-chain branch. saveEntry was a latent hazard: still bound to #entryForm submit, it did a PARTIAL PUT (no kind / totp_secret / custom_fields / template) — the exact silent-data-loss bug moveEntryToFolder documents. Unreachable today, but one stray call away from wiping fields. Removed JS + HTML + the orphaned .chip-suggestion CSS. The generator is shared with the slideover — kept; its dead 'entry' target branch collapsed to slideover-only. 322 lines gone, tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
-54
@@ -1013,60 +1013,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- MODAL: New / Edit Entry -->
|
||||
<!-- ============================================================ -->
|
||||
<div id="entryModal" class="modal is-hidden" role="dialog" aria-modal="true">
|
||||
<div class="modal-backdrop" data-close></div>
|
||||
<div class="modal-panel">
|
||||
<header class="modal-header">
|
||||
<h3 id="entryModalTitle">New entry</h3>
|
||||
<button class="icon-btn" data-close><svg><use href="#i-x"/></svg></button>
|
||||
</header>
|
||||
<form id="entryForm" class="modal-body" autocomplete="off">
|
||||
<input type="hidden" id="entryId">
|
||||
<label class="field">
|
||||
<span>Display name <small style="color:var(--text-faint);font-weight:400">— shown on cards, also used for autofill matching</small></span>
|
||||
<input id="entryTitle" type="text" placeholder="GitHub (work account)">
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Website / App <small style="color:var(--text-faint);font-weight:400">— hostname or brand, used for autofill matching</small></span>
|
||||
<input id="entrySite" type="text" required placeholder="github.com">
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Username / Email</span>
|
||||
<input id="entryUsername" type="text" placeholder="me@example.com">
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Password</span>
|
||||
<div class="input-with-action">
|
||||
<input id="entryPassword" type="password" required placeholder="••••••••">
|
||||
<button type="button" class="icon-btn" id="entryPwToggle"><svg><use href="#i-eye"/></svg></button>
|
||||
<button type="button" class="icon-btn" id="entryPwGen" title="Generate"><svg><use href="#i-dice"/></svg></button>
|
||||
</div>
|
||||
<div class="strength-bar" id="entryStrengthBar"></div>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Folder</span>
|
||||
<select id="entryFolder"></select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>Tags <span class="hint">enter to add</span></span>
|
||||
<div class="chip-input" id="entryTagsInput">
|
||||
<input id="entryTagsField" type="text" placeholder="add a tag…" autocomplete="off">
|
||||
</div>
|
||||
<input type="hidden" id="entryTags">
|
||||
</label>
|
||||
</form>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-ghost" data-close>Cancel</button>
|
||||
<button class="btn btn-primary" id="entrySaveBtn">
|
||||
<svg><use href="#i-check"/></svg> Save
|
||||
</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- MODAL: Password Generator -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
Reference in New Issue
Block a user