aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPushpender Saini <54404738+PushpenderSaini0@users.noreply.github.com>2021-07-30 20:45:00 +0530
committerGitHub <noreply@github.com>2021-07-30 08:15:00 -0700
commitd240bc3db52495899b93335ad561c4de6d79ad48 (patch)
treed84279d86ec42e959fdc4df8facef073c7f42d07 /src
parent152584720e36b05111d90a584bc13f7dd8259f84 (diff)
Add checkbox state to fix issue (#134)
* Add checkbox state to fix issue: 'None' Encryption disable Checkbox of 'Hide password field before printing' * Checkbox implimentation with newtork.hidePassword * Remove hidePassword from line :191 and :202
Diffstat (limited to 'src')
-rw-r--r--src/components/Card.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/components/Card.js b/src/components/Card.js
index 856085f..6818320 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -146,6 +146,7 @@ export const Card = ({ direction = 'ltr' }) => {
146 <input 146 <input
147 type="checkbox" 147 type="checkbox"
148 id="hide-password-checkbox" 148 id="hide-password-checkbox"
149 checked={network.hidePassword}
149 disabled={disableHidePassword()} 150 disabled={disableHidePassword()}
150 className={network.encryptionMode === 'nopass' ? 'hidden' : ''} 151 className={network.encryptionMode === 'nopass' ? 'hidden' : ''}
151 onChange={() => 152 onChange={() =>
@@ -178,6 +179,7 @@ export const Card = ({ direction = 'ltr' }) => {
178 ...network, 179 ...network,
179 encryptionMode: e.target.value, 180 encryptionMode: e.target.value,
180 password: '', 181 password: '',
182 hidePassword: false,
181 }); 183 });
182 }} 184 }}
183 /> 185 />
@@ -188,7 +190,10 @@ export const Card = ({ direction = 'ltr' }) => {
188 id="encrypt-wpa-wpa2-wpa3" 190 id="encrypt-wpa-wpa2-wpa3"
189 value="WPA" 191 value="WPA"
190 onChange={(e) => 192 onChange={(e) =>
191 setNetwork({ ...network, encryptionMode: e.target.value }) 193 setNetwork({
194 ...network,
195 encryptionMode: e.target.value,
196 })
192 } 197 }
193 defaultChecked 198 defaultChecked
194 /> 199 />
@@ -199,7 +204,10 @@ export const Card = ({ direction = 'ltr' }) => {
199 id="encrypt-wep" 204 id="encrypt-wep"
200 value="WEP" 205 value="WEP"
201 onChange={(e) => 206 onChange={(e) =>
202 setNetwork({ ...network, encryptionMode: e.target.value }) 207 setNetwork({
208 ...network,
209 encryptionMode: e.target.value,
210 })
203 } 211 }
204 /> 212 />
205 <label htmlFor="encrypt-wep">WEP</label> 213 <label htmlFor="encrypt-wep">WEP</label>