@@ -73,7 +73,8 @@ const ProgressInfoView: React.FC<PageInfoProps> = ({
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
'progressinfo absolute bottom-0 flex items-center justify-between font-sans',
|
||||
'progressinfo absolute flex items-center justify-between font-sans',
|
||||
'pointer-events-none bottom-0',
|
||||
isEink ? 'text-sm font-normal' : 'text-neutral-content text-xs font-extralight',
|
||||
isVertical ? 'writing-vertical-rl' : 'w-full',
|
||||
isScrolled && !isVertical && 'bg-base-100',
|
||||
|
||||
@@ -24,7 +24,7 @@ const FooterBar: React.FC<FooterBarProps> = ({
|
||||
}) => {
|
||||
const _ = useTranslation();
|
||||
const { appService } = useEnv();
|
||||
const { getConfig, setConfig } = useBookDataStore();
|
||||
const { getConfig, setConfig, getBookData } = useBookDataStore();
|
||||
const { hoveredBookKey, setHoveredBookKey } = useReaderStore();
|
||||
const { getView, getViewState, getProgress, getViewSettings } = useReaderStore();
|
||||
const { isSideBarVisible, setSideBarVisible } = useSidebarStore();
|
||||
@@ -32,6 +32,7 @@ const FooterBar: React.FC<FooterBarProps> = ({
|
||||
|
||||
const view = getView(bookKey);
|
||||
const config = getConfig(bookKey);
|
||||
const bookData = getBookData(bookKey);
|
||||
const viewState = getViewState(bookKey);
|
||||
const progress = getProgress(bookKey);
|
||||
const viewSettings = getViewSettings(bookKey);
|
||||
@@ -209,6 +210,10 @@ const FooterBar: React.FC<FooterBarProps> = ({
|
||||
: 'pointer-events-none translate-y-full opacity-0 sm:translate-y-0',
|
||||
);
|
||||
|
||||
const needHorizontalScroll =
|
||||
(viewSettings?.vertical && viewSettings?.scrolled) ||
|
||||
(bookData?.isFixedLayout && viewSettings?.zoomLevel && viewSettings.zoomLevel > 100);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* Hover trigger area */}
|
||||
@@ -216,7 +221,7 @@ const FooterBar: React.FC<FooterBarProps> = ({
|
||||
role='none'
|
||||
className={clsx(
|
||||
'absolute bottom-0 left-0 z-10 flex h-[52px] w-full',
|
||||
viewSettings?.vertical && viewSettings?.scrolled && 'sm:!bottom-3 sm:!h-7',
|
||||
needHorizontalScroll && 'sm:!bottom-3 sm:!h-7',
|
||||
)}
|
||||
onClick={() => setHoveredBookKey(bookKey)}
|
||||
onMouseEnter={() => !appService?.isMobile && setHoveredBookKey(bookKey)}
|
||||
|
||||
Reference in New Issue
Block a user