mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-15 13:36:35 +02:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d75b5ec6e | |||
c1aa1948b4 | |||
8c110ebf52 | |||
abb5be53aa | |||
af0fb80e45 | |||
688192504f | |||
b8e5dbec8d | |||
fde751a25f | |||
79006cfb99 | |||
de398901f3 | |||
56173d4959 | |||
7c837d041e | |||
473c81f9a4 | |||
15567a7dde |
4366
package-lock.json
generated
4366
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "foris",
|
||||
"version": "5.1.6",
|
||||
"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",
|
||||
|
@ -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"
|
||||
|
@ -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";
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
@ -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,6 +309,9 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div
|
||||
class="card p-4 col-sm-12 col-lg-12 p-0 mb-4"
|
||||
>
|
||||
<h2>
|
||||
Reset Wi-Fi Settings
|
||||
</h2>
|
||||
@ -319,7 +322,7 @@ current Wi-Fi configuration and restore the default values.
|
||||
|
||||
</p>
|
||||
<div
|
||||
class="col-sm-12 col-lg-12 p-0 mb-3 text-right"
|
||||
class="text-right"
|
||||
>
|
||||
<button
|
||||
class="btn btn-warning col-sm-12 col-md-3 col-lg-2"
|
||||
@ -328,6 +331,7 @@ current Wi-Fi configuration and restore the default values.
|
||||
Reset Wi-Fi Settings
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</DocumentFragment>
|
||||
`;
|
||||
|
||||
|
@ -70,6 +70,7 @@ export { ErrorMessage } from "./utils/ErrorMessage";
|
||||
export { useClickOutside } from "./utils/hooks";
|
||||
export { toLocaleDateString } from "./utils/datetime";
|
||||
export { displayCard } from "./utils/displayCard";
|
||||
export { isPluginInstalled } from "./utils/isPluginInstalled";
|
||||
|
||||
// Foris URL
|
||||
export { ForisURLs, REFORIS_URL_PREFIX } from "./utils/forisUrls";
|
||||
|
@ -20,6 +20,8 @@ export const ForisURLs = {
|
||||
updates: `${REFORIS_URL_PREFIX}/package-management/updates`,
|
||||
},
|
||||
|
||||
storage: `${REFORIS_URL_PREFIX}/storage`,
|
||||
|
||||
// Notifications links are used with <Link/> inside Router, thus url subdir is not required.
|
||||
overview: "/overview",
|
||||
notifications: "/overview#notifications",
|
||||
|
9
src/utils/isPluginInstalled.js
Normal file
9
src/utils/isPluginInstalled.js
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Copyright (C) 2020 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.
|
||||
*/
|
||||
|
||||
export const isPluginInstalled = (pluginName) =>
|
||||
ForisPlugins.some((plugin) => plugin.name === pluginName);
|
Reference in New Issue
Block a user