mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 22:07:06 +02:00
Cleanup + lint/format
This commit is contained in:
@@ -17,30 +17,25 @@ export class ConnectionBauble extends React.Component<baubleProps> {
|
||||
super(props);
|
||||
this.state = {
|
||||
connection: props.callback(),
|
||||
callback: props.callback
|
||||
callback: props.callback,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() : void {
|
||||
this.timerID = setInterval(
|
||||
() => this.tick(),
|
||||
1000
|
||||
);
|
||||
componentDidMount(): void {
|
||||
this.timerID = setInterval(() => this.tick(), 1000);
|
||||
}
|
||||
|
||||
componentWillUnmount() : void {
|
||||
componentWillUnmount(): void {
|
||||
clearInterval(this.timerID);
|
||||
}
|
||||
|
||||
tick() : void {
|
||||
tick(): void {
|
||||
this.setState({
|
||||
connection: this.state.callback()
|
||||
connection: this.state.callback(),
|
||||
});
|
||||
}
|
||||
|
||||
render() : string {
|
||||
return (
|
||||
this.state.connection? "Connected" : "Disconnected"
|
||||
);
|
||||
render(): string {
|
||||
return this.state.connection ? "Connected" : "Disconnected";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,27 +370,26 @@ export const CurrentOptionsPage = (props: IProps): React.ReactElement => {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Tooltip title={
|
||||
<Typography>
|
||||
This port number is used to connect to a Remote File API port,
|
||||
please ensure that it matches with the port the Remote File API server is publishing on (12525 by default).
|
||||
Click the reconnect button to try and re-establish connection.
|
||||
The little colored bauble shows whether the connection is live or not.
|
||||
</Typography>
|
||||
}>
|
||||
<TextField
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
This port number is used to connect to a Remote File API port, please ensure that it matches with the port
|
||||
the Remote File API server is publishing on (12525 by default). Click the reconnect button to try and
|
||||
re-establish connection. The little colored bauble shows whether the connection is live or not.
|
||||
</Typography>
|
||||
}
|
||||
>
|
||||
<TextField
|
||||
InputProps={{
|
||||
startAdornment: (
|
||||
<Typography
|
||||
color={remoteFileApiPort > 0 && remoteFileApiPort <= 65535? "success" : "error"}
|
||||
>
|
||||
<Typography color={remoteFileApiPort > 0 && remoteFileApiPort <= 65535 ? "success" : "error"}>
|
||||
Remote File API port:
|
||||
</Typography>
|
||||
),
|
||||
endAdornment: (
|
||||
<Box>
|
||||
<Button onClick={newRemoteFileApiConnection}>Reconnect</Button>
|
||||
<ConnectionBauble callback={isRemoteFileApiConnectionLive}/>
|
||||
<ConnectionBauble callback={isRemoteFileApiConnectionLive} />
|
||||
</Box>
|
||||
),
|
||||
}}
|
||||
@@ -398,7 +397,7 @@ export const CurrentOptionsPage = (props: IProps): React.ReactElement => {
|
||||
onChange={handleRemoteFileApiPortChange}
|
||||
placeholder="12525"
|
||||
/>
|
||||
</Tooltip>
|
||||
</Tooltip>
|
||||
</GameOptionsPage>
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user