forked from akai/readest
This commit is contained in:
@@ -57,7 +57,7 @@ const TOCItemView = React.memo<{
|
||||
);
|
||||
|
||||
return (
|
||||
<span
|
||||
<div
|
||||
role='treeitem'
|
||||
tabIndex={-1}
|
||||
onClick={item.href ? handleClickItem : undefined}
|
||||
@@ -87,7 +87,7 @@ const TOCItemView = React.memo<{
|
||||
{createExpanderIcon(flatItem.isExpanded || false)}
|
||||
</span>
|
||||
)}
|
||||
<span
|
||||
<div
|
||||
className='ms-2 truncate text-ellipsis'
|
||||
style={{
|
||||
maxWidth: 'calc(100% - 24px)',
|
||||
@@ -96,13 +96,13 @@ const TOCItemView = React.memo<{
|
||||
}}
|
||||
>
|
||||
{item.label}
|
||||
</span>
|
||||
</div>
|
||||
{item.location && (
|
||||
<span className='text-base-content/50 ms-auto ps-1 text-xs sm:pe-1'>
|
||||
<div className='text-base-content/50 ms-auto ps-1 text-xs sm:pe-1'>
|
||||
{item.location.current + 1}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ const TOCView: React.FC<{
|
||||
const vitualListRef = useRef<VirtualList | null>(null);
|
||||
const staticListRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
useTextTranslation(bookKey, containerRef.current);
|
||||
useTextTranslation(bookKey, containerRef.current, false, 'translation-target-toc');
|
||||
|
||||
useEffect(() => {
|
||||
const updateHeight = () => {
|
||||
|
||||
Reference in New Issue
Block a user