portfolio-edit: rebuild form as compact inline strip
Replace the multi-row wizard-style form (Ticker / Qty on row 1, mode radios on row 2, Date+Cost on row 3) with a single horizontal strip that sits unobtrusively above the portfolio table. The radio toggle is gone; a small calendar icon next to the Cost input pops out a date picker that auto-fills cost on selection and then hides itself. Same input IDs, so the existing validate/Add/× handlers work unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
70da4cdf84
commit
a9b7d4d8bb
3 changed files with 95 additions and 98 deletions
|
|
@ -2336,79 +2336,93 @@ a.btn-secondary:hover { color: var(--accent); border-color: var(--accent); }
|
|||
#portfolio-panel.pf-editing .pf-row-del { display: inline; }
|
||||
#portfolio-panel.pf-editing .pf-row-del:hover { color: var(--err, #f55); }
|
||||
|
||||
/* Add-position form. */
|
||||
/* Add-position form — compact inline strip that visually sits above the
|
||||
portfolio table rather than as a separate boxed form. */
|
||||
.pf-add-form {
|
||||
border: 1px solid var(--neu-dim, #333);
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
margin-bottom: 12px;
|
||||
background: var(--surface-2, #1a1a1a);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.pf-add-row {
|
||||
.pf-add-strip {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 8px;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.pf-add-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 1 140px;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
.pf-add-label {
|
||||
color: var(--neu-dim, #888);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.pf-add-field input[type="text"],
|
||||
.pf-add-field input[type="number"],
|
||||
.pf-add-field input[type="date"] {
|
||||
.pf-add-input {
|
||||
background: var(--surface, #111);
|
||||
border: 1px solid var(--neu-dim, #444);
|
||||
color: var(--text, #ccc);
|
||||
padding: 4px 6px;
|
||||
padding: 3px 6px;
|
||||
border-radius: 3px;
|
||||
font-family: inherit;
|
||||
font-size: 13px;
|
||||
}
|
||||
.pf-add-cost-mode { gap: 16px; }
|
||||
.pf-add-radio {
|
||||
display: inline-flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
min-width: 0;
|
||||
}
|
||||
.pf-add-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent, #5af);
|
||||
}
|
||||
.pf-add-input--ticker { width: 90px; text-transform: uppercase; }
|
||||
.pf-add-input--qty { width: 70px; }
|
||||
.pf-add-input--cost { width: 100px; }
|
||||
.pf-add-input--date { width: 130px; }
|
||||
|
||||
.pf-add-cost-wrap {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.pf-add-currency {
|
||||
color: var(--neu-dim, #888);
|
||||
font-size: 11px;
|
||||
margin-top: 2px;
|
||||
min-width: 28px;
|
||||
}
|
||||
.pf-add-icon-btn {
|
||||
background: transparent;
|
||||
border: 1px solid var(--neu-dim, #444);
|
||||
color: var(--neu-dim, #888);
|
||||
padding: 2px 4px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.pf-add-icon-btn:hover {
|
||||
color: var(--text, #ccc);
|
||||
border-color: var(--accent, #5af);
|
||||
}
|
||||
.pf-add-submit {
|
||||
background: var(--accent, #5af);
|
||||
color: var(--bg, #000);
|
||||
border: none;
|
||||
padding: 6px 14px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
align-self: flex-end;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.pf-add-submit:disabled {
|
||||
background: var(--neu-dim, #444);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.pf-add-status {
|
||||
font-size: 11px;
|
||||
margin-top: 2px;
|
||||
.pf-add-meta {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-top: 3px;
|
||||
min-height: 14px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.pf-add-status:empty { display: none; }
|
||||
.pf-add-status--pending { color: var(--neu-dim, #888); }
|
||||
.pf-add-status--ok { color: var(--ok, #6c6); }
|
||||
.pf-add-status--err { color: var(--err, #f55); }
|
||||
.pf-add-warning {
|
||||
color: var(--warn, #fb3);
|
||||
font-size: 11px;
|
||||
margin-top: 8px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue