update pagespeed input field jsx
This commit is contained in:
1 parent
d963fe65c1
commit
f2e8f16af8
1 file changed
+31
-15
@@ -321,22 +321,38 @@ const Settings = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<TextInput
|
<Stack direction="row" alignItems="center" gap={theme.spacing(4)}>
|
||||||
id="pagespeedApiKey"
|
<Box flex={1}>
|
||||||
label="PageSpeed API Key"
|
<TextInput
|
||||||
value={form.pagespeedApiKey}
|
id="pagespeedApiKey"
|
||||||
type={apiKeyFieldType}
|
label="PageSpeed API Key"
|
||||||
onChange={handleChange}
|
value={form.pagespeedApiKey}
|
||||||
optionalLabel="(Optional)"
|
type={apiKeyFieldType}
|
||||||
error={!!errors.pagespeedApiKey}
|
onChange={handleChange}
|
||||||
helperText={errors.pagespeedApiKey}
|
disabled={isApiKeySet}
|
||||||
endAdornment={
|
optionalLabel="(Optional)"
|
||||||
<PasswordEndAdornment
|
error={!!errors.pagespeedApiKey}
|
||||||
fieldType={apiKeyFieldType}
|
helperText={
|
||||||
setFieldType={setApiKeyFieldType}
|
isApiKeySet
|
||||||
|
? "API key is set. Click Reset to change it."
|
||||||
|
: errors.pagespeedApiKey
|
||||||
|
}
|
||||||
|
endAdornment={
|
||||||
|
!isApiKeySet && (
|
||||||
|
<PasswordEndAdornment
|
||||||
|
fieldType={apiKeyFieldType}
|
||||||
|
setFieldType={setApiKeyFieldType}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
}
|
</Box>
|
||||||
/>
|
{isApiKeySet && (
|
||||||
|
<Button onClick={handleResetApiKey} variant="outlined">
|
||||||
|
Reset
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
|
|||||||
Reference in new issue
Block a user