help and box shadows

This commit is contained in:
SpikeHD
2022-05-24 21:54:10 -07:00
parent b4a6c2cb35
commit 5c1f3ecbaf
6 changed files with 26 additions and 7 deletions

View File

@@ -8,7 +8,8 @@
"port_placeholder": "Port...", "port_placeholder": "Port...",
"files_downloading": "Files Downloading: ", "files_downloading": "Files Downloading: ",
"files_extracting": "Files Extracting: ", "files_extracting": "Files Extracting: ",
"port_help_text": "Ensure this is the Dispatch server port, not the Game server port. This is almost always '443'." "port_help_text": "Ensure this is the Dispatch server port, not the Game server port. This is almost always '443'.",
"game_help_text": "You do not need to use a seperate copy to play with Grasscutter. This is for either downgrading to 2.6 or if you do not have the game installed."
}, },
"options": { "options": {
"game_exec": "Set Game Executable", "game_exec": "Set Game Executable",

View File

@@ -9,6 +9,8 @@
background: #fff; background: #fff;
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.2);
} }
.MiniDialogTop { .MiniDialogTop {

View File

@@ -5,7 +5,8 @@ import Help from '../../../resources/icons/help.svg'
import MiniDialog from '../MiniDialog' import MiniDialog from '../MiniDialog'
interface IProps { interface IProps {
contents: string children?: React.ReactNode[] | React.ReactNode;
contents?: string
id?: string id?: string
} }
@@ -44,7 +45,7 @@ export default class HelpButton extends React.Component<IProps, IState> {
display: this.state.opened ? 'block' : 'none' display: this.state.opened ? 'block' : 'none'
}}> }}>
<MiniDialog closeFn={this.setClosed}> <MiniDialog closeFn={this.setClosed}>
{this.props.contents} {this.props.contents || this.props.children}
</MiniDialog> </MiniDialog>
</div> </div>
</div> </div>

View File

@@ -4,25 +4,34 @@
} }
.GameDownload { .GameDownload {
display: flex;
flex-direction: row;
align-items: center;
padding: 18px; padding: 18px;
} }
.GameDownload .MiniDialog {
height: 30%;
}
.GameDownload .BigButton { .GameDownload .BigButton {
height: 50px; height: 50px;
} }
.GameDownload .HelpButton img {
filter: invert(0%) sepia(91%) saturate(7464%) hue-rotate(101deg) brightness(0%) contrast(107%);
}
.GameDownloadDir { .GameDownloadDir {
width: 70%; width: 70%;
} }
.GameDownloadDir .DirInput .TextInputWrapper,
.GameDownloadDir .DirInput { .GameDownloadDir .DirInput {
width: 100%; width: 100%;
} }
.GameDownloadDir .DirInput .TextInputWrapper {
width: 100%;
}
.GameDownloadDir .DirInput .TextInputWrapper input { .GameDownloadDir .DirInput .TextInputWrapper input {
width: 80%; width: 80%;
} }

View File

@@ -6,6 +6,7 @@ import DownloadHandler from '../../../utils/download'
import './Game.css' import './Game.css'
import DirInput from '../common/DirInput' import DirInput from '../common/DirInput'
import BigButton from '../common/BigButton' import BigButton from '../common/BigButton'
import HelpButton from '../common/HelpButton'
interface IProps { interface IProps {
closeFn: () => void; closeFn: () => void;
@@ -44,6 +45,9 @@ export default class Downloads extends React.Component<IProps, IState> {
<Menu heading='Download Game' closeFn={this.props.closeFn} className="GameDownloadMenu"> <Menu heading='Download Game' closeFn={this.props.closeFn} className="GameDownloadMenu">
<div className="GameDownload"> <div className="GameDownload">
<BigButton id="downloadGameBtn" onClick={this.downloadGame}>Download Game</BigButton> <BigButton id="downloadGameBtn" onClick={this.downloadGame}>Download Game</BigButton>
<HelpButton>
<Tr text="main.game_help_text" />
</HelpButton>
</div> </div>
<div className="GameDownloadDir"> <div className="GameDownloadDir">

View File

@@ -12,6 +12,8 @@
background: #fff; background: #fff;
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.2);
} }
.MenuInner { .MenuInner {