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

Merge branch 'fix-icons-color' into 'dev'

Update icon color classes & refactoring

See merge request turris/reforis/foris-js!233
This commit is contained in:
Aleksandr Gumroian 2024-08-30 15:49:45 +02:00
commit 380a388a38
4 changed files with 26 additions and 24 deletions

View File

@ -49,7 +49,7 @@ function PasswordInput({ withEye, newPass, ...props }) {
<FontAwesomeIcon <FontAwesomeIcon
icon={isHidden ? faEye : faEyeSlash} icon={isHidden ? faEye : faEyeSlash}
style={{ width: "1.25rem" }} style={{ width: "1.25rem" }}
className="text-dark" className="text-secondary"
/> />
</button> </button>
)} )}

View File

@ -68,14 +68,11 @@ export default function WifiGuestForm({
}))} }))}
{...props} {...props}
> >
<div className="input-group-append"> <WiFiQRCode
<WiFiQRCode SSID={formData.SSID}
SSID={formData.SSID} password={formData.password}
password={formData.password} />
/>
</div>
</TextInput> </TextInput>
<PasswordInput <PasswordInput
withEye withEye
label={_("Password")} label={_("Password")}

View File

@ -42,7 +42,7 @@ export default function WiFiQRCode({ SSID, password }) {
icon="fa-solid fa-qrcode" icon="fa-solid fa-qrcode"
title={_("Show QR code")} title={_("Show QR code")}
aria-label={_("Show QR code")} aria-label={_("Show QR code")}
className="text-dark" className="text-secondary"
/> />
</button> </button>
{modal ? ( {modal ? (
@ -70,17 +70,26 @@ function QRCodeModal({ shown, setShown, SSID, password }) {
<ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} /> <ModalHeader setShown={setShown} title={_("Wi-Fi QR Code")} />
<ModalBody> <ModalBody>
<QRCode <QRCode
className="d-block mx-auto img-logo-black"
renderAs="svg" renderAs="svg"
value={toQRCodeContent(SSID, password)} value={toQRCodeContent(SSID, password)}
level="M" level="M"
size={350} size={350}
includeMargin includeMargin
style={{ display: "block", margin: "auto" }}
/> />
</ModalBody> </ModalBody>
<ModalFooter> <ModalFooter>
<Button <Button
className="btn-outline-primary" className="btn-secondary"
onClick={(e) => {
e.preventDefault();
setShown(false);
}}
>
{_("Close")}
</Button>
<Button
className="btn-primary"
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
createAndDownloadPdf(SSID, password); createAndDownloadPdf(SSID, password);

View File

@ -339,7 +339,7 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
- First value - First value
+ Second value + Second value
@@ -524,10 +524,91 @@ @@ -524,10 +524,87 @@
<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>
@ -363,18 +363,14 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
+ type="text" + type="text"
+ value="TestGuestSSID" + value="TestGuestSSID"
+ /> + />
+ <div + <button
+ class="input-group-append" + class="input-group-text"
+ type="button"
+ > + >
+ <button + <i
+ class="input-group-text" + class="fa"
+ type="button" + />
+ > + </button>
+ <i
+ class="fa"
+ />
+ </button>
+ </div>
+ </div> + </div>
+ <div + <div
+ class="form-text" + class="form-text"
@ -431,7 +427,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
@@ -550,10 +631,11 @@ @@ -550,10 +627,11 @@
<div <div
class="text-end" class="text-end"
> >