fix: stop checking for mkey prefix on registration (#131)

String "mkey:" was being appended to the node registration http request causing it to fail. Removed mkey presence check and changed default hint. Form validation is based on length instead.
This commit is contained in:
bitbronze
2025-03-11 22:24:31 +03:00
committed by GitHub
parent 21af5c4a4d
commit 45537620a6
+2 -2
View File
@@ -21,7 +21,7 @@ export default function New(data: NewProps) {
return (
<>
<Dialog isOpen={pushDialog} onOpenChange={setPushDialog}>
<Dialog.Panel isDisabled={!mkey.trim().startsWith('mkey:')}>
<Dialog.Panel isDisabled={mkey.length < 1}>
<Dialog.Title>Register Machine Key</Dialog.Title>
<Dialog.Text className="mb-4">
The machine key is given when you run{' '}
@@ -36,7 +36,7 @@ export default function New(data: NewProps) {
<Input
isRequired
label="Machine Key"
placeholder="mkey:ff....."
placeholder="AbCd..."
validationBehavior="native"
name="mkey"
onChange={setMkey}