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

Update WiFiQRCode component

Remove custom QR icon image with a standard fontawesome icon
This commit is contained in:
Aleksandr Gumroian 2024-07-25 17:27:58 +03:00
parent 928cf716d6
commit 541ca7a784
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733
2 changed files with 17 additions and 23 deletions

View File

@ -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. * This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information. * See /LICENSE for more information.
@ -18,15 +18,12 @@ import {
ModalFooter, ModalFooter,
ModalHeader, ModalHeader,
} from "../../bootstrap/Modal"; } from "../../bootstrap/Modal";
import { ForisURLs } from "../../utils/forisUrls";
WiFiQRCode.propTypes = { WiFiQRCode.propTypes = {
SSID: PropTypes.string.isRequired, SSID: PropTypes.string.isRequired,
password: PropTypes.string.isRequired, password: PropTypes.string.isRequired,
}; };
const QR_ICON_PATH = `${ForisURLs.static}/imgs/QR_icon.svg`;
export default function WiFiQRCode({ SSID, password }) { export default function WiFiQRCode({ SSID, password }) {
const [modal, setModal] = useState(false); const [modal, setModal] = useState(false);
@ -40,11 +37,10 @@ export default function WiFiQRCode({ SSID, password }) {
setModal(true); setModal(true);
}} }}
> >
<img <i
width="20" className="fa-solid fa-qrcode"
src={QR_ICON_PATH} title={_("Show QR code")}
alt="QR" aria-label={_("Show QR code")}
style={{ opacity: 0.67 }}
/> />
</button> </button>
{modal ? ( {modal ? (

View File

@ -5,7 +5,7 @@ exports[`<WiFiSettings/> Snapshot 2.4 GHz 1`] = `
- First value - First value
+ Second value + Second value
@@ -243,207 +243,95 @@ @@ -242,207 +242,95 @@
value="0" value="0"
> >
auto auto
@ -339,7 +339,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
- First value - First value
+ Second value + Second value
@@ -527,10 +527,94 @@ @@ -526,10 +526,93 @@
<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>
@ -370,11 +370,10 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
+ class="input-group-text" + class="input-group-text"
+ type="button" + type="button"
+ > + >
+ <img + <i
+ alt="QR" + aria-label="Show QR code"
+ src="/reforis/static/reforis/imgs/QR_icon.svg" + class="fa-solid fa-qrcode"
+ style="opacity: 0.67;" + title="Show QR code"
+ width="20"
+ /> + />
+ </button> + </button>
+ </div> + </div>
@ -434,7 +433,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
@@ -553,10 +637,11 @@ @@ -552,10 +635,11 @@
<div <div
class="text-end" class="text-end"
> >
@ -453,7 +452,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
- First value - First value
+ Second value + Second value
@@ -21,10 +21,516 @@ @@ -21,10 +21,515 @@
> >
Wi-Fi 1 Wi-Fi 1
</h2> </h2>
@ -482,11 +481,10 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ class="input-group-text" + class="input-group-text"
+ type="button" + type="button"
+ > + >
+ <img + <i
+ alt="QR" + aria-label="Show QR code"
+ src="/reforis/static/reforis/imgs/QR_icon.svg" + class="fa-solid fa-qrcode"
+ style="opacity: 0.67;" + title="Show QR code"
+ width="20"
+ /> + />
+ </button> + </button>
+ </div> + </div>