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
@@ -280,14 +280,6 @@ export function MatterDetail() {
|
||||
};
|
||||
}, [inherited?.kind, inherited?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!record || record.id !== id || !entryId) return;
|
||||
const binding = (record.bindings || []).find((item) => item.id === entryId);
|
||||
if (!binding) return;
|
||||
const nextChapter = binding.chapter_id || "";
|
||||
if ((chapterId || "") !== nextChapter) writeChapter(params, setParams, nextChapter);
|
||||
}, [record, id, entryId, chapterId, params, setParams]);
|
||||
|
||||
useEffect(() => {
|
||||
if (entryId) return;
|
||||
restoreScroll(listRef.current, `tsumugu-scroll:${id}:${chapterId}`);
|
||||
@@ -308,8 +300,6 @@ export function MatterDetail() {
|
||||
rememberScroll(listRef.current, `tsumugu-scroll:${id}:${chapterId}`);
|
||||
const updated = new URLSearchParams(params);
|
||||
updated.set("eintrag", binding.id);
|
||||
if (binding.chapter_id) updated.set("kapitel", binding.chapter_id);
|
||||
else updated.delete("kapitel");
|
||||
setParams(updated);
|
||||
setView("contents");
|
||||
}
|
||||
@@ -462,10 +452,10 @@ export function MatterDetail() {
|
||||
}}
|
||||
onChange={load}
|
||||
itemHref={(binding) => {
|
||||
const search = new URLSearchParams(query.replace(/^\?/, ""));
|
||||
const search = new URLSearchParams(params);
|
||||
search.set("eintrag", binding.id);
|
||||
if (binding.chapter_id) search.set("kapitel", binding.chapter_id);
|
||||
return `/matters/${id}?${search}`;
|
||||
const text = search.toString();
|
||||
return text ? `/matters/${id}?${text}` : `/matters/${id}`;
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
Reference in new issue
Block a user