mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 03:14:40 -05:00
continues gap switch
This commit is contained in:
@@ -25,6 +25,10 @@ const useStyles = (settings: IReaderSettings) => makeStyles({
|
|||||||
backgroundColor: '#525252',
|
backgroundColor: '#525252',
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
},
|
},
|
||||||
|
image: {
|
||||||
|
display: 'block',
|
||||||
|
marginBottom: settings.continuesPageGap ? '15px' : 0,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
@@ -77,6 +81,7 @@ function LazyImage(props: IProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
|
className={classes.image}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
src={imageSrc}
|
src={imageSrc}
|
||||||
alt={`Page #${index}`}
|
alt={`Page #${index}`}
|
||||||
@@ -100,6 +105,7 @@ export default function Page(props: IProps) {
|
|||||||
<CircularProgress thickness={5} />
|
<CircularProgress thickness={5} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
once
|
||||||
>
|
>
|
||||||
<LazyImage
|
<LazyImage
|
||||||
src={src}
|
src={src}
|
||||||
|
|||||||
@@ -140,11 +140,13 @@ const useStyles = (settings: IReaderSettings) => makeStyles((theme: Theme) => ({
|
|||||||
export interface IReaderSettings{
|
export interface IReaderSettings{
|
||||||
staticNav: boolean
|
staticNav: boolean
|
||||||
showPageNumber: boolean
|
showPageNumber: boolean
|
||||||
|
continuesPageGap: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultReaderSettings = () => ({
|
export const defaultReaderSettings = () => ({
|
||||||
staticNav: false,
|
staticNav: false,
|
||||||
showPageNumber: true,
|
showPageNumber: true,
|
||||||
|
continuesPageGap: false,
|
||||||
} as IReaderSettings);
|
} as IReaderSettings);
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
@@ -279,6 +281,16 @@ export default function ReaderNavBar(props: IProps) {
|
|||||||
/>
|
/>
|
||||||
</ListItemSecondaryAction>
|
</ListItemSecondaryAction>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
<ListItem>
|
||||||
|
<ListItemText primary="Continues Page gap" />
|
||||||
|
<ListItemSecondaryAction>
|
||||||
|
<Switch
|
||||||
|
edge="end"
|
||||||
|
checked={settings.continuesPageGap}
|
||||||
|
onChange={(e) => setSettingValue('continuesPageGap', e.target.checked)}
|
||||||
|
/>
|
||||||
|
</ListItemSecondaryAction>
|
||||||
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
Reference in New Issue
Block a user