1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Merge branch 'new-channel-bandwidth' into 'dev'

New channel bandwidth & Natural Sort of options

Closes reforis#200

See merge request turris/reforis/foris-js!118
This commit is contained in:
Aleksandr Gumroian 2020-07-17 16:27:27 +02:00
commit 5dbc58d44b
3 changed files with 9 additions and 7 deletions

View File

@ -28,10 +28,11 @@ export function Select({
}) {
const uid = useUID();
const options = Object.keys(choices).map(
const options = Object.keys(choices).sort(
(a, b) => a - b || a.toString().localeCompare(b.toString()),
).map(
(key) => <option key={key} value={key}>{choices[key]}</option>,
);
return (
<div className="form-group">
<label htmlFor={uid}>{label}</label>

View File

@ -617,11 +617,6 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ id=\\"8\\"
+ >
+ <option
+ value=\\"NOHT\\"
+ >
+ Disabled
+ </option>
+ <option
+ value=\\"HT20\\"
+ >
+ 802.11n - 20 MHz wide channel
@ -632,6 +627,11 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ 802.11n - 40 MHz wide channel
+ </option>
+ <option
+ value=\\"NOHT\\"
+ >
+ Disabled
+ </option>
+ <option
+ value=\\"VHT20\\"
+ >
+ 802.11ac - 20 MHz wide channel

View File

@ -12,6 +12,7 @@ export const HTMODES = {
VHT20: _("802.11ac - 20 MHz wide channel"),
VHT40: _("802.11ac - 40 MHz wide channel"),
VHT80: _("802.11ac - 80 MHz wide channel"),
VHT160: _("802.11ac - 160 MHz wide channel"),
};
export const HWMODES = {
"11g": "2.4",