foris 6.5.0-beta.a63b5bfa → 6.5.0-beta.c7087eab
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.
package/bootstrap/NumberInput.js
CHANGED
|
@@ -50,6 +50,20 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
|
|
|
50
50
|
-1
|
|
51
51
|
);
|
|
52
52
|
|
|
53
|
+
function handleKeyDown(event, enableFunction) {
|
|
54
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
enableFunction(true);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function handleKeyUp(event, enableFunction) {
|
|
61
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
enableFunction(false);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
53
67
|
return (
|
|
54
68
|
<Input type="number" onChange={onChange} value={value} {...props}>
|
|
55
69
|
{inlineText && (
|
|
@@ -60,7 +74,15 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
|
|
|
60
74
|
className="btn btn-outline-secondary"
|
|
61
75
|
onMouseDown={() => enableIncrease(true)}
|
|
62
76
|
onMouseUp={() => enableIncrease(false)}
|
|
63
|
-
|
|
77
|
+
onMouseLeave={() => enableIncrease(false)}
|
|
78
|
+
onTouchStart={() => enableIncrease(true)}
|
|
79
|
+
onTouchEnd={() => enableIncrease(false)}
|
|
80
|
+
onTouchCancel={() => enableIncrease(false)}
|
|
81
|
+
onKeyDown={(event) => handleKeyDown(event, enableIncrease)}
|
|
82
|
+
onKeyUp={(event) => handleKeyUp(event, enableIncrease)}
|
|
83
|
+
onBlur={() => enableIncrease(false)}
|
|
84
|
+
title={_("Increase value. Hint: Hold to increase faster.")}
|
|
85
|
+
aria-label={_("Increase value. Hint: Hold to increase faster.")}
|
|
64
86
|
>
|
|
65
87
|
<FontAwesomeIcon icon={faPlus} />
|
|
66
88
|
</button>
|
|
@@ -69,7 +91,15 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
|
|
|
69
91
|
className="btn btn-outline-secondary"
|
|
70
92
|
onMouseDown={() => enableDecrease(true)}
|
|
71
93
|
onMouseUp={() => enableDecrease(false)}
|
|
72
|
-
|
|
94
|
+
onMouseLeave={() => enableDecrease(false)}
|
|
95
|
+
onTouchStart={() => enableDecrease(true)}
|
|
96
|
+
onTouchEnd={() => enableDecrease(false)}
|
|
97
|
+
onTouchCancel={() => enableDecrease(false)}
|
|
98
|
+
onKeyDown={(event) => handleKeyDown(event, enableDecrease)}
|
|
99
|
+
onKeyUp={(event) => handleKeyUp(event, enableDecrease)}
|
|
100
|
+
onBlur={() => enableDecrease(false)}
|
|
101
|
+
title={_("Decrease value. Hint: Hold to decrease faster.")}
|
|
102
|
+
aria-label={_("Decrease value. Hint: Hold to decrease faster.")}
|
|
73
103
|
>
|
|
74
104
|
<FontAwesomeIcon icon={faMinus} />
|
|
75
105
|
</button>
|
|
@@ -9,9 +9,10 @@ import React from "react";
|
|
|
9
9
|
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
|
|
12
|
-
import { HELP_TEXTS } from "./constants";
|
|
12
|
+
import { HELP_TEXTS, ENCRYPTIONMODES } from "./constants";
|
|
13
13
|
import WiFiQRCode from "./WiFiQRCode";
|
|
14
14
|
import PasswordInput from "../../bootstrap/PasswordInput";
|
|
15
|
+
import Select from "../../bootstrap/Select";
|
|
15
16
|
import Switch from "../../bootstrap/Switch";
|
|
16
17
|
import TextInput from "../../bootstrap/TextInput";
|
|
17
18
|
|
|
@@ -21,6 +22,7 @@ WifiGuestForm.propTypes = {
|
|
|
21
22
|
SSID: PropTypes.string.isRequired,
|
|
22
23
|
password: PropTypes.string.isRequired,
|
|
23
24
|
enabled: PropTypes.bool.isRequired,
|
|
25
|
+
encryption: PropTypes.string.isRequired,
|
|
24
26
|
}),
|
|
25
27
|
formErrors: PropTypes.shape({
|
|
26
28
|
SSID: PropTypes.string,
|
|
@@ -89,6 +91,20 @@ export default function WifiGuestForm({
|
|
|
89
91
|
}))}
|
|
90
92
|
{...props}
|
|
91
93
|
/>
|
|
94
|
+
<Select
|
|
95
|
+
label={_("Encryption")}
|
|
96
|
+
choices={ENCRYPTIONMODES}
|
|
97
|
+
helpText={HELP_TEXTS.wpa3}
|
|
98
|
+
value={formData.encryption}
|
|
99
|
+
onChange={setFormValue((value) => ({
|
|
100
|
+
devices: {
|
|
101
|
+
[formData.id]: {
|
|
102
|
+
guest_wifi: { encryption: { $set: value } },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
}))}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
92
108
|
</>
|
|
93
109
|
) : null}
|
|
94
110
|
</>
|
|
@@ -12,10 +12,12 @@ export const HTMODES = {
|
|
|
12
12
|
VHT20: _("802.11ac - 20 MHz wide channel"),
|
|
13
13
|
VHT40: _("802.11ac - 40 MHz wide channel"),
|
|
14
14
|
VHT80: _("802.11ac - 80 MHz wide channel"),
|
|
15
|
+
VHT80_80: _("802.11ac - 80+80 MHz wide channel"),
|
|
15
16
|
VHT160: _("802.11ac - 160 MHz wide channel"),
|
|
16
17
|
HE20: _("802.11ax - 20 MHz wide channel"),
|
|
17
18
|
HE40: _("802.11ax - 40 MHz wide channel"),
|
|
18
19
|
HE80: _("802.11ax - 80 MHz wide channel"),
|
|
20
|
+
HE80_80: _("802.11ax - 80+80 MHz wide channel"),
|
|
19
21
|
HE160: _("802.11ax - 160 MHz wide channel"),
|
|
20
22
|
};
|
|
21
23
|
export const HWMODES = {
|
package/foris-6.5.0.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED