diff options
Diffstat (limited to 'src/components/WifiCard.js')
| -rw-r--r-- | src/components/WifiCard.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/WifiCard.js b/src/components/WifiCard.js index 70e1189..e977ac8 100644 --- a/src/components/WifiCard.js +++ b/src/components/WifiCard.js | |||
| @@ -8,7 +8,7 @@ import { | |||
| 8 | Text, | 8 | Text, |
| 9 | TextareaField, | 9 | TextareaField, |
| 10 | } from 'evergreen-ui'; | 10 | } from 'evergreen-ui'; |
| 11 | import QRCode from 'qrcode.react'; | 11 | import { QRCodeSVG as QRCode } from 'qrcode.react'; |
| 12 | import { useEffect, useState } from 'react'; | 12 | import { useEffect, useState } from 'react'; |
| 13 | import { useTranslation } from 'react-i18next'; | 13 | import { useTranslation } from 'react-i18next'; |
| 14 | import logo from '../../src/images/wifi.png'; | 14 | import logo from '../../src/images/wifi.png'; |
| @@ -71,6 +71,9 @@ export const WifiCard = (props) => { | |||
| 71 | return !eapIdentityFieldLabel() ? '' : t('wifi.encryption.eapMethod'); | 71 | return !eapIdentityFieldLabel() ? '' : t('wifi.encryption.eapMethod'); |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | const keyid = props.keyid || ''; | ||
| 75 | const suffixKeyID = (prefix) => `${prefix}-${keyid}`; | ||
| 76 | |||
| 74 | return ( | 77 | return ( |
| 75 | <Card | 78 | <Card |
| 76 | className="card-print" | 79 | className="card-print" |
| @@ -102,7 +105,7 @@ export const WifiCard = (props) => { | |||
| 102 | 105 | ||
| 103 | <Pane width={'100%'}> | 106 | <Pane width={'100%'}> |
| 104 | <TextareaField | 107 | <TextareaField |
| 105 | id="ssid" | 108 | id={suffixKeyID('ssid')} |
| 106 | type="text" | 109 | type="text" |
| 107 | marginBottom={5} | 110 | marginBottom={5} |
| 108 | autoComplete="off" | 111 | autoComplete="off" |
| @@ -120,7 +123,7 @@ export const WifiCard = (props) => { | |||
| 120 | {props.settings.encryptionMode === 'WPA2-EAP' && ( | 123 | {props.settings.encryptionMode === 'WPA2-EAP' && ( |
| 121 | <> | 124 | <> |
| 122 | <TextareaField | 125 | <TextareaField |
| 123 | id="eapmethod" | 126 | id={suffixKeyID('eapmethod')} |
| 124 | type="text" | 127 | type="text" |
| 125 | marginBottom={5} | 128 | marginBottom={5} |
| 126 | readOnly={true} | 129 | readOnly={true} |
| @@ -130,7 +133,7 @@ export const WifiCard = (props) => { | |||
| 130 | /> | 133 | /> |
| 131 | 134 | ||
| 132 | <TextareaField | 135 | <TextareaField |
| 133 | id="identity" | 136 | id={suffixKeyID('identity')} |
| 134 | type="text" | 137 | type="text" |
| 135 | marginBottom={5} | 138 | marginBottom={5} |
| 136 | autoComplete="off" | 139 | autoComplete="off" |
| @@ -150,7 +153,7 @@ export const WifiCard = (props) => { | |||
| 150 | )} | 153 | )} |
| 151 | {!(props.settings.hidePassword || !props.settings.encryptionMode) && ( | 154 | {!(props.settings.hidePassword || !props.settings.encryptionMode) && ( |
| 152 | <TextareaField | 155 | <TextareaField |
| 153 | id="password" | 156 | id={suffixKeyID('password')} |
| 154 | type="text" | 157 | type="text" |
| 155 | maxLength="63" | 158 | maxLength="63" |
| 156 | autoComplete="off" | 159 | autoComplete="off" |
