mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-15 13:36:35 +02:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
982eb371ad | |||
2786f856f7 | |||
48b080dc26 | |||
71beeb46f1 | |||
060a0489e1 | |||
ae49b246cd | |||
27c37eb74b | |||
cd708fa294 | |||
8ec0392852 | |||
27a5e62d9a | |||
aeaad4aa72 | |||
256a000d61 | |||
c78ed9a5d0 | |||
bded10211a | |||
25ac6cf1e9 | |||
9a2547a6c2 | |||
7968c7af4a | |||
2f4d757a1a |
8560
package-lock.json
generated
8560
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "foris",
|
||||
"version": "4.4.0",
|
||||
"version": "5.0.0",
|
||||
"description": "Set of components and utils for Foris and its plugins.",
|
||||
"author": "CZ.NIC, z.s.p.o.",
|
||||
"repository": {
|
||||
@ -14,10 +14,9 @@
|
||||
"license": "GPL-3.0",
|
||||
"main": "./src/index.js",
|
||||
"dependencies": {
|
||||
"axios": "^0.19.1",
|
||||
"axios": "^0.19.2",
|
||||
"immutability-helper": "3.0.1",
|
||||
"moment": "^2.24.0",
|
||||
"pdfmake": "^0.1.63",
|
||||
"qrcode.react": "^0.9.3",
|
||||
"react-datetime": "^2.16.3",
|
||||
"react-uid": "^2.2.0"
|
||||
@ -30,26 +29,26 @@
|
||||
"react-router-dom": "^5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.7.7",
|
||||
"@babel/core": "^7.7.7",
|
||||
"@babel/plugin-transform-runtime": "^7.7.6",
|
||||
"@babel/preset-env": "^7.7.7",
|
||||
"@babel/preset-react": "^7.7.4",
|
||||
"@fortawesome/fontawesome-free": "^5.12.0",
|
||||
"@babel/cli": "^7.8.4",
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/plugin-transform-runtime": "^7.9.0",
|
||||
"@babel/preset-env": "^7.9.0",
|
||||
"@babel/preset-react": "^7.9.4",
|
||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||
"@testing-library/react": "^8.0.9",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-reforis": "^1.0.0",
|
||||
"jest": "^25.1.0",
|
||||
"jest": "^25.2.0",
|
||||
"jest-mock-axios": "^3.2.0",
|
||||
"moment-timezone": "^0.5.27",
|
||||
"moment-timezone": "^0.5.28",
|
||||
"prop-types": "15.7.2",
|
||||
"react": "16.9.0",
|
||||
"react-dom": "16.9.0",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-styleguidist": "^10.4.2",
|
||||
"snapshot-diff": "^0.5.1"
|
||||
"react-styleguidist": "^10.6.2",
|
||||
"snapshot-diff": "^0.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint src",
|
||||
|
@ -36,7 +36,7 @@ WiFiForm.defaultProps = {
|
||||
};
|
||||
|
||||
export default function WiFiForm({
|
||||
formData, formErrors, setFormValue, hasGuestNetwork, ...props
|
||||
formData, formErrors, setFormValue, hasGuestNetwork, disabled,
|
||||
}) {
|
||||
return formData.devices.map((device) => (
|
||||
<DeviceForm
|
||||
@ -45,8 +45,7 @@ export default function WiFiForm({
|
||||
formErrors={(formErrors || [])[device.id]}
|
||||
setFormValue={setFormValue}
|
||||
hasGuestNetwork={hasGuestNetwork}
|
||||
|
||||
{...props}
|
||||
disabled={disabled}
|
||||
/>
|
||||
));
|
||||
}
|
||||
|
@ -5,22 +5,36 @@
|
||||
* See /LICENSE for more information.
|
||||
*/
|
||||
|
||||
import pdfMake from "pdfmake";
|
||||
|
||||
export function createAndDownloadPdf(SSID, password) {
|
||||
const docDefinition = {
|
||||
content: [
|
||||
{
|
||||
text: "Wi-Fi", style: "header", fontSize: 55, alignment: "center",
|
||||
text: "Wi-Fi",
|
||||
style: "header",
|
||||
fontSize: 55,
|
||||
alignment: "center",
|
||||
},
|
||||
{
|
||||
qr: toQRCodeContent(SSID, password), fit: "350", margin: [0, 80], alignment: "center",
|
||||
qr: toQRCodeContent(SSID, password),
|
||||
fit: "350",
|
||||
margin: [0, 80],
|
||||
alignment: "center",
|
||||
},
|
||||
{
|
||||
text: `SSID: ${SSID}`,
|
||||
fontSize: 25,
|
||||
alignment: "center",
|
||||
},
|
||||
{
|
||||
text: `Password: ${password}`,
|
||||
fontSize: 25,
|
||||
alignment: "center",
|
||||
},
|
||||
{ text: `SSID: ${SSID}`, fontSize: 25, alignment: "center" },
|
||||
{ text: `Password: ${password}`, fontSize: 25, alignment: "center" },
|
||||
],
|
||||
};
|
||||
pdfMake.createPdf(docDefinition).download("wifi.pdf");
|
||||
|
||||
// pdfmake is exposed by reForis main application. Thus we can use it from globals.
|
||||
window.pdfMake.createPdf(docDefinition).download("wifi.pdf");
|
||||
}
|
||||
|
||||
export function toQRCodeContent(SSID, password) {
|
||||
|
@ -149,6 +149,7 @@ export function ForisForm({
|
||||
const childrenWithFormProps = React.Children.map(
|
||||
children,
|
||||
(child) => React.cloneElement(child, {
|
||||
initialData: formState.initialData,
|
||||
formData: formState.data,
|
||||
formErrors: formState.errors,
|
||||
setFormValue: onFormChangeHandler,
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2020-02-20 17:28+0100\n"
|
||||
"POT-Creation-Date: 2020-05-07 16:12+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -17,34 +17,6 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.8.0\n"
|
||||
|
||||
#: src/validations.js:13
|
||||
msgid "This is not a valid IPv4 address."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:14
|
||||
msgid "This is not a valid IPv6 address."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:15
|
||||
msgid "This is not a valid IPv6 prefix."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:16
|
||||
msgid "This is not a valid domain name."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:17
|
||||
msgid "This is not a valid DUID."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:18
|
||||
msgid "This is not a valid MAC address."
|
||||
msgstr ""
|
||||
|
||||
#: src/validations.js:19
|
||||
msgid "Doesn't contain a list of emails separated by commas."
|
||||
msgstr ""
|
||||
|
||||
#: src/api/utils.js:58
|
||||
msgid "The session is expired. Please log in again."
|
||||
msgstr ""
|
||||
@ -107,15 +79,15 @@ msgid ""
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#: src/common/WiFiSettings/WiFiForm.js:82
|
||||
#: src/common/WiFiSettings/WiFiForm.js:81
|
||||
msgid "Wi-Fi ${deviceID + 1}"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/WiFiSettings/WiFiForm.js:84
|
||||
#: src/common/WiFiSettings/WiFiForm.js:83
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/WiFiSettings/WiFiForm.js:215
|
||||
#: src/common/WiFiSettings/WiFiForm.js:214
|
||||
msgid "auto"
|
||||
msgstr ""
|
||||
|
||||
@ -222,7 +194,7 @@ msgstr ""
|
||||
msgid "Settings saved successfully"
|
||||
msgstr ""
|
||||
|
||||
#: src/form/components/ForisForm.js:165
|
||||
#: src/form/components/ForisForm.js:166
|
||||
msgid "Changes you made may not be saved. Are you sure you want to leave?"
|
||||
msgstr ""
|
||||
|
||||
@ -242,3 +214,31 @@ msgstr ""
|
||||
msgid "An error occurred while fetching data."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:13
|
||||
msgid "This is not a valid IPv4 address."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:14
|
||||
msgid "This is not a valid IPv6 address."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:15
|
||||
msgid "This is not a valid IPv6 prefix."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:16
|
||||
msgid "This is not a valid domain name."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:17
|
||||
msgid "This is not a valid DUID."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:18
|
||||
msgid "This is not a valid MAC address."
|
||||
msgstr ""
|
||||
|
||||
#: src/utils/validations.js:19
|
||||
msgid "Doesn't contain a list of emails separated by commas."
|
||||
msgstr ""
|
||||
|
||||
|
Reference in New Issue
Block a user