1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-26 00:21:36 +01:00

Merge branch 'dev' into 'master'

Dev

See merge request turris/reforis/foris-js!147
This commit is contained in:
Aleksandr Gumroian 2021-01-21 10:57:46 +01:00
commit 0fbc3df247
7 changed files with 1858 additions and 2592 deletions

4388
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "foris",
"version": "5.1.8",
"version": "5.1.9",
"description": "Set of components and utils for Foris and its plugins.",
"author": "CZ.NIC, z.s.p.o.",
"repository": {
@ -14,7 +14,7 @@
"license": "GPL-3.0",
"main": "./src/index.js",
"dependencies": {
"axios": "^0.19.2",
"axios": "^0.21.1",
"immutability-helper": "3.0.1",
"moment": "^2.24.0",
"qrcode.react": "^0.9.3",
@ -29,7 +29,7 @@
"react-router-dom": "^5.1.2"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/cli": "^7.12.10",
"@babel/core": "^7.9.0",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.0",
@ -53,10 +53,10 @@
"react": "16.9.0",
"react-dom": "16.9.0",
"react-router-dom": "^5.1.2",
"react-styleguidist": "^10.6.2",
"react-styleguidist": "^11.1.5",
"snapshot-diff": "^0.7.0",
"style-loader": "^1.2.1",
"webpack": "^4.43.0"
"webpack": "^5.15.0"
},
"scripts": {
"lint": "eslint src",

View File

@ -69,7 +69,7 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
>
<div
ref={dialogRef}
className={`modal-dialog ${modalSize} modal-dialog-centered ${
className={`${modalSize.trim()} modal-dialog modal-dialog-centered ${
scrollable ? "modal-dialog-scrollable" : ""
}`.trim()}
role="document"

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2019-2021 CZ.NIC z.s.p.o. (http://www.nic.cz/)
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
@ -7,5 +7,5 @@
/** Bootstrap column size for form fields */
// eslint-disable-next-line import/prefer-default-export
export const formFieldsSize = "card p-4 col-sm-12 col-lg-12 p-0 mb-3";
export const formFieldsSize = "card p-4 col-sm-12 col-lg-12 p-0 mb-4";
export const buttonFormFieldsSize = "col-sm-12 col-lg-12 p-0 mb-3";

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2019-2021 CZ.NIC z.s.p.o. (http://www.nic.cz/)
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
@ -13,7 +13,7 @@ import { useAlert } from "../../alertContext/AlertContext";
import { ALERT_TYPES } from "../../bootstrap/Alert";
import { useAPIPost } from "../../api/hooks";
import { API_STATE } from "../../api/utils";
import { buttonFormFieldsSize } from "../../bootstrap/constants";
import { formFieldsSize } from "../../bootstrap/constants";
ResetWiFiSettings.propTypes = {
ws: PropTypes.object.isRequired,
@ -51,7 +51,7 @@ export default function ResetWiFiSettings({ ws, endpoint }) {
}
return (
<>
<div className={formFieldsSize}>
<h2>{_("Reset Wi-Fi Settings")}</h2>
<p>
{_(`
@ -59,7 +59,7 @@ If a number of wireless cards doesn't match, you may try to reset the Wi-Fi sett
current Wi-Fi configuration and restore the default values.
`)}
</p>
<div className={`${buttonFormFieldsSize} text-right`}>
<div className="text-right">
<Button
className="btn-warning"
forisFormSize
@ -70,6 +70,6 @@ current Wi-Fi configuration and restore the default values.
{_("Reset Wi-Fi Settings")}
</Button>
</div>
</>
</div>
);
}

View File

@ -251,7 +251,7 @@ exports[`<WiFiSettings/> Snapshot 2.4 GHz 1`] = `
exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
<DocumentFragment>
<div
class="card p-4 col-sm-12 col-lg-12 p-0 mb-3"
class="card p-4 col-sm-12 col-lg-12 p-0 mb-4"
>
<form>
<div
@ -309,24 +309,28 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
</div>
</form>
</div>
<h2>
Reset Wi-Fi Settings
</h2>
<p>
<div
class="card p-4 col-sm-12 col-lg-12 p-0 mb-4"
>
<h2>
Reset Wi-Fi Settings
</h2>
<p>
If a number of wireless cards doesn't match, you may try to reset the Wi-Fi settings. Note that this will remove the
current Wi-Fi configuration and restore the default values.
</p>
<div
class="col-sm-12 col-lg-12 p-0 mb-3 text-right"
>
<button
class="btn btn-warning col-sm-12 col-md-3 col-lg-2"
type="button"
</p>
<div
class="text-right"
>
Reset Wi-Fi Settings
</button>
<button
class="btn btn-warning col-sm-12 col-md-3 col-lg-2"
type="button"
>
Reset Wi-Fi Settings
</button>
</div>
</div>
</DocumentFragment>
`;

View File

@ -10,7 +10,7 @@ exports[`<RebootButton/> Render modal. 1`] = `
role="dialog"
>
<div
class="modal-dialog modal-dialog-centered"
class="modal-dialog modal-dialog-centered"
role="document"
>
<div