9918ef3154ed
revert email to conditional +add inside username edit mode (v2.33.1)
- time
- 2026-05-07 00:24 UTC · 5 months ago
- machine
- koh2
- parent
- 617375e08945
↓ peach-browser-9918ef31.tar.gzatlas at this save
files changed1 file
src/popup/views/Entry.tsx+1 −57src/popup/views/Entry.tsx+1 −57
@@ -10,7 +10,7 @@1010 import { GeneratorDrawer } from "../components/GeneratorDrawer";1111 import { NoteEditorInline, Toolbar } from "./NoteEditor";1212 13-type EditableField = "title" | "url" | "username" | "email" | "password" | "notes" | "totp" | null;13+type EditableField = "title" | "url" | "username" | "password" | "notes" | "totp" | null;1414 1515 interface EntryProps {1616 entry: VaultEntry | null;@@ -269,8 +269,6 @@269269 return entry.url ?? "";270270 case "username":271271 return entry.username ?? "";272- case "email":273- return entry.email ?? "";274272 case "password":275273 return entry.password ?? "";276274 case "notes":@@ -820,60 +818,6 @@820818 onClick={() => startEdit("email", "")}821819 >822820 + add email823- </button>824- </Show>825- </div>826- </Show>827- </div>828- </Show>829-830- {/* Email — shown when set, or when actively being added */}831- <Show when={entry().email || editingField() === "email"}>832- <div class="peach-field-card" classList={{ "is-editing": editingField() === "email" }}>833- <span class="peach-label">email</span>834- <Show835- when={editingField() === "email"}836- fallback={837- <div class="peach-field-value-row">838- <span839- class="peach-field-value peach-inline-clickable"840- title="Click to edit"841- onClick={() => startEdit("email", entry().email ?? "")}842- >843- {entry().email}844- </span>845- <button846- class={`peach-btn peach-btn--ghost peach-btn--sm peach-icon-btn peach-copy-btn ${copied() === "email" ? "is-copied" : ""}`}847- onClick={(e) => void copyField(entry().email!, "email", e.currentTarget as HTMLButtonElement)}848- aria-label="Copy email"849- >850- <CopyGlyph /><span class="peach-copy-sheen" />851- </button>852- </div>853- }854- >855- <div856- class="peach-inline-field-wrap"857- onFocusOut={(event) => handleEditorFocusOut("email", event)}858- >859- <input860- class="peach-inline-input"861- value={draft()}862- onInput={(e) => setDraft(e.currentTarget.value)}863- onKeyDown={onEditKeyDown}864- ref={autoFocus}865- disabled={saving()}866- autocomplete="email"867- />868- <InlineSaveCancelRow onSave={saveField} onCancel={cancelEdit} saving={saving()} />869- <Show when={!entry().username}>870- <button871- class="peach-add-field-btn"872- type="button"873- onMouseDown={(e) => e.preventDefault()}874- onClick={() => startEdit("username", "")}875- >876- + add username877821 </button>878822 </Show>879823 </div>