foris 6.11.1 → 6.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,8 @@ import React from "react";
|
|
|
9
9
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
|
|
12
|
-
import { HELP_TEXTS, HTMODES, BANDS
|
|
12
|
+
import { HELP_TEXTS, HTMODES, BANDS } from "./constants";
|
|
13
|
+
import getEncryptionChoices from "./encryptionHelpers";
|
|
13
14
|
import WifiGuestForm from "./WiFiGuestForm";
|
|
14
15
|
import WiFiQRCode from "./WiFiQRCode";
|
|
15
16
|
import PasswordInput from "../../bootstrap/PasswordInput";
|
|
@@ -175,9 +176,13 @@ function DeviceForm({
|
|
|
175
176
|
channel: { $set: "0" },
|
|
176
177
|
htmode: { $set: bestHtmode },
|
|
177
178
|
};
|
|
178
|
-
// The 6 GHz band supports only WPA3
|
|
179
|
+
// The 6 GHz band supports only WPA3, both for the
|
|
180
|
+
// main and for the guest network
|
|
179
181
|
if (value === "6g") {
|
|
180
182
|
deviceUpdate.encryption = { $set: "WPA3" };
|
|
183
|
+
deviceUpdate.guest_wifi = {
|
|
184
|
+
encryption: { $set: "WPA3" },
|
|
185
|
+
};
|
|
181
186
|
}
|
|
182
187
|
return {
|
|
183
188
|
devices: {
|
|
@@ -215,7 +220,10 @@ function DeviceForm({
|
|
|
215
220
|
|
|
216
221
|
<Select
|
|
217
222
|
label={_("Encryption")}
|
|
218
|
-
choices={getEncryptionChoices(
|
|
223
|
+
choices={getEncryptionChoices(
|
|
224
|
+
formData.band,
|
|
225
|
+
formData.encryption
|
|
226
|
+
)}
|
|
219
227
|
helpText={HELP_TEXTS.wpa3}
|
|
220
228
|
value={formData.encryption}
|
|
221
229
|
onChange={setFormValue((value) => ({
|
|
@@ -255,6 +263,7 @@ function DeviceForm({
|
|
|
255
263
|
...formData.guest_wifi,
|
|
256
264
|
}}
|
|
257
265
|
formErrors={formErrors.guest_wifi || {}}
|
|
266
|
+
band={formData.band}
|
|
258
267
|
setFormValue={setFormValue}
|
|
259
268
|
{...props}
|
|
260
269
|
/>
|
|
@@ -306,15 +315,3 @@ function getBandChoices(device) {
|
|
|
306
315
|
value: availableBand.band,
|
|
307
316
|
}));
|
|
308
317
|
}
|
|
309
|
-
|
|
310
|
-
function getEncryptionChoices(device) {
|
|
311
|
-
if (device.encryption === "custom") {
|
|
312
|
-
ENCRYPTIONMODES.custom = _("Custom");
|
|
313
|
-
}
|
|
314
|
-
if (device.band === "6g") {
|
|
315
|
-
return {
|
|
316
|
-
WPA3: ENCRYPTIONMODES.WPA3,
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
return ENCRYPTIONMODES;
|
|
320
|
-
}
|
|
@@ -9,7 +9,8 @@ import React from "react";
|
|
|
9
9
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
|
|
12
|
-
import { HELP_TEXTS
|
|
12
|
+
import { HELP_TEXTS } from "./constants";
|
|
13
|
+
import getEncryptionChoices from "./encryptionHelpers";
|
|
13
14
|
import WiFiQRCode from "./WiFiQRCode";
|
|
14
15
|
import PasswordInput from "../../bootstrap/PasswordInput";
|
|
15
16
|
import Select from "../../bootstrap/Select";
|
|
@@ -30,6 +31,8 @@ WifiGuestForm.propTypes = {
|
|
|
30
31
|
}),
|
|
31
32
|
setFormValue: PropTypes.func.isRequired,
|
|
32
33
|
deviceIndex: PropTypes.string,
|
|
34
|
+
/** Band of the device the guest network shares the radio with. */
|
|
35
|
+
band: PropTypes.string,
|
|
33
36
|
};
|
|
34
37
|
|
|
35
38
|
export default function WifiGuestForm({
|
|
@@ -37,6 +40,7 @@ export default function WifiGuestForm({
|
|
|
37
40
|
formErrors,
|
|
38
41
|
setFormValue,
|
|
39
42
|
deviceIndex,
|
|
43
|
+
band,
|
|
40
44
|
...props
|
|
41
45
|
}) {
|
|
42
46
|
return (
|
|
@@ -93,7 +97,10 @@ export default function WifiGuestForm({
|
|
|
93
97
|
/>
|
|
94
98
|
<Select
|
|
95
99
|
label={_("Encryption")}
|
|
96
|
-
choices={
|
|
100
|
+
choices={getEncryptionChoices(
|
|
101
|
+
band,
|
|
102
|
+
formData.encryption
|
|
103
|
+
)}
|
|
97
104
|
helpText={HELP_TEXTS.wpa3}
|
|
98
105
|
value={formData.encryption}
|
|
99
106
|
onChange={setFormValue((value) => ({
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019-2026 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
|
3
|
+
*
|
|
4
|
+
* This is free software, licensed under the GNU General Public License v3.
|
|
5
|
+
* See /LICENSE for more information.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { ENCRYPTIONMODES } from "./constants";
|
|
9
|
+
|
|
10
|
+
// Both the main and the guest network run on the same radio, so the band
|
|
11
|
+
// limits the encryption choices of both of them.
|
|
12
|
+
export default function getEncryptionChoices(band, encryption) {
|
|
13
|
+
if (band === "6g") {
|
|
14
|
+
return { WPA3: ENCRYPTIONMODES.WPA3 };
|
|
15
|
+
}
|
|
16
|
+
if (encryption === "custom") {
|
|
17
|
+
return { ...ENCRYPTIONMODES, custom: _("Custom") };
|
|
18
|
+
}
|
|
19
|
+
return ENCRYPTIONMODES;
|
|
20
|
+
}
|
package/foris-6.11.2.tgz
ADDED
|
Binary file
|
package/package.json
CHANGED
package/foris-6.11.1.tgz
DELETED
|
Binary file
|