({
defaultValues: {
ip: ["client.meshtastic.org", "localhost"].includes(
- window.location.hostname,
+ globalThis.location.hostname,
)
? "meshtastic.local"
- : window.location.host,
+ : globalThis.location.host,
tls: isURLHTTPS ? true : false,
},
});
@@ -42,7 +42,6 @@ export const HTTP = ({ closeDialog }: TabElementProps) => {
field: { value: tlsValue, onChange: setTLS },
} = useController({ name: "tls", control });
- const [connectionInProgress, setConnectionInProgress] = useState(false);
const [connectionError, setConnectionError] = useState<{ host: string; secure: boolean } | null>(null);
const onSubmit = handleSubmit(async (data) => {
@@ -76,14 +75,13 @@ export const HTTP = ({ closeDialog }: TabElementProps) => {
prefix={tlsValue ? "https://" : "http://"}
placeholder="000.000.000.000 / meshtastic.local"
className="text-slate-900 dark:text-slate-900"
- disabled={connectionInProgress}
{...register("ip")}
/>
@@ -122,7 +120,6 @@ export const HTTP = ({ closeDialog }: TabElementProps) => {