Merge branch 'develop' of bitbucket.org:mavsystemsltd/mav-in-car-fe into feature/soundsettings

This commit is contained in:
2025-10-03 14:59:04 +01:00
5 changed files with 55 additions and 12 deletions

View File

@@ -3,8 +3,12 @@ import FormGroup from "../components/FormGroup";
import type { WifiSettingValues } from "../../../types/types";
import { useWifiAndModem } from "../../../hooks/useCameraWifiandModem";
import { toast } from "sonner";
import { useState } from "react";
import { faEyeSlash, faEye } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
const WiFiSettingsForm = () => {
const [showPwd, setShowPwd] = useState(false);
const { wifiQuery, wifiMutation } = useWifiAndModem();
const wifiSSID = wifiQuery?.data?.propSSID?.value;
@@ -32,7 +36,7 @@ const WiFiSettingsForm = () => {
};
wifiMutation.mutate(wifiConfig);
//todo: check what response is
if (wifiMutation.error) {
toast.error("Failed to update WiFi settings");
return;
@@ -72,10 +76,16 @@ const WiFiSettingsForm = () => {
<Field
id="password"
name="password"
type="password"
type={showPwd ? "text" : "password"}
className="p-1.5 border border-gray-400 rounded-lg"
placeholder="Enter Password"
/>
<FontAwesomeIcon
type="button"
className="absolute right-5 end-0"
onClick={() => setShowPwd((s) => !s)}
icon={showPwd ? faEyeSlash : faEye}
/>
</FormGroup>
<FormGroup>
<label