redact: UX overhaul — engine simplification, credits, spinner, save-to-docs, badges
- Remove GPU/regex engine options; keep only azure_mini (1 credit) and azure_full (2 credits)
- Variable credit cost: engine-aware pre-check and charge in api/redact.php; PricingCatalog base = 1
- Fix ATTORNEY not preserved when keepOfficials=true: add to LLM prompt, generic-tag, pseudonym regexes
- Replace Azure credits hint with per-engine credit cost text (all 4 languages)
- Single-file upload only (was: up to 5); simplify status messages
- Clear previous redaction output and show pulsing spinner when a new run starts
- Add "Save to My Docs" button in redact output panel (corpus-save.js path)
- corpus-save.js: capture source_doc_ids from button dataset, pass in POST payload
- api/save-to-corpus.php: accept source_doc_ids, store first as source_url=corpus-doc:{id}
- doc-picker.js: show "✂ Redacted" badge for documents saved from the redact tool
- CSS: .redact-working spinner, doc-item__badge--redact pill styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2266,6 +2266,38 @@ p {
|
||||
cursor: progress;
|
||||
}
|
||||
|
||||
@keyframes redact-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.redact-working {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
padding: 32px 16px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: #fbfcfe;
|
||||
}
|
||||
|
||||
.redact-working p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.redact-working__spinner {
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border: 3px solid var(--line);
|
||||
border-top-color: var(--teal);
|
||||
border-radius: 50%;
|
||||
animation: redact-spin 0.9s linear infinite;
|
||||
}
|
||||
|
||||
/* ── Feedback widget ──────────────────────────────────────────── */
|
||||
.feedback-widget {
|
||||
margin-top: 1.5rem;
|
||||
|
||||
Reference in New Issue
Block a user