update the layout structure to improve UI
This commit is contained in:
1 parent
376b820ff4
commit
51d9719293
1 file changed
+33
-39
@@ -314,47 +314,41 @@ const Settings = () => {
|
|||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
)}
|
)}
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h1">{t("pageSpeedApiKeyFieldTitle")}</Typography>
|
<Typography component="h1">{t("pageSpeedApiKeyFieldTitle")}</Typography>
|
||||||
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(2) }}>
|
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(2) }}>
|
||||||
{t("pageSpeedApiKeyFieldDescription")}
|
{t("pageSpeedApiKeyFieldDescription")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Stack gap={theme.spacing(20)}>
|
||||||
<Stack direction="row" alignItems="center" gap={theme.spacing(4)}>
|
<TextInput
|
||||||
<Box flex={1}>
|
id="pagespeedApiKey"
|
||||||
<TextInput
|
label={t("pageSpeedApiKeyFieldLabel")}
|
||||||
id="pagespeedApiKey"
|
value={form.pagespeedApiKey}
|
||||||
label={t("pageSpeedApiKeyFieldLabel")}
|
type={apiKeyFieldType}
|
||||||
value={form.pagespeedApiKey}
|
onChange={handleChange}
|
||||||
type={apiKeyFieldType}
|
disabled={isApiKeySet}
|
||||||
onChange={handleChange}
|
optionalLabel="(Optional)"
|
||||||
disabled={isApiKeySet}
|
error={!!errors.pagespeedApiKey}
|
||||||
optionalLabel="(Optional)"
|
helperText={errors.pagespeedApiKey}
|
||||||
error={!!errors.pagespeedApiKey}
|
endAdornment={
|
||||||
helperText={errors.pagespeedApiKey}
|
!isApiKeySet && (
|
||||||
endAdornment={
|
<PasswordEndAdornment
|
||||||
!isApiKeySet && (
|
fieldType={apiKeyFieldType}
|
||||||
<PasswordEndAdornment
|
setFieldType={setApiKeyFieldType}
|
||||||
fieldType={apiKeyFieldType}
|
|
||||||
setFieldType={setApiKeyFieldType}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
{isApiKeySet && (
|
)
|
||||||
<Typography>
|
}
|
||||||
{t("pageSpeedApiKeyFieldResetLabel")}
|
/>
|
||||||
</Typography>
|
{isApiKeySet && (
|
||||||
)}
|
<Box>
|
||||||
</Box>
|
<Typography>{t("pageSpeedApiKeyFieldResetLabel")}</Typography>
|
||||||
{isApiKeySet && (
|
<Button onClick={handleResetApiKey} variant="contained" color="error" sx={{ mt: theme.spacing(4) }}>
|
||||||
<Button onClick={handleResetApiKey} variant="contained" color="error">
|
{t("reset")}
|
||||||
{t("reset")}
|
</Button>
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
|
|||||||
Reference in new issue
Block a user