mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-11-14 17:35:35 +01:00
Compare commits
2 Commits
c5b020c1e9
...
d6945157be
Author | SHA1 | Date | |
---|---|---|---|
|
d6945157be | ||
|
8348179b55 |
|
@ -8,6 +8,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Switch } from "../../bootstrap/Switch";
|
import { Switch } from "../../bootstrap/Switch";
|
||||||
|
import { CheckBox } from "../../bootstrap/CheckBox";
|
||||||
import { PasswordInput } from "../../bootstrap/PasswordInput";
|
import { PasswordInput } from "../../bootstrap/PasswordInput";
|
||||||
import { RadioSet } from "../../bootstrap/RadioSet";
|
import { RadioSet } from "../../bootstrap/RadioSet";
|
||||||
import { Select } from "../../bootstrap/Select";
|
import { Select } from "../../bootstrap/Select";
|
||||||
|
@ -64,7 +65,7 @@ DeviceForm.propTypes = {
|
||||||
guest_wifi: PropTypes.object.isRequired,
|
guest_wifi: PropTypes.object.isRequired,
|
||||||
encryption: PropTypes.string.isRequired,
|
encryption: PropTypes.string.isRequired,
|
||||||
available_bands: PropTypes.array.isRequired,
|
available_bands: PropTypes.array.isRequired,
|
||||||
ieee80211w_disabled: PropTypes.bool.isRequired,
|
"80211w": PropTypes.bool.isRequired,
|
||||||
}),
|
}),
|
||||||
formErrors: PropTypes.object.isRequired,
|
formErrors: PropTypes.object.isRequired,
|
||||||
setFormValue: PropTypes.func.isRequired,
|
setFormValue: PropTypes.func.isRequired,
|
||||||
|
@ -227,11 +228,11 @@ function DeviceForm({
|
||||||
helpText={_(
|
helpText={_(
|
||||||
"In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection."
|
"In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection."
|
||||||
)}
|
)}
|
||||||
checked={formData.ieee80211w_disabled}
|
checked={formData["80211w"]}
|
||||||
onChange={setFormValue((value) => ({
|
onChange={setFormValue((value) => ({
|
||||||
devices: {
|
devices: {
|
||||||
[deviceIndex]: {
|
[deviceIndex]: {
|
||||||
ieee80211w_disabled: { $set: value },
|
"80211w": { $set: value },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))}
|
}))}
|
||||||
|
|
|
@ -59,10 +59,6 @@ function prepDataToSubmit(formData) {
|
||||||
|
|
||||||
if (!device.guest_wifi.enabled)
|
if (!device.guest_wifi.enabled)
|
||||||
formData.devices[idx].guest_wifi = { enabled: false };
|
formData.devices[idx].guest_wifi = { enabled: false };
|
||||||
|
|
||||||
if (device.encryption === "WPA2") {
|
|
||||||
delete formData.devices[idx].ieee80211w_disabled;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -524,10 +524,92 @@
|
@@ -500,10 +500,92 @@
|
||||||
>
|
>
|
||||||
Enables Wi-Fi for guests, which is separated from LAN network. Devices connected to this network are allowed to access the internet, but aren't allowed to access other devices and the configuration interface of the router. Parameters of the guest network can be set in the Guest network tab.
|
Enables Wi-Fi for guests, which is separated from LAN network. Devices connected to this network are allowed to access the internet, but aren't allowed to access other devices and the configuration interface of the router. Parameters of the guest network can be set in the Guest network tab.
|
||||||
</small>
|
</small>
|
||||||
|
@ -347,7 +347,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ class=\\"form-group\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ for=\\"24\\"
|
+ for=\\"22\\"
|
||||||
+ >
|
+ >
|
||||||
+ SSID
|
+ SSID
|
||||||
+ </label>
|
+ </label>
|
||||||
|
@ -356,7 +356,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
+ <input
|
||||||
+ class=\\"form-control\\"
|
+ class=\\"form-control\\"
|
||||||
+ id=\\"24\\"
|
+ id=\\"22\\"
|
||||||
+ type=\\"text\\"
|
+ type=\\"text\\"
|
||||||
+ value=\\"TestGuestSSID\\"
|
+ value=\\"TestGuestSSID\\"
|
||||||
+ />
|
+ />
|
||||||
|
@ -386,7 +386,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ class=\\"form-group\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ for=\\"25\\"
|
+ for=\\"23\\"
|
||||||
+ >
|
+ >
|
||||||
+ Password
|
+ Password
|
||||||
+ </label>
|
+ </label>
|
||||||
|
@ -396,7 +396,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ <input
|
+ <input
|
||||||
+ autocomplete=\\"current-password\\"
|
+ autocomplete=\\"current-password\\"
|
||||||
+ class=\\"form-control is-invalid\\"
|
+ class=\\"form-control is-invalid\\"
|
||||||
+ id=\\"25\\"
|
+ id=\\"23\\"
|
||||||
+ required=\\"\\"
|
+ required=\\"\\"
|
||||||
+ type=\\"password\\"
|
+ type=\\"password\\"
|
||||||
+ value=\\"\\"
|
+ value=\\"\\"
|
||||||
|
@ -430,7 +430,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
class=\\"form-group switch\\"
|
class=\\"form-group switch\\"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -551,10 +633,11 @@
|
@@ -527,10 +609,11 @@
|
||||||
<div
|
<div
|
||||||
class=\\"text-right\\"
|
class=\\"text-right\\"
|
||||||
>
|
>
|
||||||
|
@ -449,7 +449,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -22,10 +22,512 @@
|
@@ -22,10 +22,488 @@
|
||||||
Wi-Fi 1
|
Wi-Fi 1
|
||||||
</h2>
|
</h2>
|
||||||
</label>
|
</label>
|
||||||
|
@ -537,7 +537,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ class=\\"form-group\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"custom-control custom-switch\\"
|
+ class=\\"custom-control custom-checkbox \\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
+ <input
|
||||||
+ class=\\"custom-control-input\\"
|
+ class=\\"custom-control-input\\"
|
||||||
|
@ -549,12 +549,12 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ for=\\"6\\"
|
+ for=\\"6\\"
|
||||||
+ >
|
+ >
|
||||||
+ Hide SSID
|
+ Hide SSID
|
||||||
|
+ <small
|
||||||
|
+ class=\\"form-text text-muted\\"
|
||||||
|
+ >
|
||||||
|
+ If set, network is not visible when scanning for available networks.
|
||||||
|
+ </small>
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <small
|
|
||||||
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
|
||||||
+ >
|
|
||||||
+ If set, network is not visible when scanning for available networks.
|
|
||||||
+ </small>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
|
@ -924,30 +924,6 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ class=\\"custom-control-label\\"
|
+ class=\\"custom-control-label\\"
|
||||||
+ for=\\"11\\"
|
+ for=\\"11\\"
|
||||||
+ >
|
+ >
|
||||||
+ Disable Management Frame Protection
|
|
||||||
+ </label>
|
|
||||||
+ <small
|
|
||||||
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
|
||||||
+ >
|
|
||||||
+ In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection.
|
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
|
||||||
+ <div
|
|
||||||
+ class=\\"form-group\\"
|
|
||||||
+ >
|
|
||||||
+ <div
|
|
||||||
+ class=\\"custom-control custom-switch\\"
|
|
||||||
+ >
|
|
||||||
+ <input
|
|
||||||
+ class=\\"custom-control-input\\"
|
|
||||||
+ id=\\"12\\"
|
|
||||||
+ type=\\"checkbox\\"
|
|
||||||
+ />
|
|
||||||
+ <label
|
|
||||||
+ class=\\"custom-control-label\\"
|
|
||||||
+ for=\\"12\\"
|
|
||||||
+ >
|
|
||||||
+ Enable Guest Wi-Fi
|
+ Enable Guest Wi-Fi
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <small
|
+ <small
|
||||||
|
|
Loading…
Reference in New Issue
Block a user