diff --git a/src/client/component/headline.tsx b/src/client/component/headline.tsx
index 2e5dc86..248ada0 100644
--- a/src/client/component/headline.tsx
+++ b/src/client/component/headline.tsx
@@ -87,6 +87,7 @@ export const Headline = (prop: {
content?: string;
toolbar?: string;
};
+ rightAppbar?: React.ReactNode;
menu: React.ReactNode;
}) => {
const [v, setv] = useState(false);
@@ -175,6 +176,7 @@ export const Headline = (prop: {
Ionian
+ {prop.rightAppbar}
({ doc: undefined, notfound: false });
const menu_list = (link?: string) =>
;
+ const fullScreenTargetRef = useRef
(null);
useEffect(() => {
(async () => {
@@ -56,8 +58,20 @@ export function ReaderPage(props?: {}) {
} else {
const ReaderPage = getPresenter(info.doc);
return (
-
-
+ {
+ if (fullScreenTargetRef.current != null && document.fullscreenEnabled) {
+ fullScreenTargetRef.current.requestFullscreen();
+ }
+ }}
+ color="inherit">
+
+ }>
+
);
}
diff --git a/src/client/page/reader/comic.tsx b/src/client/page/reader/comic.tsx
index 5ccc2ee..70d7baf 100644
--- a/src/client/page/reader/comic.tsx
+++ b/src/client/page/reader/comic.tsx
@@ -1,5 +1,5 @@
import { Typography, styled } from "@mui/material";
-import React, { useEffect, useState } from "react";
+import React, { RefObject, useEffect, useState } from "react";
import { useSearchParams } from "react-router-dom";
import { Document } from "../../accessor/document";
@@ -29,7 +29,8 @@ const CurrentView = styled("img")(({theme})=>({
position: "absolute"
}));
-export const ComicReader = (props: { doc: Document }) => {
+export const ComicReader = (props: { doc: Document,
+ fullScreenTarget?: RefObject}) => {
const additional = props.doc.additional;
const [searchParams, setSearchParams] = useSearchParams();
@@ -68,7 +69,7 @@ export const ComicReader = (props: { doc: Document }) => {
}, [curPage]);
// theme.mixins.toolbar.minHeight;
return (
-
+
;
}
interface PagePresenter {
(prop: PagePresenterProp): JSX.Element;