Spaces:
Running
Running
no auto-advance after ruling
Browse files- review.html +2 -12
review.html
CHANGED
|
@@ -385,21 +385,11 @@ async function rule(v) {
|
|
| 385 |
saved = await sinkCommit(entry);
|
| 386 |
}
|
| 387 |
lastSaved = saved;
|
| 388 |
-
// warning toast on disagreement (stays
|
| 389 |
const sp0 = span(), dk = (v === 'DATA_MENTION') !== (sp0.luna_label === 1);
|
| 390 |
light();
|
| 391 |
-
if (dk) {
|
| 392 |
-
warnToast(`DISAGREE — “${sp0.surface}”: Luna ${sp0.luna_label === 1 ? 'kept this, you’re dropping' : 'dropped this, you’re keeping'}`);
|
| 393 |
-
}
|
| 394 |
-
advTimer = setTimeout(() => {
|
| 395 |
-
const o = cur();
|
| 396 |
-
const nx = o.spans.findIndex((x, n) => n > s && !R[x.key]);
|
| 397 |
-
if (nx >= 0) show(i, nx);
|
| 398 |
-
else if (i < ITEMS.length - 1) show(i + 1, 0);
|
| 399 |
-
}, 1100);
|
| 400 |
}
|
| 401 |
-
let advTimer = null;
|
| 402 |
-
function cancelAdv() { if (advTimer) { clearTimeout(advTimer); advTimer = null; } }
|
| 403 |
async function sinkCommit(entry) {
|
| 404 |
// shared sink (Cloudflare Worker) if configured, else the annotator's
|
| 405 |
// own token, else local-only. The sink holds no shared secret: with HF
|
|
|
|
| 385 |
saved = await sinkCommit(entry);
|
| 386 |
}
|
| 387 |
lastSaved = saved;
|
| 388 |
+
// warning toast on disagreement (stays until dismissed)
|
| 389 |
const sp0 = span(), dk = (v === 'DATA_MENTION') !== (sp0.luna_label === 1);
|
| 390 |
light();
|
| 391 |
+
if (dk) warnToast(`DISAGREE — “${sp0.surface}”: Luna ${sp0.luna_label === 1 ? 'kept this, you’re dropping' : 'dropped this, you’re keeping'}`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 392 |
}
|
|
|
|
|
|
|
| 393 |
async function sinkCommit(entry) {
|
| 394 |
// shared sink (Cloudflare Worker) if configured, else the annotator's
|
| 395 |
// own token, else local-only. The sink holds no shared secret: with HF
|