add new inputfield for api key in settings
This commit is contained in:
1 parent
911d9e4ca1
commit
d58dee6983
1 file changed
+21
@@ -54,6 +54,7 @@ const Settings = () => {
|
|||||||
const [form, setForm] = useState({
|
const [form, setForm] = useState({
|
||||||
enableDistributedUptime: distributedUptimeEnabled,
|
enableDistributedUptime: distributedUptimeEnabled,
|
||||||
ttl: checkTTL ? (checkTTL / SECONDS_PER_DAY).toString() : 0,
|
ttl: checkTTL ? (checkTTL / SECONDS_PER_DAY).toString() : 0,
|
||||||
|
pagespeedApiKey: "",
|
||||||
});
|
});
|
||||||
const [version, setVersion] = useState("unknown");
|
const [version, setVersion] = useState("unknown");
|
||||||
const [errors, setErrors] = useState({});
|
const [errors, setErrors] = useState({});
|
||||||
@@ -277,6 +278,26 @@ const Settings = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
)}
|
)}
|
||||||
|
<ConfigBox>
|
||||||
|
<Box>
|
||||||
|
<Typography component="h1">Google Pagespeed API Key</Typography>
|
||||||
|
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(2) }}>
|
||||||
|
Manage your pagespeed API key
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<TextInput
|
||||||
|
id="pagespeedApiKey"
|
||||||
|
label="PageSpeed API Key"
|
||||||
|
value={form.pagespeedApiKey}
|
||||||
|
onChange={handleChange}
|
||||||
|
type="password"
|
||||||
|
optionalLabel="(Optional)"
|
||||||
|
helperText={errors.pagespeedApiKey}
|
||||||
|
error={!!errors.pagespeedApiKey}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</ConfigBox>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<ConfigBox>
|
<ConfigBox>
|
||||||
<Box>
|
<Box>
|
||||||
|
|||||||
Reference in new issue
Block a user