Schließe den Leser, wenn eine entfernte Datei die Navigation ausblendet.
Deploy Development / deploy (push) Successful in 27s
Test Suite / pytest-backend (push) Successful in 1m51s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 8s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-18 17:35:48 +02:00
1 parent 79241831fd
commit 562c0848b1
5 files changed
+104 -35

No files matched your search

+21 -8
View File
@@ -282,9 +282,10 @@ export function ReadingPane({ binding, context, backLabel, onClose, onReload, ca
const task = { cancel: null };
pdf.getPage(page).then((pdfPage) => {
if (!alive) return;
const viewport = pdfPage.getViewport({ scale });
const canvas = canvasRef.current;
const context2d = canvas.getContext("2d");
const context2d = canvas?.getContext("2d");
if (!canvas || !context2d) return;
const viewport = pdfPage.getViewport({ scale });
canvas.width = viewport.width;
canvas.height = viewport.height;
const render = pdfPage.render({ canvasContext: context2d, viewport });
@@ -440,16 +441,28 @@ export function ReadingPane({ binding, context, backLabel, onClose, onReload, ca
const search = new URLSearchParams();
search.set("context_kind", context.kind);
search.set("context_id", context.id);
await api(`/api/v1/bindings/${binding.id}?${search}`, { method: "DELETE" });
onClose();
onReload();
setError("");
try {
await api(`/api/v1/bindings/${binding.id}?${search}`, { method: "DELETE" });
markDirty(false);
onClose();
onReload();
} catch (err) {
setError(err.message);
}
}
async function destroy() {
if (!window.confirm("Überall löschen? Alle Einbindungen verschwinden. Eine Paperless-Quelle bleibt unangetastet.")) return;
await api(`/api/v1/elements/${element.id}/delete`, { method: "POST", body: { expected_version: element.version } });
onClose();
onReload();
setError("");
try {
await api(`/api/v1/elements/${element.id}/delete`, { method: "POST", body: { expected_version: element.version } });
markDirty(false);
onClose();
onReload();
} catch (err) {
setError(err.message);
}
}
if (!binding) {