put 'play on grasscutter' closer to the play button when unchecked

This commit is contained in:
SpikeHD
2022-05-22 21:59:10 -07:00
parent 805a9914be
commit 5879207181
3 changed files with 10 additions and 5 deletions

View File

@@ -7,7 +7,8 @@
"ip_placeholder": "Server Address...", "ip_placeholder": "Server Address...",
"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'."
}, },
"options": { "options": {
"game_exec": "Set Game Executable", "game_exec": "Set Game Executable",

View File

@@ -1,7 +1,7 @@
#playButton { #playButton {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-evenly;
position: absolute; position: absolute;
transform: translate(0%, -50%); transform: translate(0%, -50%);

View File

@@ -23,6 +23,8 @@ interface IState {
ipPlaceholder: string; ipPlaceholder: string;
portPlaceholder: string; portPlaceholder: string;
portHelpText: string;
} }
export default class ServerLaunchSection extends React.Component<IProps, IState> { export default class ServerLaunchSection extends React.Component<IProps, IState> {
@@ -36,7 +38,8 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
ip: '', ip: '',
port: '', port: '',
ipPlaceholder: '', ipPlaceholder: '',
portPlaceholder: '' portPlaceholder: '',
portHelpText: ''
} }
this.toggleGrasscutter = this.toggleGrasscutter.bind(this) this.toggleGrasscutter = this.toggleGrasscutter.bind(this)
@@ -55,7 +58,8 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
ip: config.last_ip || '', ip: config.last_ip || '',
port: config.last_port || '', port: config.last_port || '',
ipPlaceholder: await translate('main.ip_placeholder'), ipPlaceholder: await translate('main.ip_placeholder'),
portPlaceholder: await translate('main.port_placeholder') portPlaceholder: await translate('main.port_placeholder'),
portHelpText: await translate('main.port_help_text')
}) })
} }
@@ -152,7 +156,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
<TextInput style={{ <TextInput style={{
width: '10%', width: '10%',
}} id="port" key="port" placeholder={this.state.portPlaceholder} onChange={this.setPort}/> }} id="port" key="port" placeholder={this.state.portPlaceholder} onChange={this.setPort}/>
<HelpButton contents="Ensure this is the Dispatch server port, not the Game server port. This is almost always '443'." /> <HelpButton contents={this.state.portHelpText} />
</div> </div>
) )
} }