From c9dab8d83cd77dafd3dd6a0ebffead6d44114464 Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Thu, 20 Feb 2025 21:21:33 -0500 Subject: [PATCH] fix: improved dark mode styles, fixed bug in http. --- src/components/PageComponents/Connect/HTTP.tsx | 8 +++----- src/components/UI/Switch.tsx | 2 +- src/core/stores/appStore.ts | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/PageComponents/Connect/HTTP.tsx b/src/components/PageComponents/Connect/HTTP.tsx index e7f5c6af..1da0e416 100644 --- a/src/components/PageComponents/Connect/HTTP.tsx +++ b/src/components/PageComponents/Connect/HTTP.tsx @@ -8,7 +8,7 @@ import { useDeviceStore } from "@core/stores/deviceStore.ts"; import { subscribeAll } from "@core/subscriptions.ts"; import { randId } from "@core/utils/randId.ts"; import { HttpConnection } from "@meshtastic/js"; -import { useState } from "react"; +import { type JSX, useState } from "react"; import { Controller, useForm } from "react-hook-form"; export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => { @@ -68,15 +68,13 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => { <> { checked ? setHTTPS(true) : setHTTPS(false); }} - - disabled={ + disabled={ location.protocol === "https:" || connectionInProgress } - checked={value} + checked={https} {...rest} /> diff --git a/src/components/UI/Switch.tsx b/src/components/UI/Switch.tsx index 3a0bd38f..f664520a 100644 --- a/src/components/UI/Switch.tsx +++ b/src/components/UI/Switch.tsx @@ -9,7 +9,7 @@ const Switch = React.forwardRef< >(({ className, ...props }, ref) => (