fix info panel visible issue in mobile
This commit is contained in:
parent
4161d552ba
commit
3344439ef4
@ -263,7 +263,7 @@ const GamePage: FunctionComponent<{
|
|||||||
|
|
||||||
function renderMobileBoardToolbar() {
|
function renderMobileBoardToolbar() {
|
||||||
return <BoardToolbar style={{ justifyContent: "center" }} visible={showBoardView && isMobile || false}>
|
return <BoardToolbar style={{ justifyContent: "center" }} visible={showBoardView && isMobile || false}>
|
||||||
{buildInfoPanel()}
|
{buildInfoPanel({ visible: isMobile })}
|
||||||
</BoardToolbar>;
|
</BoardToolbar>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ const GamePage: FunctionComponent<{
|
|||||||
marginBottom: "0.5rem", marginLeft: "6%", maxWidth: isMobile ? "40vw" : "30vw",
|
marginBottom: "0.5rem", marginLeft: "6%", maxWidth: isMobile ? "40vw" : "30vw",
|
||||||
width: isMobile ? "40vw" : "30vw"
|
width: isMobile ? "40vw" : "30vw"
|
||||||
}} context={context} layoutMode="left" user={topLocatedUser} visible={showBoardView || false} />
|
}} context={context} layoutMode="left" user={topLocatedUser} visible={showBoardView || false} />
|
||||||
{buildInfoPanel()}
|
{buildInfoPanel({ visible: !isMobile })}
|
||||||
<UserStatus style={{
|
<UserStatus style={{
|
||||||
marginBottom: "0.5rem", marginRight: "6%", maxWidth: isMobile ? "40vw" : "30vw",
|
marginBottom: "0.5rem", marginRight: "6%", maxWidth: isMobile ? "40vw" : "30vw",
|
||||||
width: isMobile ? "40vw" : "30vw"
|
width: isMobile ? "40vw" : "30vw"
|
||||||
@ -281,7 +281,7 @@ const GamePage: FunctionComponent<{
|
|||||||
</BoardToolbar>;
|
</BoardToolbar>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildInfoPanel() {
|
function buildInfoPanel(params: { visible: boolean }) {
|
||||||
return (
|
return (
|
||||||
<InfoPanel
|
<InfoPanel
|
||||||
style={{ marginTop: "0.5rem", marginBottom: "0.5rem" }}
|
style={{ marginTop: "0.5rem", marginBottom: "0.5rem" }}
|
||||||
@ -291,7 +291,7 @@ const GamePage: FunctionComponent<{
|
|||||||
whitePlayer={topLocatedUser}
|
whitePlayer={topLocatedUser}
|
||||||
blackPlayer={bottomLocatedUser}
|
blackPlayer={bottomLocatedUser}
|
||||||
leftPlayer={leftPlayer}
|
leftPlayer={leftPlayer}
|
||||||
visible={!isMobile}
|
visible={params.visible}
|
||||||
isSpectator={isSpectator} />
|
isSpectator={isSpectator} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user