mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-11-14 17:35:35 +01:00
Compare commits
4 Commits
6bd809222c
...
5ed48bf2a3
Author | SHA1 | Date | |
---|---|---|---|
|
5ed48bf2a3 | ||
|
c8fbdc5bba | ||
|
46bd8edcea | ||
|
42fcc02d83 |
1
Makefile
1
Makefile
|
@ -11,6 +11,7 @@ MSGID_BUGS_ADDRESS="tech.support@turris.cz"
|
|||
|
||||
DEV_PYTHON=python3
|
||||
VENV_NAME?=venv
|
||||
JS_DIR=js
|
||||
VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin
|
||||
|
||||
.PHONY: all
|
||||
|
|
|
@ -2,55 +2,51 @@
|
|||
|
||||
exports[`<Checkbox/> Render checkbox 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3 form-check"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-checkbox "
|
||||
>
|
||||
<input
|
||||
checked=""
|
||||
class="custom-control-input"
|
||||
class="form-check-input"
|
||||
id="1"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
</label>
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`<Checkbox/> Render uncheked checkbox 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3 form-check"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-checkbox "
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input"
|
||||
id="1"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
</label>
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
exports[`<NumberInput/> Render number input 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3"
|
||||
>
|
||||
<label
|
||||
class="form-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
|
@ -18,9 +19,6 @@ exports[`<NumberInput/> Render number input 1`] = `
|
|||
type="number"
|
||||
value="1"
|
||||
/>
|
||||
<div
|
||||
class="input-group-append"
|
||||
>
|
||||
<button
|
||||
aria-label="Increase"
|
||||
class="btn btn-outline-secondary"
|
||||
|
@ -40,11 +38,12 @@ exports[`<NumberInput/> Render number input 1`] = `
|
|||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
exports[`<PasswordInput/> Render password input 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3"
|
||||
>
|
||||
<label
|
||||
class="form-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
|
@ -20,10 +21,12 @@ exports[`<PasswordInput/> Render password input 1`] = `
|
|||
value="Some password"
|
||||
/>
|
||||
</div>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
exports[`<RadioSet/> Render radio set 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3"
|
||||
>
|
||||
<label
|
||||
class="d-block"
|
||||
|
@ -11,61 +11,63 @@ exports[`<RadioSet/> Render radio set 1`] = `
|
|||
Radios set label
|
||||
</label>
|
||||
<div
|
||||
class="custom-control custom-radio"
|
||||
class="mb-2"
|
||||
>
|
||||
<input
|
||||
checked=""
|
||||
class="custom-control-input"
|
||||
class="form-check-input me-2"
|
||||
id="test_name-0"
|
||||
name="test_name"
|
||||
type="radio"
|
||||
value="value"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="test_name-0"
|
||||
>
|
||||
label
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
class="custom-control custom-radio"
|
||||
class="mb-2"
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input me-2"
|
||||
id="test_name-1"
|
||||
name="test_name"
|
||||
type="radio"
|
||||
value="another value"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="test_name-1"
|
||||
>
|
||||
another label
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
class="custom-control custom-radio"
|
||||
class="mb-2"
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input me-2"
|
||||
id="test_name-2"
|
||||
name="test_name"
|
||||
type="radio"
|
||||
value="another on value"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="test_name-2"
|
||||
>
|
||||
another one label
|
||||
</label>
|
||||
</div>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
exports[`<Select/> Test with snapshot. 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3"
|
||||
>
|
||||
<label
|
||||
class="form-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
</label>
|
||||
<select
|
||||
class="custom-select"
|
||||
class="form-select"
|
||||
id="1"
|
||||
>
|
||||
<option
|
||||
|
@ -30,11 +31,13 @@ exports[`<Select/> Test with snapshot. 1`] = `
|
|||
three
|
||||
</option>
|
||||
</select>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Help text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -2,26 +2,25 @@
|
|||
|
||||
exports[`<Switch/> Render switch 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="form-check form-switch mb-3 null"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-switch"
|
||||
>
|
||||
<input
|
||||
checked=""
|
||||
class="custom-control-input"
|
||||
class="form-check-input"
|
||||
id="1"
|
||||
role="switch"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
</label>
|
||||
<small
|
||||
class="form-text text-muted mt-0 mb-3"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
|
@ -30,25 +29,24 @@ exports[`<Switch/> Render switch 1`] = `
|
|||
|
||||
exports[`<Switch/> Render uncheked switch 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="form-check form-switch mb-3 null"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-switch"
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input"
|
||||
id="1"
|
||||
role="switch"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
</label>
|
||||
<small
|
||||
class="form-text text-muted mt-0 mb-3"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
exports[`<TextInput/> Render text input 1`] = `
|
||||
<div
|
||||
class="form-group"
|
||||
class="mb-3"
|
||||
>
|
||||
<label
|
||||
class="form-label"
|
||||
for="1"
|
||||
>
|
||||
Test label
|
||||
|
@ -19,10 +20,12 @@ exports[`<TextInput/> Render text input 1`] = `
|
|||
value="Some text"
|
||||
/>
|
||||
</div>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
<div
|
||||
class="form-text"
|
||||
>
|
||||
<small>
|
||||
Some help text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -5,7 +5,7 @@ exports[`<WiFiSettings/> Snapshot 2.4 GHz 1`] = `
|
|||
- First value
|
||||
+ Second value
|
||||
|
||||
@@ -241,207 +241,95 @@
|
||||
@@ -243,207 +243,95 @@
|
||||
value=\\"0\\"
|
||||
>
|
||||
auto
|
||||
|
@ -255,53 +255,51 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
|
|||
>
|
||||
<form>
|
||||
<div
|
||||
class="form-group switch"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-switch custom-control-inline switch-heading"
|
||||
class="form-check form-switch mb-3 d-flex align-items-center"
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input me-2"
|
||||
id="1"
|
||||
role="switch"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="1"
|
||||
>
|
||||
<h2>
|
||||
<h2
|
||||
class="mb-0"
|
||||
>
|
||||
Wi-Fi 1
|
||||
</h2>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div
|
||||
class="form-group switch"
|
||||
>
|
||||
<div
|
||||
class="custom-control custom-switch custom-control-inline switch-heading"
|
||||
class="form-check form-switch mb-3 d-flex align-items-center"
|
||||
>
|
||||
<input
|
||||
class="custom-control-input"
|
||||
class="form-check-input me-2"
|
||||
id="2"
|
||||
role="switch"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="custom-control-label"
|
||||
class="form-check-label"
|
||||
for="2"
|
||||
>
|
||||
<h2>
|
||||
<h2
|
||||
class="mb-0"
|
||||
>
|
||||
Wi-Fi 2
|
||||
</h2>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="text-end"
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
type="submit"
|
||||
>
|
||||
<span>
|
||||
|
@ -324,7 +322,7 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
|
|||
class="text-end"
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
|
@ -341,16 +339,17 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||
- First value
|
||||
+ Second value
|
||||
|
||||
@@ -524,10 +524,92 @@
|
||||
>
|
||||
@@ -527,10 +527,94 @@
|
||||
<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.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"24\\"
|
||||
+ >
|
||||
+ SSID
|
||||
|
@ -380,16 +379,19 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||
+ </button>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ SSID which contains non-standard characters could cause problems on some devices.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"25\\"
|
||||
+ >
|
||||
+ Password
|
||||
|
@ -405,9 +407,6 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||
+ type=\\"password\\"
|
||||
+ value=\\"\\"
|
||||
+ />
|
||||
+ <div
|
||||
+ class=\\"input-group-append\\"
|
||||
+ >
|
||||
+ <button
|
||||
+ class=\\"input-group-text\\"
|
||||
+ type=\\"button\\"
|
||||
|
@ -417,29 +416,30 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
|||
+ />
|
||||
+ </button>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"invalid-feedback\\"
|
||||
+ >
|
||||
+ Password must contain at least 8 symbols
|
||||
+ </div>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
<hr />
|
||||
<div
|
||||
class=\\"form-group switch\\"
|
||||
class=\\"form-check form-switch mb-3 d-flex align-items-center\\"
|
||||
>
|
||||
<div
|
||||
@@ -551,10 +633,11 @@
|
||||
<input
|
||||
@@ -553,10 +637,11 @@
|
||||
<div
|
||||
class=\\"text-end\\"
|
||||
>
|
||||
<button
|
||||
class=\\"btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center\\"
|
||||
class=\\"btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center\\"
|
||||
+ disabled=\\"\\"
|
||||
type=\\"submit\\"
|
||||
>
|
||||
|
@ -453,16 +453,17 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
- First value
|
||||
+ Second value
|
||||
|
||||
@@ -22,10 +22,512 @@
|
||||
@@ -21,10 +21,516 @@
|
||||
>
|
||||
Wi-Fi 1
|
||||
</h2>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"4\\"
|
||||
+ >
|
||||
+ SSID
|
||||
|
@ -477,9 +478,6 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ type=\\"text\\"
|
||||
+ value=\\"TestSSID1\\"
|
||||
+ />
|
||||
+ <div
|
||||
+ class=\\"input-group-append\\"
|
||||
+ >
|
||||
+ <button
|
||||
+ class=\\"input-group-text\\"
|
||||
+ type=\\"button\\"
|
||||
|
@ -492,17 +490,19 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ />
|
||||
+ </button>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ SSID which contains non-standard characters could cause problems on some devices.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"5\\"
|
||||
+ >
|
||||
+ Password
|
||||
|
@ -518,9 +518,6 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ type=\\"password\\"
|
||||
+ value=\\"TestPass\\"
|
||||
+ />
|
||||
+ <div
|
||||
+ class=\\"input-group-append\\"
|
||||
+ >
|
||||
+ <button
|
||||
+ class=\\"input-group-text\\"
|
||||
+ type=\\"button\\"
|
||||
|
@ -530,39 +527,39 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ />
|
||||
+ </button>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ >
|
||||
+ <div
|
||||
+ class=\\"custom-control custom-switch\\"
|
||||
+ class=\\"form-check form-switch mb-3 null\\"
|
||||
+ >
|
||||
+ <input
|
||||
+ class=\\"custom-control-input\\"
|
||||
+ class=\\"form-check-input\\"
|
||||
+ id=\\"6\\"
|
||||
+ role=\\"switch\\"
|
||||
+ type=\\"checkbox\\"
|
||||
+ />
|
||||
+ <label
|
||||
+ class=\\"custom-control-label\\"
|
||||
+ class=\\"form-check-label\\"
|
||||
+ for=\\"6\\"
|
||||
+ >
|
||||
+ Hide SSID
|
||||
+ </label>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ If set, network is not visible when scanning for available networks.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"d-block\\"
|
||||
|
@ -571,56 +568,59 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ GHz
|
||||
+ </label>
|
||||
+ <div
|
||||
+ class=\\"custom-control custom-radio custom-control-inline\\"
|
||||
+ class=\\"mb-2 form-check form-check-inline\\"
|
||||
+ >
|
||||
+ <input
|
||||
+ class=\\"custom-control-input\\"
|
||||
+ class=\\"form-check-input me-2\\"
|
||||
+ id=\\"hwmode-0-0\\"
|
||||
+ name=\\"hwmode-0\\"
|
||||
+ type=\\"radio\\"
|
||||
+ value=\\"11g\\"
|
||||
+ />
|
||||
+ <label
|
||||
+ class=\\"custom-control-label\\"
|
||||
+ class=\\"form-check-label\\"
|
||||
+ for=\\"hwmode-0-0\\"
|
||||
+ >
|
||||
+ 2.4
|
||||
+ </label>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"custom-control custom-radio custom-control-inline\\"
|
||||
+ class=\\"mb-2 form-check form-check-inline\\"
|
||||
+ >
|
||||
+ <input
|
||||
+ checked=\\"\\"
|
||||
+ class=\\"custom-control-input\\"
|
||||
+ class=\\"form-check-input me-2\\"
|
||||
+ id=\\"hwmode-0-1\\"
|
||||
+ name=\\"hwmode-0\\"
|
||||
+ type=\\"radio\\"
|
||||
+ value=\\"11a\\"
|
||||
+ />
|
||||
+ <label
|
||||
+ class=\\"custom-control-label\\"
|
||||
+ class=\\"form-check-label\\"
|
||||
+ for=\\"hwmode-0-1\\"
|
||||
+ >
|
||||
+ 5
|
||||
+ </label>
|
||||
+ </div>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ The 2.4 GHz band is more widely supported by clients, but tends to have more interference. The 5 GHz band is a newer standard and may not be supported by all your devices. It usually has less interference, but the signal does not carry so well indoors.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"8\\"
|
||||
+ >
|
||||
+ 802.11n/ac/ax mode
|
||||
+ </label>
|
||||
+ <select
|
||||
+ class=\\"custom-select\\"
|
||||
+ class=\\"form-select\\"
|
||||
+ id=\\"8\\"
|
||||
+ >
|
||||
+ <option
|
||||
|
@ -654,22 +654,25 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ 802.11ac - 80 MHz wide channel
|
||||
+ </option>
|
||||
+ </select>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ Change this to adjust 802.11n/ac/ax mode of operation. 802.11n with 40 MHz wide channels can yield higher throughput but can cause more interference in the network. If you don't know what to choose, use the default option with 20 MHz wide channel.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"9\\"
|
||||
+ >
|
||||
+ Channel
|
||||
+ </label>
|
||||
+ <select
|
||||
+ class=\\"custom-select\\"
|
||||
+ class=\\"form-select\\"
|
||||
+ id=\\"9\\"
|
||||
+ >
|
||||
+ <option
|
||||
|
@ -880,15 +883,16 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ </select>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ class=\\"mb-3\\"
|
||||
+ >
|
||||
+ <label
|
||||
+ class=\\"form-label\\"
|
||||
+ for=\\"10\\"
|
||||
+ >
|
||||
+ Encryption
|
||||
+ </label>
|
||||
+ <select
|
||||
+ class=\\"custom-select\\"
|
||||
+ class=\\"form-select\\"
|
||||
+ id=\\"10\\"
|
||||
+ >
|
||||
+ <option
|
||||
|
@ -907,63 +911,63 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
|||
+ WPA2 only
|
||||
+ </option>
|
||||
+ </select>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ The WPA3 standard is the new most secure encryption method that is suggested to be used with any device that supports it. The older devices without WPA3 support require older WPA2. If you experience issues with connecting older devices, try to enable WPA2.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ >
|
||||
+ <div
|
||||
+ class=\\"custom-control custom-switch\\"
|
||||
+ class=\\"form-check form-switch mb-3 null\\"
|
||||
+ >
|
||||
+ <input
|
||||
+ class=\\"custom-control-input\\"
|
||||
+ class=\\"form-check-input\\"
|
||||
+ id=\\"11\\"
|
||||
+ role=\\"switch\\"
|
||||
+ type=\\"checkbox\\"
|
||||
+ />
|
||||
+ <label
|
||||
+ class=\\"custom-control-label\\"
|
||||
+ class=\\"form-check-label\\"
|
||||
+ for=\\"11\\"
|
||||
+ >
|
||||
+ Disable Management Frame Protection
|
||||
+ </label>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <small>
|
||||
+ In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <div
|
||||
+ class=\\"form-group\\"
|
||||
+ >
|
||||
+ <div
|
||||
+ class=\\"custom-control custom-switch\\"
|
||||
+ class=\\"form-check form-switch mb-3 null\\"
|
||||
+ >
|
||||
+ <input
|
||||
+ class=\\"custom-control-input\\"
|
||||
+ class=\\"form-check-input\\"
|
||||
+ id=\\"12\\"
|
||||
+ role=\\"switch\\"
|
||||
+ type=\\"checkbox\\"
|
||||
+ />
|
||||
+ <label
|
||||
+ class=\\"custom-control-label\\"
|
||||
+ class=\\"form-check-label\\"
|
||||
+ for=\\"12\\"
|
||||
+ >
|
||||
+ Enable Guest Wi-Fi
|
||||
+ </label>
|
||||
+ <small
|
||||
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||
+ <div
|
||||
+ class=\\"form-text\\"
|
||||
+ >
|
||||
+ <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.
|
||||
+ </small>
|
||||
+ </div>
|
||||
+ </div>
|
||||
<hr />
|
||||
<div
|
||||
class=\\"form-group switch\\"
|
||||
class=\\"form-check form-switch mb-3 d-flex align-items-center\\"
|
||||
>
|
||||
<div"
|
||||
<input"
|
||||
`;
|
||||
|
|
|
@ -25,15 +25,10 @@ exports[`<RebootButton/> Render modal. 1`] = `
|
|||
Warning!
|
||||
</h5>
|
||||
<button
|
||||
class="close"
|
||||
aria-label="Close"
|
||||
class="btn-close"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
>
|
||||
×
|
||||
</span>
|
||||
</button>
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="modal-body"
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("AlertContext", () => {
|
|||
// Alert is present
|
||||
expect(getByText(componentContainer, "Alert content")).toBeDefined();
|
||||
|
||||
fireEvent.click(componentContainer.querySelector(".close"));
|
||||
fireEvent.click(componentContainer.querySelector(".btn-close"));
|
||||
// Alert is gone
|
||||
expect(queryByText(componentContainer, "Alert content")).toBeNull();
|
||||
});
|
||||
|
|
|
@ -6,14 +6,13 @@ exports[`AlertContext should render alert 1`] = `
|
|||
id="alert-container"
|
||||
>
|
||||
<div
|
||||
class="alert alert-dismissible alert-danger"
|
||||
class="alert alert-danger alert-dismissible"
|
||||
>
|
||||
<button
|
||||
class="close"
|
||||
aria-label="Close"
|
||||
class="btn-close"
|
||||
type="button"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
/>
|
||||
Alert content
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
exports[`<SubmitButton/> Render load 1`] = `
|
||||
<div>
|
||||
<button
|
||||
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
disabled=""
|
||||
type="submit"
|
||||
>
|
||||
|
@ -22,7 +22,7 @@ exports[`<SubmitButton/> Render load 1`] = `
|
|||
exports[`<SubmitButton/> Render ready 1`] = `
|
||||
<div>
|
||||
<button
|
||||
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
type="submit"
|
||||
>
|
||||
<span>
|
||||
|
@ -35,7 +35,7 @@ exports[`<SubmitButton/> Render ready 1`] = `
|
|||
exports[`<SubmitButton/> Render saving 1`] = `
|
||||
<div>
|
||||
<button
|
||||
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||
disabled=""
|
||||
type="submit"
|
||||
>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { Tooltip } from "bootstrap/dist/js/bootstrap.bundle.min.js";
|
||||
import { Tooltip } from "bootstrap/dist/js/bootstrap.bundle.min";
|
||||
|
||||
/** Execute callback when condition is set to true. */
|
||||
export function useConditionalTimeout(
|
||||
|
@ -42,14 +42,15 @@ export function useClickOutside(element, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
/** useTooltip hook for Bootstrap tooltips. */
|
||||
export function useTooltip(description, placement = "top", trigger = "hover") {
|
||||
const tooltipRef = useRef();
|
||||
|
||||
useEffect(() => {
|
||||
const tooltip = new Tooltip(tooltipRef.current, {
|
||||
title: description,
|
||||
placement: placement,
|
||||
trigger: trigger,
|
||||
placement,
|
||||
trigger,
|
||||
});
|
||||
|
||||
return () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user