Skip to content

Commit

Permalink
Merge pull request #822 from amaranthine-dev/master
Browse files Browse the repository at this point in the history
add option to hide home button in PDF view
  • Loading branch information
troyeguo committed Jun 3, 2023
2 parents a8058e1 + 73880a4 commit 5da9060
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/backToMain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ const BackToMain = (props: any) => {
props.handleReadingState(false);
}
}}
style={document.URL.indexOf("djvu") > -1 ? { bottom: "60px" } : {}}
style={
StorageUtil.getReaderConfig("isHideHome") === "yes" &&
document.URL.indexOf("pdf") > -1 ? { display: "none" } :
document.URL.indexOf("djvu") > -1 ? { bottom: "60px" } : {}
}
>
<span className="icon-home back-home"></span>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/dialogs/settingDialog/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class SettingDialog extends React.Component<
appSkin: StorageUtil.getReaderConfig("appSkin"),
isUseBuiltIn: StorageUtil.getReaderConfig("isUseBuiltIn") === "yes",
isPDFCover: StorageUtil.getReaderConfig("isPDFCover") === "yes",
isHideHome: StorageUtil.getReaderConfig("isHideHome") === "yes",
currentThemeIndex: window._.findLastIndex(themeList, {
name: StorageUtil.getReaderConfig("themeColor"),
}),
Expand Down
1 change: 1 addition & 0 deletions src/components/dialogs/settingDialog/interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface SettingInfoState {
isDisableUpdate: boolean;
isUseBuiltIn: boolean;
isPDFCover: boolean;
isHideHome: boolean;
isAutoFullscreen: boolean;
isHideShelfBook: boolean;
isPreventAdd: boolean;
Expand Down
5 changes: 5 additions & 0 deletions src/constants/settingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export const settingList = [
isElectron: false,
title: "Use first page as PDF cover",
propName: "isPDFCover",
},
{
isElectron: false,
title: "Hide home button in PDF reader",
propName: "isHideHome",
},
{
isElectron: true,
Expand Down

0 comments on commit 5da9060

Please sign in to comment.