mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Add autocomplete attribute to credential fields
Prevent browsers from automatically autofilling the password entry box for the Factorio credentials by setting the autocomplete property to new-password on the password input.
This commit is contained in:
1 parent
44e5847a1d
commit
f873f4b369
3 files changed
+13
-3
No files matched your search
@@ -44,12 +44,12 @@ function renderInput(inputComponents: Record<string, InputComponent>, def: lib.F
|
||||
}
|
||||
if (def.type === "string") {
|
||||
if (def.credential) {
|
||||
return <Input.Password/>;
|
||||
return <Input.Password autoComplete={def.autoComplete} />;
|
||||
}
|
||||
return <Input/>;
|
||||
return <Input autoComplete={def.autoComplete} />;
|
||||
}
|
||||
if (def.type === "number") {
|
||||
return <InputNumber/>;
|
||||
return <InputNumber autoComplete={def.autoComplete} />;
|
||||
}
|
||||
|
||||
return `Unknown type ${def.type}`;
|
||||
|
||||
Reference in new issue
Block a user