Connection} subtitle={`${meta.label} server address and API key.`}>
setDraft((current) => ({ ...current, address: event.target.value }))}
+ onChange={(event) => {
+ if (!saving) {
+ setDraft((current) => ({ ...current, address: event.target.value }));
+ }
+ }}
placeholder="http://192.168.1.50:8096"
error={draft.address.trim() && !addressValid ? 'Enter a valid absolute http(s) URL' : null}
/>
setDraft((current) => ({ ...current, apiKey: event.target.value }))}
+ onChange={(event) => {
+ if (!saving) {
+ setDraft((current) => ({ ...current, apiKey: event.target.value }));
+ }
+ }}
placeholder={hasApiKey ? 'Key is set — leave blank to keep, or enter a new key' : 'Enter an API key'}
error={!apiKeyValid && draft.apiKey.length === 0 && !hasApiKey ? 'API key is required' : null}
/>