Halte die gewaehlte Inhaltsliste beim Oeffnen und mache Typ sowie das Logo auf dunkler Flaeche aus der Lieferung erkennbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
dc8a9c2db6
commit
97bffc6175
71 files changed
+572
-142
No files matched your search
@@ -356,14 +356,6 @@ export function CaseDetail() {
|
||||
}
|
||||
}, [record, id, rawScope, overview, chapterId, params, setParams, navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!record || record.id !== id || !entryId || overview) return;
|
||||
const binding = (record.bindings || []).find((item) => item.id === entryId);
|
||||
if (!binding) return;
|
||||
const nextChapter = binding.chapter_id || "";
|
||||
if ((chapterId || "") !== nextChapter) writeSelection(params, setParams, "direct", nextChapter);
|
||||
}, [record, id, entryId, overview, chapterId, params, setParams]);
|
||||
|
||||
useEffect(() => {
|
||||
if (entryId) return;
|
||||
restoreScroll(listRef.current, `tsumugu-scroll:case:${id}:${chapterId}:${overview ? "over" : "direct"}`);
|
||||
@@ -395,8 +387,6 @@ export function CaseDetail() {
|
||||
const updated = new URLSearchParams(params);
|
||||
updated.delete("bereich");
|
||||
updated.set("eintrag", binding.id);
|
||||
if (binding.chapter_id) updated.set("kapitel", binding.chapter_id);
|
||||
else updated.delete("kapitel");
|
||||
setParams(updated);
|
||||
setView("contents");
|
||||
}
|
||||
@@ -536,10 +526,11 @@ export function CaseDetail() {
|
||||
onOpen={openEntry}
|
||||
onChange={load}
|
||||
itemHref={(binding) => {
|
||||
const search = new URLSearchParams();
|
||||
const search = new URLSearchParams(params);
|
||||
search.delete("bereich");
|
||||
search.set("eintrag", binding.id);
|
||||
if (binding.chapter_id) search.set("kapitel", binding.chapter_id);
|
||||
return `/cases/${id}?${search}`;
|
||||
const text = search.toString();
|
||||
return text ? `/cases/${id}?${text}` : `/cases/${id}`;
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
Reference in new issue
Block a user