settings: keep screen awake is disabled by default, closes #1145 (#1149)

* layout: hint info now takes up full width in scrolled mode

* settings: keep screen awake is disabled by default, closes #1145
This commit is contained in:
Huang Xin
2025-05-14 17:11:32 +08:00
committed by GitHub
parent e368076cac
commit c7e495c379
3 changed files with 12 additions and 2 deletions
@@ -133,6 +133,7 @@ const BooksGrid: React.FC<BooksGridProps> = ({ bookKeys, onCloseBook }) => {
<HintInfo
bookKey={bookKey}
showDoubleBorder={viewSettings.vertical && viewSettings.doubleBorder}
isScrolled={viewSettings.scrolled}
isVertical={viewSettings.vertical}
horizontalGap={horizontalGapPercent}
verticalMargin={verticalMarginPixels}
@@ -5,6 +5,7 @@ import { eventDispatcher } from '@/utils/event';
interface SectionInfoProps {
bookKey: string;
showDoubleBorder: boolean;
isScrolled: boolean;
isVertical: boolean;
horizontalGap: number;
verticalMargin: number;
@@ -13,6 +14,7 @@ interface SectionInfoProps {
const HintInfo: React.FC<SectionInfoProps> = ({
bookKey,
showDoubleBorder,
isScrolled,
isVertical,
horizontalGap,
verticalMargin,
@@ -57,7 +59,14 @@ const HintInfo: React.FC<SectionInfoProps> = ({
'hintinfo absolute flex items-center justify-end overflow-hidden ps-2',
'mt-[env(safe-area-inset-top)]',
hintMessage ? 'bg-base-100' : 'bg-transparent',
isVertical ? 'writing-vertical-rl max-h-[50%]' : 'top-0 h-[44px] max-w-[50%]',
isVertical ? 'writing-vertical-rl' : 'top-0 h-[44px]',
isScrolled
? isVertical
? 'h-full'
: 'w-full'
: isVertical
? 'max-h-[50%]'
: 'max-w-[50%]',
)}
style={
isVertical
+1 -1
View File
@@ -37,7 +37,7 @@ export const DEFAULT_SYSTEM_SETTINGS: Partial<SystemSettings> = {
autoUpload: true,
alwaysOnTop: false,
autoCheckUpdates: true,
screenWakeLock: true,
screenWakeLock: false,
openLastBooks: false,
lastOpenBooks: [],
autoImportBooksOnOpen: false,