mirror of
https://github.com/PR0M3TH3AN/unredact.git
synced 2026-10-27 08:40:29 +00:00
feat: update main.js references from solved to approved status
Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
1 parent
7bc5aa3239
commit
0873120775
1 file changed
+10
-5
+10
-5
@@ -291,17 +291,19 @@ function statusLabel(status) {
|
||||
case "unanalyzed": return "unanalyzed";
|
||||
case "analyzing": return "analyzing...";
|
||||
case "analyzed": return "analyzed";
|
||||
case "solved": return "solved";
|
||||
case "approved": return "approved";
|
||||
case "error": return "error";
|
||||
default: return status;
|
||||
}
|
||||
}
|
||||
|
||||
function redactionInfoText(r) {
|
||||
if (r.status === "solved" && r.solution) {
|
||||
return r.solution.text;
|
||||
if (r.status === "approved" && r.approvedText) {
|
||||
return r.approvedText.length > 30
|
||||
? r.approvedText.slice(0, 30) + "..."
|
||||
: r.approvedText;
|
||||
}
|
||||
if ((r.status === "analyzed" || r.status === "solved") && r.analysis) {
|
||||
if (r.status === "analyzed" && r.analysis) {
|
||||
const segs = r.analysis.segments;
|
||||
const left = segs.length > 0 ? segs[0].text : "";
|
||||
const right = segs.length > 1 ? segs[1].text : "";
|
||||
@@ -327,7 +329,7 @@ function activateRedaction(id) {
|
||||
renderRedactionList();
|
||||
renderCanvas();
|
||||
|
||||
if (r.status === "analyzed" || r.status === "solved") {
|
||||
if (r.status === "analyzed" || r.status === "approved") {
|
||||
openPopover(id);
|
||||
}
|
||||
}
|
||||
@@ -558,6 +560,9 @@ function exportAnnotations() {
|
||||
if (r.solution) {
|
||||
entry.solution = r.solution;
|
||||
}
|
||||
if (r.approvedText) {
|
||||
entry.approvedText = r.approvedText;
|
||||
}
|
||||
pages[r.page].push(entry);
|
||||
}
|
||||
// Sort each page's redactions top-to-bottom, left-to-right
|
||||
|
||||
Reference in new issue
Block a user