@@ -51,10 +51,6 @@ const BaseStandardReaderProgressBar = ({
|
|||||||
const isHidden = progressBarType === ProgressBarType.HIDDEN;
|
const isHidden = progressBarType === ProgressBarType.HIDDEN;
|
||||||
const isMinimized = !isMaximized && !isDragging;
|
const isMinimized = !isMaximized && !isDragging;
|
||||||
|
|
||||||
if (isHidden) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the progress bar uses the reading direction to set the themes direction, thus, stuff has to be adjusted to still be correctly positioned
|
// the progress bar uses the reading direction to set the themes direction, thus, stuff has to be adjusted to still be correctly positioned
|
||||||
// depending on which combination of theme direction and reading direction is currently active
|
// depending on which combination of theme direction and reading direction is currently active
|
||||||
return (
|
return (
|
||||||
@@ -62,24 +58,30 @@ const BaseStandardReaderProgressBar = ({
|
|||||||
<ReaderProgressBar
|
<ReaderProgressBar
|
||||||
{...pagesState}
|
{...pagesState}
|
||||||
progressBarPosition={progressBarPosition}
|
progressBarPosition={progressBarPosition}
|
||||||
createProgressBarSlot={(page, pageLoadStates, pagesIndex) => (
|
createProgressBarSlot={(page, pageLoadStates, pagesIndex) => {
|
||||||
<ReaderProgressBarSlotDesktop
|
if (isHidden && isMinimized) {
|
||||||
pageName={page.name}
|
return null;
|
||||||
pageUrl={page.primary.url}
|
}
|
||||||
primaryPageLoadState={pageLoadStates[page.primary.index].loaded}
|
|
||||||
secondaryPageLoadState={
|
return (
|
||||||
page.secondary ? pageLoadStates[page.secondary.index].loaded : undefined
|
<ReaderProgressBarSlotDesktop
|
||||||
}
|
pageName={page.name}
|
||||||
isHorizontal={isHorizontal}
|
pageUrl={page.primary.url}
|
||||||
isVertical={isVertical}
|
primaryPageLoadState={pageLoadStates[page.primary.index].loaded}
|
||||||
progressBarPosition={progressBarPosition}
|
secondaryPageLoadState={
|
||||||
isCurrentPage={currentPagesIndex === pagesIndex}
|
page.secondary ? pageLoadStates[page.secondary.index].loaded : undefined
|
||||||
isFirstPage={pagesIndex === 0}
|
}
|
||||||
isLastPage={pagesIndex === pages.length - 1}
|
isHorizontal={isHorizontal}
|
||||||
isLeadingPage={pagesIndex < currentPagesIndex}
|
isVertical={isVertical}
|
||||||
isDragging={isDragging}
|
progressBarPosition={progressBarPosition}
|
||||||
/>
|
isCurrentPage={currentPagesIndex === pagesIndex}
|
||||||
)}
|
isFirstPage={pagesIndex === 0}
|
||||||
|
isLastPage={pagesIndex === pages.length - 1}
|
||||||
|
isLeadingPage={pagesIndex < currentPagesIndex}
|
||||||
|
isDragging={isDragging}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
container: {
|
container: {
|
||||||
sx: {
|
sx: {
|
||||||
|
|||||||
Reference in New Issue
Block a user