diff --git a/frontend/src/basic/RobotPage/Onboarding.tsx b/frontend/src/basic/RobotPage/Onboarding.tsx index aacfe730..a445ced5 100644 --- a/frontend/src/basic/RobotPage/Onboarding.tsx +++ b/frontend/src/basic/RobotPage/Onboarding.tsx @@ -108,6 +108,7 @@ const Onboarding = ({ ) : ( void; inputToken: string; + autoFocusTarget?: 'textfield' | 'copyButton' | 'none'; onPressEnter: () => void; badRequest: string | undefined; setInputToken: (state: string) => void; @@ -42,12 +30,12 @@ const TokenInput = ({ showDownload = false, fullWidth = true, onPressEnter, + autoFocusTarget = 'textfield', inputToken, badRequest, setInputToken, }: TokenInputProps): JSX.Element => { const { t } = useTranslation(); - const theme = useTheme(); const [showCopied, setShowCopied] = useState(false); const createJsonFile = () => { return { @@ -66,7 +54,7 @@ const TokenInput = ({ required={true} label={label ? label : undefined} value={inputToken} - autoFocus + autoFocus={autoFocusTarget == 'texfield' ? true : false} fullWidth={fullWidth} sx={{ borderColor: 'primary' }} variant={editable ? 'outlined' : 'filled'} @@ -93,6 +81,7 @@ const TokenInput = ({ endAdornment: showCopy ? ( { systemClient.copyToClipboard(inputToken); diff --git a/frontend/src/basic/RobotPage/index.tsx b/frontend/src/basic/RobotPage/index.tsx index 903b11d7..b9af4dd6 100644 --- a/frontend/src/basic/RobotPage/index.tsx +++ b/frontend/src/basic/RobotPage/index.tsx @@ -152,7 +152,7 @@ const RobotPage = ({ setTimeout(() => setRobot(new Robot()), 10); }; - if (window?.NativeRobosats & (torStatus != 'DONE')) { + if (!(window.NativeRobosats === undefined) && !(torStatus == 'DONE' || torStatus == '"Done"')) { return (