From 541ca7a78430384d3d94e9a83d46ebe1cd4b71ea Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Thu, 25 Jul 2024 17:27:58 +0300 Subject: [PATCH] Update WiFiQRCode component Remove custom QR icon image with a standard fontawesome icon --- src/common/WiFiSettings/WiFiQRCode.js | 14 ++++------ .../__snapshots__/WiFiSettings.test.js.snap | 26 +++++++++---------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/common/WiFiSettings/WiFiQRCode.js b/src/common/WiFiSettings/WiFiQRCode.js index d33a225..9930ba7 100644 --- a/src/common/WiFiSettings/WiFiQRCode.js +++ b/src/common/WiFiSettings/WiFiQRCode.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 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. * See /LICENSE for more information. @@ -18,15 +18,12 @@ import { ModalFooter, ModalHeader, } from "../../bootstrap/Modal"; -import { ForisURLs } from "../../utils/forisUrls"; WiFiQRCode.propTypes = { SSID: PropTypes.string.isRequired, password: PropTypes.string.isRequired, }; -const QR_ICON_PATH = `${ForisURLs.static}/imgs/QR_icon.svg`; - export default function WiFiQRCode({ SSID, password }) { const [modal, setModal] = useState(false); @@ -40,11 +37,10 @@ export default function WiFiQRCode({ SSID, password }) { setModal(true); }} > - QR {modal ? ( diff --git a/src/common/WiFiSettings/__tests__/__snapshots__/WiFiSettings.test.js.snap b/src/common/WiFiSettings/__tests__/__snapshots__/WiFiSettings.test.js.snap index 3e7548b..2e5c12c 100644 --- a/src/common/WiFiSettings/__tests__/__snapshots__/WiFiSettings.test.js.snap +++ b/src/common/WiFiSettings/__tests__/__snapshots__/WiFiSettings.test.js.snap @@ -5,7 +5,7 @@ exports[` Snapshot 2.4 GHz 1`] = ` - First value + Second value -@@ -243,207 +243,95 @@ +@@ -242,207 +242,95 @@ value="0" > auto @@ -339,7 +339,7 @@ exports[` Snapshot guest network. 1`] = ` - First value + Second value -@@ -527,10 +527,94 @@ +@@ -526,10 +526,93 @@ 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. @@ -370,11 +370,10 @@ exports[` Snapshot guest network. 1`] = ` + class="input-group-text" + type="button" + > -+ QR + + @@ -434,7 +433,7 @@ exports[` Snapshot guest network. 1`] = ` class="form-check form-switch mb-3 d-flex align-items-center" > @@ -453,7 +452,7 @@ exports[` Snapshot one module enabled. 1`] = ` - First value + Second value -@@ -21,10 +21,516 @@ +@@ -21,10 +21,515 @@ > Wi-Fi 1 @@ -482,11 +481,10 @@ exports[` Snapshot one module enabled. 1`] = ` + class="input-group-text" + type="button" + > -+ QR + +