foris 6.5.0-beta.5a53eca1 → 6.5.0-beta.ffa1121d
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/Modal.js
CHANGED
|
@@ -88,18 +88,21 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
|
|
|
88
88
|
ModalHeader.propTypes = {
|
|
89
89
|
setShown: PropTypes.func.isRequired,
|
|
90
90
|
title: PropTypes.string.isRequired,
|
|
91
|
+
showCloseButton: PropTypes.bool,
|
|
91
92
|
};
|
|
92
93
|
|
|
93
|
-
export function ModalHeader({ setShown, title }) {
|
|
94
|
+
export function ModalHeader({ setShown, title, showCloseButton = true }) {
|
|
94
95
|
return (
|
|
95
96
|
<div className="modal-header">
|
|
96
97
|
<h1 className="modal-title fs-5">{title}</h1>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
{showCloseButton && (
|
|
99
|
+
<button
|
|
100
|
+
type="button"
|
|
101
|
+
className="btn-close"
|
|
102
|
+
onClick={() => setShown(false)}
|
|
103
|
+
aria-label={_("Close")}
|
|
104
|
+
/>
|
|
105
|
+
)}
|
|
103
106
|
</div>
|
|
104
107
|
);
|
|
105
108
|
}
|
|
@@ -64,13 +64,15 @@ function RichTable({
|
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
const paginationIsNeeded = tableData.length > pageSize && withPagination;
|
|
68
|
+
|
|
67
69
|
return (
|
|
68
70
|
<div className="table-responsive">
|
|
69
71
|
<table className="table table-hover text-nowrap">
|
|
70
72
|
<RichTableHeader table={table} flexRender={flexRender} />
|
|
71
73
|
<RichTableBody table={table} flexRender={flexRender} />
|
|
72
74
|
</table>
|
|
73
|
-
{
|
|
75
|
+
{paginationIsNeeded && (
|
|
74
76
|
<RichTablePagination
|
|
75
77
|
table={table}
|
|
76
78
|
tablePageSize={pageSize}
|
|
@@ -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
|
</>
|
package/foris-6.5.0.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED