foris 6.0.2 → 6.0.3-beta.036f1919

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.
@@ -7,6 +7,8 @@
7
7
 
8
8
  import React from "react";
9
9
 
10
+ import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
11
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
10
12
  import PropTypes from "prop-types";
11
13
 
12
14
  import Input from "./Input";
@@ -60,7 +62,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
60
62
  onMouseUp={() => enableIncrease(false)}
61
63
  aria-label="Increase"
62
64
  >
63
- <i className="fas fa-plus" />
65
+ <FontAwesomeIcon icon={faPlus} />
64
66
  </button>
65
67
  <button
66
68
  type="button"
@@ -69,7 +71,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
69
71
  onMouseUp={() => enableDecrease(false)}
70
72
  aria-label="Decrease"
71
73
  >
72
- <i className="fas fa-minus" />
74
+ <FontAwesomeIcon icon={faMinus} />
73
75
  </button>
74
76
  </Input>
75
77
  );
@@ -7,6 +7,8 @@
7
7
 
8
8
  import React, { useState } from "react";
9
9
 
10
+ import { faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons";
11
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
10
12
  import PropTypes from "prop-types";
11
13
 
12
14
  import Input from "./Input";
@@ -44,8 +46,10 @@ function PasswordInput({ withEye, newPass, ...props }) {
44
46
  setHidden((shouldBeHidden) => !shouldBeHidden);
45
47
  }}
46
48
  >
47
- <i
48
- className={`fa ${isHidden ? "fa-eye" : "fa-eye-slash"}`}
49
+ <FontAwesomeIcon
50
+ icon={isHidden ? faEye : faEyeSlash}
51
+ style={{ width: "1.25rem" }}
52
+ className="text-dark"
49
53
  />
50
54
  </button>
51
55
  )}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
2
+ * Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
3
3
  *
4
4
  * This is free software, licensed under the GNU General Public License v3.
5
5
  * See /LICENSE for more information.
@@ -7,6 +7,7 @@
7
7
 
8
8
  import React, { useState } from "react";
9
9
 
10
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
10
11
  import PropTypes from "prop-types";
11
12
  import QRCode from "qrcode.react";
12
13
 
@@ -18,15 +19,12 @@ import {
18
19
  ModalFooter,
19
20
  ModalHeader,
20
21
  } from "../../bootstrap/Modal";
21
- import { ForisURLs } from "../../utils/forisUrls";
22
22
 
23
23
  WiFiQRCode.propTypes = {
24
24
  SSID: PropTypes.string.isRequired,
25
25
  password: PropTypes.string.isRequired,
26
26
  };
27
27
 
28
- const QR_ICON_PATH = `${ForisURLs.static}/imgs/QR_icon.svg`;
29
-
30
28
  export default function WiFiQRCode({ SSID, password }) {
31
29
  const [modal, setModal] = useState(false);
32
30
 
@@ -40,11 +38,11 @@ export default function WiFiQRCode({ SSID, password }) {
40
38
  setModal(true);
41
39
  }}
42
40
  >
43
- <img
44
- width="20"
45
- src={QR_ICON_PATH}
46
- alt="QR"
47
- style={{ opacity: 0.67 }}
41
+ <FontAwesomeIcon
42
+ icon="fa-solid fa-qrcode"
43
+ title={_("Show QR code")}
44
+ aria-label={_("Show QR code")}
45
+ className="text-dark"
48
46
  />
49
47
  </button>
50
48
  {modal ? (
@@ -88,7 +86,10 @@ function QRCodeModal({ shown, setShown, SSID, password }) {
88
86
  createAndDownloadPdf(SSID, password);
89
87
  }}
90
88
  >
91
- <i className="fas fa-file-download me-2" />
89
+ <FontAwesomeIcon
90
+ icon="fa-solid fa-file-download"
91
+ className="me-2"
92
+ />
92
93
  {_("Download PDF")}
93
94
  </Button>
94
95
  </ModalFooter>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foris",
3
- "version": "6.0.2",
3
+ "version": "6.0.3-beta.036f1919",
4
4
  "description": "Foris JS library is a set of components and utils for reForis application and plugins.",
5
5
  "author": "CZ.NIC, z.s.p.o.",
6
6
  "repository": {
@@ -14,6 +14,10 @@
14
14
  "license": "GPL-3.0",
15
15
  "main": "./index.js",
16
16
  "dependencies": {
17
+ "@fortawesome/fontawesome-svg-core": "^6.6.0",
18
+ "@fortawesome/free-regular-svg-icons": "^6.6.0",
19
+ "@fortawesome/free-solid-svg-icons": "^6.6.0",
20
+ "@fortawesome/react-fontawesome": "^0.2.2",
17
21
  "axios": "^1.7.2",
18
22
  "immutability-helper": "^3.1.1",
19
23
  "moment": "^2.30.1",
@@ -34,7 +38,6 @@
34
38
  "@babel/plugin-transform-runtime": "^7.24.7",
35
39
  "@babel/preset-env": "^7.24.7",
36
40
  "@babel/preset-react": "^7.24.7",
37
- "@fortawesome/fontawesome-free": "^6.5.2",
38
41
  "@testing-library/react": "^8.0.9",
39
42
  "babel-loader": "^8.1.0",
40
43
  "babel-polyfill": "^6.26.0",
@@ -1,10 +1,10 @@
1
1
  /*
2
- * Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
2
+ * Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
3
3
  *
4
4
  * This is free software, licensed under the GNU General Public License v3.
5
5
  * See /LICENSE for more information.
6
6
  */
7
-
7
+ import React from "react";
8
8
  import mockAxios from "jest-mock-axios";
9
9
  import moment from "moment-timezone";
10
10
  import "./mockGlobals";
@@ -26,3 +26,8 @@ jest.doMock("moment", () => {
26
26
  return moment;
27
27
  });
28
28
  Date.now = jest.fn(() => new Date(Date.UTC(2019, 1, 1, 12, 13, 14)).valueOf());
29
+
30
+ // Mock Font Awesome v6 library
31
+ jest.mock("@fortawesome/react-fontawesome", () => ({
32
+ FontAwesomeIcon: () => <i className="fa" />,
33
+ }));
@@ -8,15 +8,16 @@ msgstr ""
8
8
  "Project-Id-Version: PROJECT VERSION\n"
9
9
  "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
10
  "POT-Creation-Date: 2022-12-02 15:54+0100\n"
11
- "PO-Revision-Date: 2022-01-14 05:53+0000\n"
12
- "Last-Translator: Gabriel GRONDIN <gglinnk@protonmail.com>\n"
11
+ "PO-Revision-Date: 2024-07-27 01:09+0000\n"
12
+ "Last-Translator: Moha684 <nahil82466@gmail.com>\n"
13
+ "Language-Team: French <https://hosted.weblate.org/projects/turris/foris-js/"
14
+ "fr/>\n"
13
15
  "Language: fr\n"
14
- "Language-Team: French <https://hosted.weblate.org/projects/turris/foris-"
15
- "js/fr/>\n"
16
- "Plural-Forms: nplurals=2; plural=n > 1;\n"
17
16
  "MIME-Version: 1.0\n"
18
17
  "Content-Type: text/plain; charset=utf-8\n"
19
18
  "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=2; plural=n > 1;\n"
20
+ "X-Generator: Weblate 5.7-dev\n"
20
21
  "Generated-By: Babel 2.11.0\n"
21
22
 
22
23
  #: src/api/utils.js:61
@@ -37,11 +38,11 @@ msgstr "Une erreur d’API inconnue s’est produite."
37
38
 
38
39
  #: src/bootstrap/CopyInput.js:55
39
40
  msgid "Copied!"
40
- msgstr ""
41
+ msgstr "Copié!"
41
42
 
42
43
  #: src/bootstrap/CopyInput.js:55
43
44
  msgid "Copy"
44
- msgstr ""
45
+ msgstr "Copier"
45
46
 
46
47
  #: src/common/RebootButton.js:27
47
48
  msgid "Reboot request failed."
@@ -117,13 +118,15 @@ msgstr "Chiffrement"
117
118
 
118
119
  #: src/common/WiFiSettings/WiFiForm.js:226
119
120
  msgid "Disable Management Frame Protection"
120
- msgstr ""
121
+ msgstr "Désactiver le mode Protection du cadre de gestion"
121
122
 
122
123
  #: src/common/WiFiSettings/WiFiForm.js:227
123
124
  msgid ""
124
125
  "In case you have trouble connecting to WiFi Access Point, try disabling "
125
126
  "Management Frame Protection."
126
127
  msgstr ""
128
+ "Si vous rencontrez des soucis à vous connecter à un point d'accès WiFi, "
129
+ "merci d'essayer de désactiver le mode Protection du cadre de gestion."
127
130
 
128
131
  #: src/common/WiFiSettings/WiFiForm.js:262
129
132
  msgid "auto"
@@ -402,4 +405,3 @@ msgstr ""
402
405
  #~ "current Wi-Fi configuration and restore the default values.\n"
403
406
  #~ " "
404
407
  #~ msgstr ""
405
-
package/foris-6.0.2.tgz DELETED
Binary file