From 6ffd9f76eb7e23c8fab293885b4734786c5038f5 Mon Sep 17 00:00:00 2001 From: balsa-asanovic Date: Thu, 14 Sep 2023 00:16:46 +0200 Subject: [PATCH 01/44] added show button to the WiFi password input --- .../components/network/WifiConnectionForm.jsx | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/web/src/components/network/WifiConnectionForm.jsx b/web/src/components/network/WifiConnectionForm.jsx index 514d72c3e6..3c219a13c6 100644 --- a/web/src/components/network/WifiConnectionForm.jsx +++ b/web/src/components/network/WifiConnectionForm.jsx @@ -65,6 +65,7 @@ export default function WifiConnectionForm({ network, onCancel, onSubmitCallback const [password, setPassword] = useState(network?.password || ""); const [security, setSecurity] = useState(securityFrom(network?.security || [])); const hidden = network?.hidden || false; + const [showPassword, setShowPassword] = useState(false); useEffect(() => { setTimeout(() => { formRef.current?.scrollIntoView({ behavior: "smooth" }) }, 200); @@ -118,15 +119,27 @@ export default function WifiConnectionForm({ network, onCancel, onSubmitCallback { security === "wpa-psk" && // TRANSLATORS: WiFi password - +
+ + +
} - + id="password_visibility" + name="password_visibility" + aria-label={_("Password visibility button")} + label={_("Password visibility button")} + variant="control" + onClick={() => setShowPassword((prev) => !prev)} + icon={showPassword + ? + : } + /> + }