import React, { useState } from "react"; import { Button, Link, TextField, Tooltip, Typography } from "@mui/material"; import { GameOptionsPage } from "./GameOptionsPage"; import { Settings } from "../../Settings/Settings"; import { ConnectionBauble } from "./ConnectionBauble"; import { isRemoteFileApiConnectionLive, newRemoteFileApiConnection } from "../../RemoteFileAPI/RemoteFileAPI"; export const RemoteAPIPage = (): React.ReactElement => { const [remoteFileApiPort, setRemoteFileApiPort] = useState(Settings.RemoteFileApiPort); function handleRemoteFileApiPortChange(event: React.ChangeEvent): void { setRemoteFileApiPort(Number(event.target.value) as number); Settings.RemoteFileApiPort = Number(event.target.value); } return ( These settings control the Remote API for bitburner. This is typically used to write scripts using an external text editor and then upload files to the home server. Documentation This port number is used to connect to a Remote API port, please ensure that it matches with your Remote API server port. Set to 0 to disable the feature. } > 0 && remoteFileApiPort <= 65535 ? "success" : "error"}> Port:  ), endAdornment: , }} value={remoteFileApiPort} onChange={handleRemoteFileApiPortChange} placeholder="12525" /> ); };