fix(reader): pure black/white footer in eink mode (#3873) (#4024)

The footer NavigationBar and slide-up panels (Color, Progress, Font &
Layout) used `bg-base-200`, which is computed as a slightly-darker shade
of the theme's background. In eink mode this rendered as a visible grey
strip even when the user picked a pure white/black theme.

Switch to `bg-base-100` in eink mode and add a `border-base-content` top
border so the bar stays visually separated from the page area without
relying on a tinted background, matching the existing eink treatment
elsewhere (e.g. PageNavigationButtons, ImageViewer).
This commit is contained in:
Huang Xin
2026-05-02 00:05:36 +08:00
committed by GitHub
parent 293d5b5f5d
commit 8ba052dc81
5 changed files with 9 additions and 5 deletions
@@ -77,7 +77,8 @@ export const ColorPanel: React.FC<ColorPanelProps> = ({
};
const classes = clsx(
'footerbar-color-mobile bg-base-200 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'footerbar-color-mobile not-eink:bg-base-200 eink:bg-base-100 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'eink:border-base-content eink:border-t',
!forceMobileLayout && 'sm:hidden',
actionTab === 'color'
? 'pointer-events-auto translate-y-0 pb-4 pt-8 ease-out'
@@ -93,7 +93,8 @@ export const FontLayoutPanel: React.FC<FontLayoutPanelProps> = ({
}, []);
const classes = clsx(
'footerbar-font-mobile bg-base-200 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'footerbar-font-mobile not-eink:bg-base-200 eink:bg-base-100 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'eink:border-base-content eink:border-t',
!forceMobileLayout && 'sm:hidden',
actionTab === 'font'
? 'pointer-events-auto translate-y-0 pb-4 pt-8 ease-out'
@@ -219,7 +219,7 @@ const FooterBar: React.FC<FooterBarProps> = ({
const containerClasses = clsx(
'footer-bar shadow-xs bottom-0 left-0 z-10 flex w-full flex-col',
!forceMobileLayout && 'sm:h-[52px] sm:bg-base-100 sm:border-none',
'border-base-300/50 border-t',
'not-eink:border-base-300/50 eink:border-base-content border-t',
'transition-[opacity,transform] duration-300',
forceMobileLayout || window.innerWidth < 640 ? 'fixed' : 'absolute',
appService?.hasRoundedWindow && 'rounded-window-bottom-right',
@@ -39,7 +39,8 @@ export const NavigationBar: React.FC<NavigationBarProps> = ({
return (
<div
className={clsx(
'bg-base-200 z-30 mt-auto flex w-full justify-between px-8 py-4',
'not-eink:bg-base-200 eink:bg-base-100 z-30 mt-auto flex w-full justify-between px-8 py-4',
'eink:border-base-content eink:border-t',
!forceMobileLayout && 'sm:hidden',
)}
style={{
@@ -58,7 +58,8 @@ export const NavigationPanel: React.FC<NavigationPanelProps> = ({
);
const classes = clsx(
'footerbar-progress-mobile bg-base-200 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'footerbar-progress-mobile not-eink:bg-base-200 eink:bg-base-100 absolute flex w-full flex-col items-center gap-y-8 px-4 transition-all',
'eink:border-base-content eink:border-t',
!forceMobileLayout && 'sm:hidden',
actionTab === 'progress'
? 'pointer-events-auto translate-y-0 pb-4 pt-8 ease-out'