feat: two-step staging upload + multi-page PDF person inheritance
- Add stage/process-staged/remove-staged endpoints for batch upload workflow - Add staging gallery UI with thumbnail previews and per-image removal - Inherit person info & doc fields from page 1 for multi-page PDFs - Auto-link page 2+ to same person on confirmation - Show info banner on review page for multi-page documents - Exclude staged docs from stats counters
This commit is contained in:
@@ -355,6 +355,20 @@ a.stat.active { border-color: rgba(15,118,110,.24); background: var(--primary-so
|
||||
margin-bottom: 1rem;
|
||||
color: var(--success);
|
||||
}
|
||||
.info-banner {
|
||||
background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(255,255,255,.82));
|
||||
border: 1px solid #bfdbfe;
|
||||
border-radius: calc(var(--radius) - 4px);
|
||||
padding: .85rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #1d4ed8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .6rem;
|
||||
font-size: .92rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.info-banner svg { flex-shrink: 0; stroke: #3b82f6; }
|
||||
|
||||
/* ============================
|
||||
Upload Card
|
||||
@@ -1450,3 +1464,107 @@ a.stat.active { border-color: rgba(15,118,110,.24); background: var(--primary-so
|
||||
font-size: .68rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================
|
||||
Staging Gallery (two-step upload)
|
||||
============================ */
|
||||
.stage-controls {
|
||||
display: flex;
|
||||
gap: .75rem;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.stage-capture-btn svg { vertical-align: -.15em; margin-inline-end: .3rem; }
|
||||
|
||||
.staging-gallery {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
||||
gap: .75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.staging-thumb {
|
||||
position: relative;
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
background: var(--surface-tint);
|
||||
border: 2px solid var(--border);
|
||||
aspect-ratio: 3/4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: var(--transition);
|
||||
}
|
||||
.staging-thumb.loading {
|
||||
opacity: .6;
|
||||
}
|
||||
.staging-thumb.removing {
|
||||
opacity: 0;
|
||||
transform: scale(.9);
|
||||
}
|
||||
.staging-thumb img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.staging-thumb-name {
|
||||
font-size: .72rem;
|
||||
color: var(--text-muted);
|
||||
padding: .25rem .4rem;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(255,255,255,.85);
|
||||
backdrop-filter: blur(4px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.staging-remove {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: rgba(220,38,38,.85);
|
||||
color: #fff;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
.staging-thumb:hover .staging-remove { opacity: 1; }
|
||||
@media (pointer: coarse) { .staging-remove { opacity: 1; } }
|
||||
|
||||
.staging-thumb-spinner {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 3px solid var(--border);
|
||||
border-top-color: var(--primary);
|
||||
border-radius: 50%;
|
||||
animation: spin .7s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
.staging-count {
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
color: var(--primary-dark);
|
||||
margin-bottom: .75rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.stage-action-buttons {
|
||||
display: flex;
|
||||
gap: .5rem;
|
||||
justify-content: center;
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user