mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Compare commits
22 Commits
v6.1.0
...
22fc17c265
Author | SHA1 | Date | |
---|---|---|---|
22fc17c265 | |||
acfbeb2c43 | |||
3bef624ce4 | |||
7d0d52666d | |||
52fe5d65a6 | |||
b99add91cf | |||
b7a4613cf4 | |||
9e2278e016 | |||
83a6ff75f6 | |||
02f3803265 | |||
cc1389536e | |||
499be46588 | |||
c86e2c8944 | |||
b96ccde81c | |||
cfa6eade17 | |||
380a388a38 | |||
cc19b4b293 | |||
e7ec494bb2 | |||
ea590e443c | |||
b127bf5edf | |||
40e4a9a4e3 | |||
bcb7c43863 |
30
CHANGELOG.md
30
CHANGELOG.md
@ -8,6 +8,32 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [6.2.0] - 2024-09-20
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added useFocusTrap hook
|
||||||
|
- Added extendSession endpoint
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Refactored Spinner.css to use CSS variable for color
|
||||||
|
- Refactored Modal component to use useFocusTrap hook
|
||||||
|
- Refactored Alert component to use useFocusTrap hook
|
||||||
|
|
||||||
|
## [6.1.1] - 2024-08-30
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added & updated Weblate translations
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated icon color classes to use "text-secondary" instead of "text-dark"
|
||||||
|
- Updated Wi-Fi QRCodeModal component to use new styles & added close button
|
||||||
|
- Refactored WiFiGuestForm component to get rid of obsolete div element
|
||||||
|
- NPM audit fix
|
||||||
|
|
||||||
## [6.1.0] - 2024-08-23
|
## [6.1.0] - 2024-08-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@ -348,7 +374,9 @@ and this project adheres to
|
|||||||
## [0.0.7] - 2019-09-02
|
## [0.0.7] - 2019-09-02
|
||||||
|
|
||||||
[unreleased]:
|
[unreleased]:
|
||||||
https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.1.0...master
|
https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.2.0...dev
|
||||||
|
[6.2.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.1.1...v6.2.0
|
||||||
|
[6.1.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.1.0...v6.1.1
|
||||||
[6.1.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.3...v6.1.0
|
[6.1.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.3...v6.1.0
|
||||||
[6.0.3]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.2...v6.0.3
|
[6.0.3]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.2...v6.0.3
|
||||||
[6.0.2]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...v6.0.2
|
[6.0.2]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...v6.0.2
|
||||||
|
197
package-lock.json
generated
197
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "foris",
|
"name": "foris",
|
||||||
"version": "6.1.0",
|
"version": "6.2.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "foris",
|
"name": "foris",
|
||||||
"version": "6.1.0",
|
"version": "6.2.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
||||||
@ -18,7 +18,8 @@
|
|||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"qrcode.react": "^3.1.0",
|
"qrcode.react": "^3.1.0",
|
||||||
"react-datetime": "^3.2.0",
|
"react-datetime": "^3.2.0",
|
||||||
"react-uid": "^2.3.3"
|
"react-uid": "^2.3.3",
|
||||||
|
"socket.io-client": "^4.6.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.24.7",
|
"@babel/cli": "^7.24.7",
|
||||||
@ -3583,6 +3584,12 @@
|
|||||||
"@sinonjs/commons": "^3.0.0"
|
"@sinonjs/commons": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@socket.io/component-emitter": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@testing-library/dom": {
|
"node_modules/@testing-library/dom": {
|
||||||
"version": "5.6.1",
|
"version": "5.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-5.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-5.6.1.tgz",
|
||||||
@ -3722,21 +3729,13 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
|
||||||
"integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==",
|
"integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "*",
|
"@types/estree": "*",
|
||||||
"@types/json-schema": "*"
|
"@types/json-schema": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/eslint-scope": {
|
|
||||||
"version": "3.7.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz",
|
|
||||||
"integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@types/eslint": "*",
|
|
||||||
"@types/estree": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||||
@ -6380,7 +6379,6 @@
|
|||||||
"version": "4.3.5",
|
"version": "4.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||||
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
},
|
},
|
||||||
@ -6730,11 +6728,34 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/engine.io-client": {
|
||||||
|
"version": "6.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.4.tgz",
|
||||||
|
"integrity": "sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1",
|
||||||
|
"engine.io-parser": "~5.2.1",
|
||||||
|
"ws": "~8.17.1",
|
||||||
|
"xmlhttprequest-ssl": "~2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/engine.io-parser": {
|
||||||
|
"version": "5.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
||||||
|
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.17.0",
|
"version": "5.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
|
||||||
"integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==",
|
"integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
"tapable": "^2.2.0"
|
"tapable": "^2.2.0"
|
||||||
@ -6748,6 +6769,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||||
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
@ -13785,10 +13807,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/micromatch": {
|
"node_modules/micromatch": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||||
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"braces": "^3.0.3",
|
"braces": "^3.0.3",
|
||||||
"picomatch": "^2.3.1"
|
"picomatch": "^2.3.1"
|
||||||
@ -13953,8 +13976,7 @@
|
|||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/multicast-dns": {
|
"node_modules/multicast-dns": {
|
||||||
"version": "7.2.5",
|
"version": "7.2.5",
|
||||||
@ -16557,6 +16579,34 @@
|
|||||||
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
|
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/socket.io-client": {
|
||||||
|
"version": "4.7.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.5.tgz",
|
||||||
|
"integrity": "sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.2",
|
||||||
|
"engine.io-client": "~6.5.2",
|
||||||
|
"socket.io-parser": "~4.2.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/socket.io-parser": {
|
||||||
|
"version": "4.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
||||||
|
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/sockjs": {
|
"node_modules/sockjs": {
|
||||||
"version": "0.3.24",
|
"version": "0.3.24",
|
||||||
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
||||||
@ -17822,13 +17872,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack": {
|
"node_modules/webpack": {
|
||||||
"version": "5.92.1",
|
"version": "5.94.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz",
|
||||||
"integrity": "sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==",
|
"integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
|
||||||
"@types/estree": "^1.0.5",
|
"@types/estree": "^1.0.5",
|
||||||
"@webassemblyjs/ast": "^1.12.1",
|
"@webassemblyjs/ast": "^1.12.1",
|
||||||
"@webassemblyjs/wasm-edit": "^1.12.1",
|
"@webassemblyjs/wasm-edit": "^1.12.1",
|
||||||
@ -17837,7 +17886,7 @@
|
|||||||
"acorn-import-attributes": "^1.9.5",
|
"acorn-import-attributes": "^1.9.5",
|
||||||
"browserslist": "^4.21.10",
|
"browserslist": "^4.21.10",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.17.0",
|
"enhanced-resolve": "^5.17.1",
|
||||||
"es-module-lexer": "^1.2.1",
|
"es-module-lexer": "^1.2.1",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
@ -18366,7 +18415,6 @@
|
|||||||
"version": "8.17.1",
|
"version": "8.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
@ -18399,6 +18447,14 @@
|
|||||||
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
|
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/xmlhttprequest-ssl": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yallist": {
|
"node_modules/yallist": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
@ -21059,6 +21115,11 @@
|
|||||||
"@sinonjs/commons": "^3.0.0"
|
"@sinonjs/commons": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@socket.io/component-emitter": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
|
||||||
|
},
|
||||||
"@testing-library/dom": {
|
"@testing-library/dom": {
|
||||||
"version": "5.6.1",
|
"version": "5.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-5.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-5.6.1.tgz",
|
||||||
@ -21181,21 +21242,13 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
|
||||||
"integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==",
|
"integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"peer": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/estree": "*",
|
"@types/estree": "*",
|
||||||
"@types/json-schema": "*"
|
"@types/json-schema": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/eslint-scope": {
|
|
||||||
"version": "3.7.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz",
|
|
||||||
"integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/eslint": "*",
|
|
||||||
"@types/estree": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@types/estree": {
|
"@types/estree": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||||
@ -23276,7 +23329,6 @@
|
|||||||
"version": "4.3.5",
|
"version": "4.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||||
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
}
|
}
|
||||||
@ -23536,10 +23588,27 @@
|
|||||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"engine.io-client": {
|
||||||
|
"version": "6.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.4.tgz",
|
||||||
|
"integrity": "sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ==",
|
||||||
|
"requires": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1",
|
||||||
|
"engine.io-parser": "~5.2.1",
|
||||||
|
"ws": "~8.17.1",
|
||||||
|
"xmlhttprequest-ssl": "~2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"engine.io-parser": {
|
||||||
|
"version": "5.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
||||||
|
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q=="
|
||||||
|
},
|
||||||
"enhanced-resolve": {
|
"enhanced-resolve": {
|
||||||
"version": "5.17.0",
|
"version": "5.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz",
|
||||||
"integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==",
|
"integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
@ -28840,9 +28909,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "4.0.7",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||||
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"braces": "^3.0.3",
|
"braces": "^3.0.3",
|
||||||
@ -28961,8 +29030,7 @@
|
|||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"multicast-dns": {
|
"multicast-dns": {
|
||||||
"version": "7.2.5",
|
"version": "7.2.5",
|
||||||
@ -30891,6 +30959,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"socket.io-client": {
|
||||||
|
"version": "4.7.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.5.tgz",
|
||||||
|
"integrity": "sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ==",
|
||||||
|
"requires": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.2",
|
||||||
|
"engine.io-client": "~6.5.2",
|
||||||
|
"socket.io-parser": "~4.2.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"socket.io-parser": {
|
||||||
|
"version": "4.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
||||||
|
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
||||||
|
"requires": {
|
||||||
|
"@socket.io/component-emitter": "~3.1.0",
|
||||||
|
"debug": "~4.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"sockjs": {
|
"sockjs": {
|
||||||
"version": "0.3.24",
|
"version": "0.3.24",
|
||||||
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
||||||
@ -31815,12 +31903,11 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"webpack": {
|
"webpack": {
|
||||||
"version": "5.92.1",
|
"version": "5.94.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.1.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz",
|
||||||
"integrity": "sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==",
|
"integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-scope": "^3.7.3",
|
|
||||||
"@types/estree": "^1.0.5",
|
"@types/estree": "^1.0.5",
|
||||||
"@webassemblyjs/ast": "^1.12.1",
|
"@webassemblyjs/ast": "^1.12.1",
|
||||||
"@webassemblyjs/wasm-edit": "^1.12.1",
|
"@webassemblyjs/wasm-edit": "^1.12.1",
|
||||||
@ -31829,7 +31916,7 @@
|
|||||||
"acorn-import-attributes": "^1.9.5",
|
"acorn-import-attributes": "^1.9.5",
|
||||||
"browserslist": "^4.21.10",
|
"browserslist": "^4.21.10",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.17.0",
|
"enhanced-resolve": "^5.17.1",
|
||||||
"es-module-lexer": "^1.2.1",
|
"es-module-lexer": "^1.2.1",
|
||||||
"eslint-scope": "5.1.1",
|
"eslint-scope": "5.1.1",
|
||||||
"events": "^3.2.0",
|
"events": "^3.2.0",
|
||||||
@ -32213,7 +32300,6 @@
|
|||||||
"version": "8.17.1",
|
"version": "8.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"xml-name-validator": {
|
"xml-name-validator": {
|
||||||
@ -32228,6 +32314,11 @@
|
|||||||
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
|
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"xmlhttprequest-ssl": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A=="
|
||||||
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "foris",
|
"name": "foris",
|
||||||
"version": "6.1.0",
|
"version": "6.2.0",
|
||||||
"description": "Foris JS library is a set of components and utils for reForis application and plugins.",
|
"description": "Foris JS library is a set of components and utils for reForis application and plugins.",
|
||||||
"author": "CZ.NIC, z.s.p.o.",
|
"author": "CZ.NIC, z.s.p.o.",
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -23,7 +23,8 @@
|
|||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"qrcode.react": "^3.1.0",
|
"qrcode.react": "^3.1.0",
|
||||||
"react-datetime": "^3.2.0",
|
"react-datetime": "^3.2.0",
|
||||||
"react-uid": "^2.3.3"
|
"react-uid": "^2.3.3",
|
||||||
|
"socket.io-client": "^4.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"bootstrap": "^5.3.3",
|
"bootstrap": "^5.3.3",
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
* See /LICENSE for more information.
|
* See /LICENSE for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
import React, { useRef } from "react";
|
||||||
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import { useFocusTrap } from "../utils/hooks";
|
||||||
|
|
||||||
export const ALERT_TYPES = Object.freeze({
|
export const ALERT_TYPES = Object.freeze({
|
||||||
PRIMARY: "primary",
|
PRIMARY: "primary",
|
||||||
SECONDARY: "secondary",
|
SECONDARY: "secondary",
|
||||||
@ -37,11 +39,15 @@ Alert.defaultProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function Alert({ type, onDismiss, children }) {
|
function Alert({ type, onDismiss, children }) {
|
||||||
|
const alertRef = useRef();
|
||||||
|
useFocusTrap(alertRef, !!onDismiss);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
ref={alertRef}
|
||||||
className={`alert alert-${type} ${
|
className={`alert alert-${type} ${
|
||||||
onDismiss ? "alert-dismissible" : ""
|
onDismiss ? "alert-dismissible" : ""
|
||||||
}`.trim()}
|
}`.trim()}
|
||||||
|
role="alert"
|
||||||
>
|
>
|
||||||
{onDismiss && (
|
{onDismiss && (
|
||||||
<button
|
<button
|
||||||
|
@ -9,7 +9,7 @@ import React, { useRef, useEffect } from "react";
|
|||||||
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import { useClickOutside } from "../utils/hooks";
|
import { useClickOutside, useFocusTrap } from "../utils/hooks";
|
||||||
import Portal from "../utils/Portal";
|
import Portal from "../utils/Portal";
|
||||||
import "./Modal.css";
|
import "./Modal.css";
|
||||||
|
|
||||||
@ -29,10 +29,11 @@ Modal.propTypes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function Modal({ shown, setShown, scrollable, size, children }) {
|
export function Modal({ shown, setShown, scrollable, size, children }) {
|
||||||
const dialogRef = useRef();
|
const modalRef = useRef();
|
||||||
let modalSize = "modal-";
|
let modalSize = "modal-";
|
||||||
|
|
||||||
useClickOutside(dialogRef, () => setShown(false));
|
useClickOutside(modalRef, () => setShown(false));
|
||||||
|
useFocusTrap(modalRef, shown);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleEsc = (event) => {
|
const handleEsc = (event) => {
|
||||||
@ -65,11 +66,13 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
|
|||||||
return (
|
return (
|
||||||
<Portal containerId="modal-container">
|
<Portal containerId="modal-container">
|
||||||
<div
|
<div
|
||||||
|
ref={modalRef}
|
||||||
className={`modal fade ${shown ? "show" : ""}`.trim()}
|
className={`modal fade ${shown ? "show" : ""}`.trim()}
|
||||||
role="dialog"
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
aria-labelledby="modal-title"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref={dialogRef}
|
|
||||||
className={`${modalSize.trim()} modal-dialog modal-dialog-centered ${
|
className={`${modalSize.trim()} modal-dialog modal-dialog-centered ${
|
||||||
scrollable ? "modal-dialog-scrollable" : ""
|
scrollable ? "modal-dialog-scrollable" : ""
|
||||||
}`.trim()}
|
}`.trim()}
|
||||||
@ -90,7 +93,7 @@ ModalHeader.propTypes = {
|
|||||||
export function ModalHeader({ setShown, title }) {
|
export function ModalHeader({ setShown, title }) {
|
||||||
return (
|
return (
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
<h5 className="modal-title">{title}</h5>
|
<h1 className="modal-title fs-5">{title}</h1>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn-close"
|
className="btn-close"
|
||||||
|
@ -49,7 +49,7 @@ function PasswordInput({ withEye, newPass, ...props }) {
|
|||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={isHidden ? faEye : faEyeSlash}
|
icon={isHidden ? faEye : faEyeSlash}
|
||||||
style={{ width: "1.25rem" }}
|
style={{ width: "1.25rem" }}
|
||||||
className="text-dark"
|
className="text-secondary"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.spinner-wrapper .spinner-border {
|
.spinner-wrapper .spinner-border {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
color: #00a2e2;
|
color: var(--bs-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner-fs-background {
|
.spinner-fs-background {
|
||||||
|
@ -26,7 +26,7 @@ function ResetWiFiSettings({ ws, endpoint }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const module = "wifi";
|
const module = "wifi";
|
||||||
ws.subscribe(module).bind(module, "reset", () => {
|
ws.bind(module, "reset", () => {
|
||||||
// eslint-disable-next-line no-restricted-globals
|
// eslint-disable-next-line no-restricted-globals
|
||||||
setTimeout(() => location.reload(), 1000);
|
setTimeout(() => location.reload(), 1000);
|
||||||
});
|
});
|
||||||
|
@ -68,14 +68,11 @@ export default function WifiGuestForm({
|
|||||||
}))}
|
}))}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<div className="input-group-append">
|
<WiFiQRCode
|
||||||
<WiFiQRCode
|
SSID={formData.SSID}
|
||||||
SSID={formData.SSID}
|
password={formData.password}
|
||||||
password={formData.password}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</TextInput>
|
</TextInput>
|
||||||
|
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
withEye
|
withEye
|
||||||
label={_("Password")}
|
label={_("Password")}
|
||||||
|
@ -42,7 +42,7 @@ export default function WiFiQRCode({ SSID, password }) {
|
|||||||
icon="fa-solid fa-qrcode"
|
icon="fa-solid fa-qrcode"
|
||||||
title={_("Show QR code")}
|
title={_("Show QR code")}
|
||||||
aria-label={_("Show QR code")}
|
aria-label={_("Show QR code")}
|
||||||
className="text-dark"
|
className="text-secondary"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
{modal ? (
|
{modal ? (
|
||||||
@ -70,17 +70,26 @@ function QRCodeModal({ shown, setShown, SSID, password }) {
|
|||||||
<ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} />
|
<ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} />
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<QRCode
|
<QRCode
|
||||||
|
className="d-block mx-auto img-logo-black"
|
||||||
renderAs="svg"
|
renderAs="svg"
|
||||||
value={toQRCodeContent(SSID, password)}
|
value={toQRCodeContent(SSID, password)}
|
||||||
level="M"
|
level="M"
|
||||||
size={350}
|
size={350}
|
||||||
includeMargin
|
includeMargin
|
||||||
style={{ display: "block", margin: "auto" }}
|
|
||||||
/>
|
/>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button
|
<Button
|
||||||
className="btn-outline-primary"
|
className="btn-secondary"
|
||||||
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
setShown(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{_("Close")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
className="btn-primary"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
createAndDownloadPdf(SSID, password);
|
createAndDownloadPdf(SSID, password);
|
||||||
|
@ -339,7 +339,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -524,10 +524,91 @@
|
@@ -524,10 +524,87 @@
|
||||||
<small>
|
<small>
|
||||||
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>
|
||||||
@ -363,18 +363,14 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||||||
+ type="text"
|
+ type="text"
|
||||||
+ value="TestGuestSSID"
|
+ value="TestGuestSSID"
|
||||||
+ />
|
+ />
|
||||||
+ <div
|
+ <button
|
||||||
+ class="input-group-append"
|
+ class="input-group-text"
|
||||||
|
+ type="button"
|
||||||
+ >
|
+ >
|
||||||
+ <button
|
+ <i
|
||||||
+ class="input-group-text"
|
+ class="fa"
|
||||||
+ type="button"
|
+ />
|
||||||
+ >
|
+ </button>
|
||||||
+ <i
|
|
||||||
+ class="fa"
|
|
||||||
+ />
|
|
||||||
+ </button>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class="form-text"
|
+ class="form-text"
|
||||||
@ -431,7 +427,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||||||
class="form-check form-switch mb-3 d-flex align-items-center"
|
class="form-check form-switch mb-3 d-flex align-items-center"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
@@ -550,10 +631,11 @@
|
@@ -550,10 +627,11 @@
|
||||||
<div
|
<div
|
||||||
class="text-end"
|
class="text-end"
|
||||||
>
|
>
|
||||||
|
@ -46,7 +46,7 @@ describe("<RebootButton/>", () => {
|
|||||||
fireEvent.click(getByText(componentContainer, "Reboot"));
|
fireEvent.click(getByText(componentContainer, "Reboot"));
|
||||||
fireEvent.click(getByText(componentContainer, "Confirm reboot"));
|
fireEvent.click(getByText(componentContainer, "Confirm reboot"));
|
||||||
expect(mockAxios.post).toHaveBeenCalledWith(
|
expect(mockAxios.post).toHaveBeenCalledWith(
|
||||||
"/reforis/api/reboot",
|
"/api/reboot",
|
||||||
undefined,
|
undefined,
|
||||||
expect.anything()
|
expect.anything()
|
||||||
);
|
);
|
||||||
|
@ -6,6 +6,8 @@ exports[`<RebootButton/> Render modal. 1`] = `
|
|||||||
id="modal-container"
|
id="modal-container"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
aria-labelledby="modal-title"
|
||||||
|
aria-modal="true"
|
||||||
class="modal fade show"
|
class="modal fade show"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
>
|
>
|
||||||
@ -19,11 +21,11 @@ exports[`<RebootButton/> Render modal. 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="modal-header"
|
class="modal-header"
|
||||||
>
|
>
|
||||||
<h5
|
<h1
|
||||||
class="modal-title"
|
class="modal-title fs-5"
|
||||||
>
|
>
|
||||||
Warning!
|
Warning!
|
||||||
</h5>
|
</h1>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
class="btn-close"
|
class="btn-close"
|
||||||
|
@ -7,6 +7,7 @@ exports[`AlertContext should render alert 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="alert alert-danger alert-dismissible"
|
class="alert alert-danger alert-dismissible"
|
||||||
|
role="alert"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
|
@ -10,3 +10,4 @@ global._ = (str) => str;
|
|||||||
global.ngettext = (str) => str;
|
global.ngettext = (str) => str;
|
||||||
global.babel = { format: (str) => str };
|
global.babel = { format: (str) => str };
|
||||||
global.ForisTranslations = { locale: "en" };
|
global.ForisTranslations = { locale: "en" };
|
||||||
|
global.setImmediate = (fn) => setTimeout(fn, 0);
|
@ -1,16 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2021 CZ.NIC z.s.p.o. (http://www.nic.cz/)
|
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
||||||
*
|
*
|
||||||
* This is free software, licensed under the GNU General Public License v3.
|
* This is free software, licensed under the GNU General Public License v3.
|
||||||
* See /LICENSE for more information.
|
* See /LICENSE for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const REFORIS_URL_PREFIX = "/reforis";
|
export const REFORIS_URL_PREFIX = process.env.REFORIS_PREFIX || "";
|
||||||
export const REFORIS_API_URL_PREFIX = `${REFORIS_URL_PREFIX}/api`;
|
export const REFORIS_API_URL_PREFIX = `${REFORIS_URL_PREFIX}/api`;
|
||||||
|
|
||||||
export const ForisURLs = {
|
export const ForisURLs = {
|
||||||
|
// turris-auth
|
||||||
login: `/login?${REFORIS_URL_PREFIX}/`,
|
login: `/login?${REFORIS_URL_PREFIX}/`,
|
||||||
logout: `/logout`,
|
logout: `/logout`,
|
||||||
|
extendSession: `/extend-session`,
|
||||||
|
|
||||||
static: `${REFORIS_URL_PREFIX}/static/reforis`,
|
static: `${REFORIS_URL_PREFIX}/static/reforis`,
|
||||||
wifi: `${REFORIS_URL_PREFIX}/network-settings/wifi`,
|
wifi: `${REFORIS_URL_PREFIX}/network-settings/wifi`,
|
||||||
|
@ -40,3 +40,40 @@ export function useClickOutside(element, callback) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Trap focus inside element. */
|
||||||
|
export function useFocusTrap(elementRef, condition = true) {
|
||||||
|
useEffect(() => {
|
||||||
|
if (!condition) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const currentElement = elementRef.current;
|
||||||
|
const focusableElements = currentElement.querySelectorAll(
|
||||||
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
||||||
|
);
|
||||||
|
const firstElement = focusableElements[0];
|
||||||
|
const lastElement = focusableElements[focusableElements.length - 1];
|
||||||
|
|
||||||
|
const handleTab = (event) => {
|
||||||
|
if (event.key === "Tab") {
|
||||||
|
if (event.shiftKey) {
|
||||||
|
if (document.activeElement === firstElement) {
|
||||||
|
lastElement.focus();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
} else if (document.activeElement === lastElement) {
|
||||||
|
firstElement.focus();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
currentElement.addEventListener("keydown", handleTab);
|
||||||
|
|
||||||
|
firstElement.focus();
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
currentElement.removeEventListener("keydown", handleTab);
|
||||||
|
};
|
||||||
|
}, [elementRef, condition]);
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2022 CZ.NIC z.s.p.o. (http://www.nic.cz/)
|
* Copyright (C) 2020-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
||||||
*
|
*
|
||||||
* This is free software, licensed under the GNU General Public License v3.
|
* This is free software, licensed under the GNU General Public License v3.
|
||||||
* See /LICENSE for more information.
|
* See /LICENSE for more information.
|
||||||
@ -7,47 +7,33 @@
|
|||||||
|
|
||||||
/* eslint no-console: "off" */
|
/* eslint no-console: "off" */
|
||||||
|
|
||||||
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
|
import { io } from "socket.io-client";
|
||||||
|
|
||||||
const URL = process.env.LIGHTTPD
|
import { REFORIS_URL_PREFIX } from "../utils/forisUrls";
|
||||||
? `${PROTOCOL}://${window.location.host}/${process.env.WSPATH || "foris-ws"}`
|
|
||||||
: `${PROTOCOL}://${window.location.hostname}:9081`;
|
|
||||||
|
|
||||||
const WAITING_FOR_CONNECTION_TIMEOUT = 500;
|
|
||||||
|
|
||||||
class WebSockets {
|
class WebSockets {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.ws = new WebSocket(URL);
|
this.socket = io("/notifications", {
|
||||||
this.ws.onerror = (e) => {
|
path: `${REFORIS_URL_PREFIX}/reforis-ws`,
|
||||||
console.error("WS: Error:", e);
|
});
|
||||||
};
|
this.connection = null;
|
||||||
this.ws.onmessage = (e) => {
|
this.socket.on("disconnect", (reason) => {
|
||||||
console.debug(`WS: Received Message: ${e.data}`);
|
this.connection = null;
|
||||||
const data = JSON.parse(e.data);
|
console.debug(`SocketIO disconnected (${reason})`);
|
||||||
this.dispatch(data);
|
});
|
||||||
};
|
this.socket.on("notification", (message) => {
|
||||||
this.ws.onopen = () => {
|
console.debug("WS: Received Message:", message);
|
||||||
console.debug("WS: Connection open.");
|
this.dispatch(message);
|
||||||
};
|
});
|
||||||
this.ws.onclose = () => {
|
this.socket.on("connect", (connection) => {
|
||||||
console.debug("WS: Connection closed.");
|
this.connection = connection;
|
||||||
};
|
console.debug(`SocketIO connected.`);
|
||||||
|
});
|
||||||
|
|
||||||
// callbacks[module][action]
|
// callbacks[module][action]
|
||||||
this.callbacks = {};
|
this.callbacks = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
waitForConnection(callback) {
|
|
||||||
if (this.ws.readyState === 1) {
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
const that = this;
|
|
||||||
setTimeout(() => {
|
|
||||||
that.waitForConnection(callback);
|
|
||||||
}, WAITING_FOR_CONNECTION_TIMEOUT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bind(module, action, callback) {
|
bind(module, action, callback) {
|
||||||
this.callbacks[module] = this.callbacks[module] || {};
|
this.callbacks[module] = this.callbacks[module] || {};
|
||||||
this.callbacks[module][action] = this.callbacks[module][action] || [];
|
this.callbacks[module][action] = this.callbacks[module][action] || [];
|
||||||
@ -55,13 +41,6 @@ class WebSockets {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribe(module) {
|
|
||||||
this.waitForConnection(() => {
|
|
||||||
this.send("subscribe", module);
|
|
||||||
});
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
unbind(module, action, callback) {
|
unbind(module, action, callback) {
|
||||||
const callbacks = this.callbacks[module][action];
|
const callbacks = this.callbacks[module][action];
|
||||||
|
|
||||||
@ -75,28 +54,12 @@ class WebSockets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Object.keys(this.callbacks[module]).length === 0) {
|
if (Object.keys(this.callbacks[module]).length === 0) {
|
||||||
this.unsubscribe(module);
|
delete this.callbacks[module];
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsubscribe(module) {
|
|
||||||
this.waitForConnection(() => {
|
|
||||||
this.send("unsubscribe", module);
|
|
||||||
delete this.callbacks[module];
|
|
||||||
});
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
send(action, params) {
|
|
||||||
const payload = JSON.stringify({ action, params });
|
|
||||||
this.waitForConnection(() => {
|
|
||||||
this.ws.send(payload);
|
|
||||||
});
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch(json) {
|
dispatch(json) {
|
||||||
if (!json.module) return;
|
if (!json.module) return;
|
||||||
|
|
||||||
@ -105,20 +68,17 @@ class WebSockets {
|
|||||||
chain = this.callbacks[json.module][json.action];
|
chain = this.callbacks[json.module][json.action];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof TypeError) {
|
if (error instanceof TypeError) {
|
||||||
console.warn(
|
console.debug(
|
||||||
`Callback for this message wasn't found:${error.data}`
|
`Callbacks for this module wasn't found: ${json.module}`
|
||||||
);
|
);
|
||||||
} else throw error;
|
} else throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof chain === "undefined") return;
|
if (typeof chain === "undefined") return;
|
||||||
|
|
||||||
|
console.debug("Handling WS message", json);
|
||||||
chain.forEach((callback) => callback(json));
|
chain.forEach((callback) => callback(json));
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
|
||||||
this.ws.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default WebSockets;
|
export default WebSockets;
|
||||||
|
@ -33,7 +33,7 @@ function useWSForisModule(
|
|||||||
setData(message.data);
|
setData(message.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
ws.subscribe(module).bind(module, action, callback);
|
ws.bind(module, action, callback);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
ws.unbind(module, action, callback);
|
ws.unbind(module, action, callback);
|
||||||
|
@ -8,15 +8,16 @@ msgstr ""
|
|||||||
"Project-Id-Version: PROJECT VERSION\n"
|
"Project-Id-Version: PROJECT VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||||
"POT-Creation-Date: 2024-08-23 14:02+0200\n"
|
"POT-Creation-Date: 2024-08-23 14:02+0200\n"
|
||||||
"PO-Revision-Date: 2022-09-11 17:15+0000\n"
|
"PO-Revision-Date: 2024-08-24 13:09+0000\n"
|
||||||
"Last-Translator: Dan Cybersec <dan.cybersec@protonmail.com>\n"
|
"Last-Translator: gallegonovato <fran-carro@hotmail.es>\n"
|
||||||
|
"Language-Team: Spanish <https://hosted.weblate.org/projects/turris/foris-js/"
|
||||||
|
"es/>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
"Language-Team: Spanish <https://hosted.weblate.org/projects/turris/foris-"
|
|
||||||
"js/es/>\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Weblate 5.7.1-dev\n"
|
||||||
"Generated-By: Babel 2.16.0\n"
|
"Generated-By: Babel 2.16.0\n"
|
||||||
|
|
||||||
#: src/api/utils.js:61
|
#: src/api/utils.js:61
|
||||||
@ -39,7 +40,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: src/bootstrap/Alert.js:51 src/bootstrap/Modal.js:98
|
#: src/bootstrap/Alert.js:51 src/bootstrap/Modal.js:98
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr ""
|
msgstr "Cerrar"
|
||||||
|
|
||||||
#: src/bootstrap/CopyInput.js:57
|
#: src/bootstrap/CopyInput.js:57
|
||||||
msgid "Copied!"
|
msgid "Copied!"
|
||||||
@ -123,13 +124,15 @@ msgstr "Cifrado"
|
|||||||
|
|
||||||
#: src/common/WiFiSettings/WiFiForm.js:226
|
#: src/common/WiFiSettings/WiFiForm.js:226
|
||||||
msgid "Disable Management Frame Protection"
|
msgid "Disable Management Frame Protection"
|
||||||
msgstr ""
|
msgstr "Desactivar Protected Management Frames"
|
||||||
|
|
||||||
#: src/common/WiFiSettings/WiFiForm.js:227
|
#: src/common/WiFiSettings/WiFiForm.js:227
|
||||||
msgid ""
|
msgid ""
|
||||||
"In case you have trouble connecting to WiFi Access Point, try disabling "
|
"In case you have trouble connecting to WiFi Access Point, try disabling "
|
||||||
"Management Frame Protection."
|
"Management Frame Protection."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Si tienes problemas para conectarte a un punto de acceso Wi-Fi, intenta "
|
||||||
|
"desactivar Management Frame Protection."
|
||||||
|
|
||||||
#: src/common/WiFiSettings/WiFiForm.js:262
|
#: src/common/WiFiSettings/WiFiForm.js:262
|
||||||
msgid "auto"
|
msgid "auto"
|
||||||
@ -145,9 +148,8 @@ msgstr "Activar el modo Wi-Fi de invitados"
|
|||||||
|
|
||||||
#: src/common/WiFiSettings/WiFiQRCode.js:43
|
#: src/common/WiFiSettings/WiFiQRCode.js:43
|
||||||
#: src/common/WiFiSettings/WiFiQRCode.js:44
|
#: src/common/WiFiSettings/WiFiQRCode.js:44
|
||||||
#, fuzzy
|
|
||||||
msgid "Show QR code"
|
msgid "Show QR code"
|
||||||
msgstr "Código QR Wi-Fi"
|
msgstr "Mostrar el código QR"
|
||||||
|
|
||||||
#: src/common/WiFiSettings/WiFiQRCode.js:70
|
#: src/common/WiFiSettings/WiFiQRCode.js:70
|
||||||
msgid "Wi-Fi QR Code"
|
msgid "Wi-Fi QR Code"
|
||||||
@ -444,4 +446,3 @@ msgstr "No contiene una lista de correos electrónicos separados por comas."
|
|||||||
#~ " default option with 20 MHz wide "
|
#~ " default option with 20 MHz wide "
|
||||||
#~ "channel."
|
#~ "channel."
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user