mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-11-14 17:35:35 +01:00
Compare commits
2 Commits
5ed48bf2a3
...
6bd809222c
Author | SHA1 | Date | |
---|---|---|---|
|
6bd809222c | ||
|
c008d7bcc7 |
1
Makefile
1
Makefile
|
@ -11,7 +11,6 @@ MSGID_BUGS_ADDRESS="tech.support@turris.cz"
|
||||||
|
|
||||||
DEV_PYTHON=python3
|
DEV_PYTHON=python3
|
||||||
VENV_NAME?=venv
|
VENV_NAME?=venv
|
||||||
JS_DIR=js
|
|
||||||
VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin
|
VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
0
src/bootstrap/Tooltip.js
Normal file
0
src/bootstrap/Tooltip.js
Normal file
|
@ -2,51 +2,55 @@
|
||||||
|
|
||||||
exports[`<Checkbox/> Render checkbox 1`] = `
|
exports[`<Checkbox/> Render checkbox 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3 form-check"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<input
|
|
||||||
checked=""
|
|
||||||
class="form-check-input"
|
|
||||||
id="1"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="1"
|
|
||||||
>
|
|
||||||
Test label
|
|
||||||
</label>
|
|
||||||
<div
|
<div
|
||||||
class="form-text"
|
class="custom-control custom-checkbox "
|
||||||
>
|
>
|
||||||
<small>
|
<input
|
||||||
Some help text
|
checked=""
|
||||||
</small>
|
class="custom-control-input"
|
||||||
|
id="1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="1"
|
||||||
|
>
|
||||||
|
Test label
|
||||||
|
<small
|
||||||
|
class="form-text text-muted"
|
||||||
|
>
|
||||||
|
Some help text
|
||||||
|
</small>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Checkbox/> Render uncheked checkbox 1`] = `
|
exports[`<Checkbox/> Render uncheked checkbox 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3 form-check"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<input
|
|
||||||
class="form-check-input"
|
|
||||||
id="1"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="1"
|
|
||||||
>
|
|
||||||
Test label
|
|
||||||
</label>
|
|
||||||
<div
|
<div
|
||||||
class="form-text"
|
class="custom-control custom-checkbox "
|
||||||
>
|
>
|
||||||
<small>
|
<input
|
||||||
Some help text
|
class="custom-control-input"
|
||||||
</small>
|
id="1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="1"
|
||||||
|
>
|
||||||
|
Test label
|
||||||
|
<small
|
||||||
|
class="form-text text-muted"
|
||||||
|
>
|
||||||
|
Some help text
|
||||||
|
</small>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
exports[`<NumberInput/> Render number input 1`] = `
|
exports[`<NumberInput/> Render number input 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="form-label"
|
|
||||||
for="1"
|
for="1"
|
||||||
>
|
>
|
||||||
Test label
|
Test label
|
||||||
|
@ -19,31 +18,33 @@ exports[`<NumberInput/> Render number input 1`] = `
|
||||||
type="number"
|
type="number"
|
||||||
value="1"
|
value="1"
|
||||||
/>
|
/>
|
||||||
<button
|
<div
|
||||||
aria-label="Increase"
|
class="input-group-append"
|
||||||
class="btn btn-outline-secondary"
|
|
||||||
type="button"
|
|
||||||
>
|
>
|
||||||
<i
|
<button
|
||||||
class="fas fa-plus"
|
aria-label="Increase"
|
||||||
/>
|
class="btn btn-outline-secondary"
|
||||||
</button>
|
type="button"
|
||||||
<button
|
>
|
||||||
aria-label="Decrease"
|
<i
|
||||||
class="btn btn-outline-secondary"
|
class="fas fa-plus"
|
||||||
type="button"
|
/>
|
||||||
>
|
</button>
|
||||||
<i
|
<button
|
||||||
class="fas fa-minus"
|
aria-label="Decrease"
|
||||||
/>
|
class="btn btn-outline-secondary"
|
||||||
</button>
|
type="button"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="fas fa-minus"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<small
|
||||||
class="form-text"
|
class="form-text text-muted"
|
||||||
>
|
>
|
||||||
<small>
|
Some help text
|
||||||
Some help text
|
</small>
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
exports[`<PasswordInput/> Render password input 1`] = `
|
exports[`<PasswordInput/> Render password input 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="form-label"
|
|
||||||
for="1"
|
for="1"
|
||||||
>
|
>
|
||||||
Test label
|
Test label
|
||||||
|
@ -21,12 +20,10 @@ exports[`<PasswordInput/> Render password input 1`] = `
|
||||||
value="Some password"
|
value="Some password"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<small
|
||||||
class="form-text"
|
class="form-text text-muted"
|
||||||
>
|
>
|
||||||
<small>
|
Some help text
|
||||||
Some help text
|
</small>
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
exports[`<RadioSet/> Render radio set 1`] = `
|
exports[`<RadioSet/> Render radio set 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="d-block"
|
class="d-block"
|
||||||
|
@ -11,63 +11,61 @@ exports[`<RadioSet/> Render radio set 1`] = `
|
||||||
Radios set label
|
Radios set label
|
||||||
</label>
|
</label>
|
||||||
<div
|
<div
|
||||||
class="mb-2"
|
class="custom-control custom-radio"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
checked=""
|
checked=""
|
||||||
class="form-check-input me-2"
|
class="custom-control-input"
|
||||||
id="test_name-0"
|
id="test_name-0"
|
||||||
name="test_name"
|
name="test_name"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="value"
|
value="value"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
class="form-check-label"
|
class="custom-control-label"
|
||||||
for="test_name-0"
|
for="test_name-0"
|
||||||
>
|
>
|
||||||
label
|
label
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mb-2"
|
class="custom-control custom-radio"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
class="form-check-input me-2"
|
class="custom-control-input"
|
||||||
id="test_name-1"
|
id="test_name-1"
|
||||||
name="test_name"
|
name="test_name"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="another value"
|
value="another value"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
class="form-check-label"
|
class="custom-control-label"
|
||||||
for="test_name-1"
|
for="test_name-1"
|
||||||
>
|
>
|
||||||
another label
|
another label
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mb-2"
|
class="custom-control custom-radio"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
class="form-check-input me-2"
|
class="custom-control-input"
|
||||||
id="test_name-2"
|
id="test_name-2"
|
||||||
name="test_name"
|
name="test_name"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="another on value"
|
value="another on value"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
class="form-check-label"
|
class="custom-control-label"
|
||||||
for="test_name-2"
|
for="test_name-2"
|
||||||
>
|
>
|
||||||
another one label
|
another one label
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<small
|
||||||
class="form-text"
|
class="form-text text-muted"
|
||||||
>
|
>
|
||||||
<small>
|
Some help text
|
||||||
Some help text
|
</small>
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
exports[`<Select/> Test with snapshot. 1`] = `
|
exports[`<Select/> Test with snapshot. 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="form-label"
|
|
||||||
for="1"
|
for="1"
|
||||||
>
|
>
|
||||||
Test label
|
Test label
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
class="form-select"
|
class="custom-select"
|
||||||
id="1"
|
id="1"
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
|
@ -31,13 +30,11 @@ exports[`<Select/> Test with snapshot. 1`] = `
|
||||||
three
|
three
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<div
|
<small
|
||||||
class="form-text"
|
class="form-text text-muted"
|
||||||
>
|
>
|
||||||
<small>
|
Help text
|
||||||
Help text
|
</small>
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -2,25 +2,26 @@
|
||||||
|
|
||||||
exports[`<Switch/> Render switch 1`] = `
|
exports[`<Switch/> Render switch 1`] = `
|
||||||
<div
|
<div
|
||||||
class="form-check form-switch mb-3 null"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<input
|
|
||||||
checked=""
|
|
||||||
class="form-check-input"
|
|
||||||
id="1"
|
|
||||||
role="switch"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="1"
|
|
||||||
>
|
|
||||||
Test label
|
|
||||||
</label>
|
|
||||||
<div
|
<div
|
||||||
class="form-text"
|
class="custom-control custom-switch"
|
||||||
>
|
>
|
||||||
<small>
|
<input
|
||||||
|
checked=""
|
||||||
|
class="custom-control-input"
|
||||||
|
id="1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="1"
|
||||||
|
>
|
||||||
|
Test label
|
||||||
|
</label>
|
||||||
|
<small
|
||||||
|
class="form-text text-muted mt-0 mb-3"
|
||||||
|
>
|
||||||
Some help text
|
Some help text
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,24 +30,25 @@ exports[`<Switch/> Render switch 1`] = `
|
||||||
|
|
||||||
exports[`<Switch/> Render uncheked switch 1`] = `
|
exports[`<Switch/> Render uncheked switch 1`] = `
|
||||||
<div
|
<div
|
||||||
class="form-check form-switch mb-3 null"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<input
|
|
||||||
class="form-check-input"
|
|
||||||
id="1"
|
|
||||||
role="switch"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="1"
|
|
||||||
>
|
|
||||||
Test label
|
|
||||||
</label>
|
|
||||||
<div
|
<div
|
||||||
class="form-text"
|
class="custom-control custom-switch"
|
||||||
>
|
>
|
||||||
<small>
|
<input
|
||||||
|
class="custom-control-input"
|
||||||
|
id="1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="1"
|
||||||
|
>
|
||||||
|
Test label
|
||||||
|
</label>
|
||||||
|
<small
|
||||||
|
class="form-text text-muted mt-0 mb-3"
|
||||||
|
>
|
||||||
Some help text
|
Some help text
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
exports[`<TextInput/> Render text input 1`] = `
|
exports[`<TextInput/> Render text input 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mb-3"
|
class="form-group"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="form-label"
|
|
||||||
for="1"
|
for="1"
|
||||||
>
|
>
|
||||||
Test label
|
Test label
|
||||||
|
@ -20,12 +19,10 @@ exports[`<TextInput/> Render text input 1`] = `
|
||||||
value="Some text"
|
value="Some text"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<small
|
||||||
class="form-text"
|
class="form-text text-muted"
|
||||||
>
|
>
|
||||||
<small>
|
Some help text
|
||||||
Some help text
|
</small>
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -5,7 +5,7 @@ exports[`<WiFiSettings/> Snapshot 2.4 GHz 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -243,207 +243,95 @@
|
@@ -241,207 +241,95 @@
|
||||||
value=\\"0\\"
|
value=\\"0\\"
|
||||||
>
|
>
|
||||||
auto
|
auto
|
||||||
|
@ -255,51 +255,53 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
|
||||||
>
|
>
|
||||||
<form>
|
<form>
|
||||||
<div
|
<div
|
||||||
class="form-check form-switch mb-3 d-flex align-items-center"
|
class="form-group switch"
|
||||||
>
|
>
|
||||||
<input
|
<div
|
||||||
class="form-check-input me-2"
|
class="custom-control custom-switch custom-control-inline switch-heading"
|
||||||
id="1"
|
|
||||||
role="switch"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="1"
|
|
||||||
>
|
>
|
||||||
<h2
|
<input
|
||||||
class="mb-0"
|
class="custom-control-input"
|
||||||
|
id="1"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="1"
|
||||||
>
|
>
|
||||||
Wi-Fi 1
|
<h2>
|
||||||
</h2>
|
Wi-Fi 1
|
||||||
</label>
|
</h2>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div
|
<div
|
||||||
class="form-check form-switch mb-3 d-flex align-items-center"
|
class="form-group switch"
|
||||||
>
|
>
|
||||||
<input
|
<div
|
||||||
class="form-check-input me-2"
|
class="custom-control custom-switch custom-control-inline switch-heading"
|
||||||
id="2"
|
|
||||||
role="switch"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
class="form-check-label"
|
|
||||||
for="2"
|
|
||||||
>
|
>
|
||||||
<h2
|
<input
|
||||||
class="mb-0"
|
class="custom-control-input"
|
||||||
|
id="2"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
class="custom-control-label"
|
||||||
|
for="2"
|
||||||
>
|
>
|
||||||
Wi-Fi 2
|
<h2>
|
||||||
</h2>
|
Wi-Fi 2
|
||||||
</label>
|
</h2>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="text-end"
|
class="text-end"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
@ -322,7 +324,7 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
|
||||||
class="text-end"
|
class="text-end"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
@ -339,17 +341,16 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -527,10 +527,94 @@
|
@@ -524,10 +524,92 @@
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"24\\"
|
+ for=\\"24\\"
|
||||||
+ >
|
+ >
|
||||||
+ SSID
|
+ SSID
|
||||||
|
@ -379,19 +380,16 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ </button>
|
+ </button>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ SSID which contains non-standard characters could cause problems on some devices.
|
||||||
+ SSID which contains non-standard characters could cause problems on some devices.
|
+ </small>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"25\\"
|
+ for=\\"25\\"
|
||||||
+ >
|
+ >
|
||||||
+ Password
|
+ Password
|
||||||
|
@ -401,45 +399,47 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
+ <input
|
||||||
+ autocomplete=\\"current-password\\"
|
+ autocomplete=\\"current-password\\"
|
||||||
+ class=\\"form-control is-invalid\\"
|
+ class=\\"form-control is-invalid\\"
|
||||||
+ id=\\"25\\"
|
+ id=\\"25\\"
|
||||||
+ required=\\"\\"
|
+ required=\\"\\"
|
||||||
+ type=\\"password\\"
|
+ type=\\"password\\"
|
||||||
+ value=\\"\\"
|
+ value=\\"\\"
|
||||||
+ />
|
+ />
|
||||||
+ <button
|
+ <div
|
||||||
+ class=\\"input-group-text\\"
|
+ class=\\"input-group-append\\"
|
||||||
+ type=\\"button\\"
|
|
||||||
+ >
|
+ >
|
||||||
+ <i
|
+ <button
|
||||||
+ class=\\"fa fa-eye\\"
|
+ class=\\"input-group-text\\"
|
||||||
+ />
|
+ type=\\"button\\"
|
||||||
+ </button>
|
+ >
|
||||||
|
+ <i
|
||||||
|
+ class=\\"fa fa-eye\\"
|
||||||
|
+ />
|
||||||
|
+ </button>
|
||||||
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"invalid-feedback\\"
|
+ class=\\"invalid-feedback\\"
|
||||||
+ >
|
+ >
|
||||||
+ Password must contain at least 8 symbols
|
+ Password must contain at least 8 symbols
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
||||||
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
+ </small>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
<hr />
|
<hr />
|
||||||
<div
|
<div
|
||||||
class=\\"form-check form-switch mb-3 d-flex align-items-center\\"
|
class=\\"form-group switch\\"
|
||||||
>
|
>
|
||||||
<input
|
<div
|
||||||
@@ -553,10 +637,11 @@
|
@@ -551,10 +633,11 @@
|
||||||
<div
|
<div
|
||||||
class=\\"text-end\\"
|
class=\\"text-end\\"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class=\\"btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center\\"
|
class=\\"btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center\\"
|
||||||
+ disabled=\\"\\"
|
+ disabled=\\"\\"
|
||||||
type=\\"submit\\"
|
type=\\"submit\\"
|
||||||
>
|
>
|
||||||
|
@ -453,17 +453,16 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -21,10 +21,516 @@
|
@@ -22,10 +22,512 @@
|
||||||
>
|
Wi-Fi 1
|
||||||
Wi-Fi 1
|
</h2>
|
||||||
</h2>
|
</label>
|
||||||
</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"4\\"
|
+ for=\\"4\\"
|
||||||
+ >
|
+ >
|
||||||
+ SSID
|
+ SSID
|
||||||
|
@ -478,31 +477,32 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ type=\\"text\\"
|
+ type=\\"text\\"
|
||||||
+ value=\\"TestSSID1\\"
|
+ value=\\"TestSSID1\\"
|
||||||
+ />
|
+ />
|
||||||
+ <button
|
+ <div
|
||||||
+ class=\\"input-group-text\\"
|
+ class=\\"input-group-append\\"
|
||||||
+ type=\\"button\\"
|
|
||||||
+ >
|
+ >
|
||||||
+ <img
|
+ <button
|
||||||
+ alt=\\"QR\\"
|
+ class=\\"input-group-text\\"
|
||||||
+ src=\\"/reforis/static/reforis/imgs/QR_icon.svg\\"
|
+ type=\\"button\\"
|
||||||
+ style=\\"opacity: 0.67;\\"
|
+ >
|
||||||
+ width=\\"20\\"
|
+ <img
|
||||||
+ />
|
+ alt=\\"QR\\"
|
||||||
+ </button>
|
+ src=\\"/reforis/static/reforis/imgs/QR_icon.svg\\"
|
||||||
|
+ style=\\"opacity: 0.67;\\"
|
||||||
|
+ width=\\"20\\"
|
||||||
|
+ />
|
||||||
|
+ </button>
|
||||||
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ SSID which contains non-standard characters could cause problems on some devices.
|
||||||
+ SSID which contains non-standard characters could cause problems on some devices.
|
+ </small>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"5\\"
|
+ for=\\"5\\"
|
||||||
+ >
|
+ >
|
||||||
+ Password
|
+ Password
|
||||||
|
@ -518,48 +518,51 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ type=\\"password\\"
|
+ type=\\"password\\"
|
||||||
+ value=\\"TestPass\\"
|
+ value=\\"TestPass\\"
|
||||||
+ />
|
+ />
|
||||||
+ <button
|
+ <div
|
||||||
+ class=\\"input-group-text\\"
|
+ class=\\"input-group-append\\"
|
||||||
+ type=\\"button\\"
|
|
||||||
+ >
|
+ >
|
||||||
+ <i
|
+ <button
|
||||||
+ class=\\"fa fa-eye\\"
|
+ class=\\"input-group-text\\"
|
||||||
+ />
|
+ type=\\"button\\"
|
||||||
+ </button>
|
+ >
|
||||||
|
+ <i
|
||||||
|
+ class=\\"fa fa-eye\\"
|
||||||
|
+ />
|
||||||
|
+ </button>
|
||||||
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
||||||
+ WPA2/3 pre-shared key, that is required to connect to the network.
|
+ </small>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-check form-switch mb-3 null\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
|
||||||
+ class=\\"form-check-input\\"
|
|
||||||
+ id=\\"6\\"
|
|
||||||
+ role=\\"switch\\"
|
|
||||||
+ type=\\"checkbox\\"
|
|
||||||
+ />
|
|
||||||
+ <label
|
|
||||||
+ class=\\"form-check-label\\"
|
|
||||||
+ for=\\"6\\"
|
|
||||||
+ >
|
|
||||||
+ Hide SSID
|
|
||||||
+ </label>
|
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"custom-control custom-switch\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ <input
|
||||||
|
+ class=\\"custom-control-input\\"
|
||||||
|
+ id=\\"6\\"
|
||||||
|
+ type=\\"checkbox\\"
|
||||||
|
+ />
|
||||||
|
+ <label
|
||||||
|
+ class=\\"custom-control-label\\"
|
||||||
|
+ for=\\"6\\"
|
||||||
|
+ >
|
||||||
|
+ Hide SSID
|
||||||
|
+ </label>
|
||||||
|
+ <small
|
||||||
|
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||||
|
+ >
|
||||||
+ If set, network is not visible when scanning for available networks.
|
+ If set, network is not visible when scanning for available networks.
|
||||||
+ </small>
|
+ </small>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"d-block\\"
|
+ class=\\"d-block\\"
|
||||||
|
@ -568,59 +571,56 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ GHz
|
+ GHz
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-2 form-check form-check-inline\\"
|
+ class=\\"custom-control custom-radio custom-control-inline\\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
+ <input
|
||||||
+ class=\\"form-check-input me-2\\"
|
+ class=\\"custom-control-input\\"
|
||||||
+ id=\\"hwmode-0-0\\"
|
+ id=\\"hwmode-0-0\\"
|
||||||
+ name=\\"hwmode-0\\"
|
+ name=\\"hwmode-0\\"
|
||||||
+ type=\\"radio\\"
|
+ type=\\"radio\\"
|
||||||
+ value=\\"11g\\"
|
+ value=\\"11g\\"
|
||||||
+ />
|
+ />
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-check-label\\"
|
+ class=\\"custom-control-label\\"
|
||||||
+ for=\\"hwmode-0-0\\"
|
+ for=\\"hwmode-0-0\\"
|
||||||
+ >
|
+ >
|
||||||
+ 2.4
|
+ 2.4
|
||||||
+ </label>
|
+ </label>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-2 form-check form-check-inline\\"
|
+ class=\\"custom-control custom-radio custom-control-inline\\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
+ <input
|
||||||
+ checked=\\"\\"
|
+ checked=\\"\\"
|
||||||
+ class=\\"form-check-input me-2\\"
|
+ class=\\"custom-control-input\\"
|
||||||
+ id=\\"hwmode-0-1\\"
|
+ id=\\"hwmode-0-1\\"
|
||||||
+ name=\\"hwmode-0\\"
|
+ name=\\"hwmode-0\\"
|
||||||
+ type=\\"radio\\"
|
+ type=\\"radio\\"
|
||||||
+ value=\\"11a\\"
|
+ value=\\"11a\\"
|
||||||
+ />
|
+ />
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-check-label\\"
|
+ class=\\"custom-control-label\\"
|
||||||
+ for=\\"hwmode-0-1\\"
|
+ for=\\"hwmode-0-1\\"
|
||||||
+ >
|
+ >
|
||||||
+ 5
|
+ 5
|
||||||
+ </label>
|
+ </label>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <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.
|
||||||
+ 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>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"8\\"
|
+ for=\\"8\\"
|
||||||
+ >
|
+ >
|
||||||
+ 802.11n/ac/ax mode
|
+ 802.11n/ac/ax mode
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <select
|
+ <select
|
||||||
+ class=\\"form-select\\"
|
+ class=\\"custom-select\\"
|
||||||
+ id=\\"8\\"
|
+ id=\\"8\\"
|
||||||
+ >
|
+ >
|
||||||
+ <option
|
+ <option
|
||||||
|
@ -654,25 +654,22 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ 802.11ac - 80 MHz wide channel
|
+ 802.11ac - 80 MHz wide channel
|
||||||
+ </option>
|
+ </option>
|
||||||
+ </select>
|
+ </select>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <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.
|
||||||
+ 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>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"9\\"
|
+ for=\\"9\\"
|
||||||
+ >
|
+ >
|
||||||
+ Channel
|
+ Channel
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <select
|
+ <select
|
||||||
+ class=\\"form-select\\"
|
+ class=\\"custom-select\\"
|
||||||
+ id=\\"9\\"
|
+ id=\\"9\\"
|
||||||
+ >
|
+ >
|
||||||
+ <option
|
+ <option
|
||||||
|
@ -883,16 +880,15 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ </select>
|
+ </select>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"mb-3\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <label
|
+ <label
|
||||||
+ class=\\"form-label\\"
|
|
||||||
+ for=\\"10\\"
|
+ for=\\"10\\"
|
||||||
+ >
|
+ >
|
||||||
+ Encryption
|
+ Encryption
|
||||||
+ </label>
|
+ </label>
|
||||||
+ <select
|
+ <select
|
||||||
+ class=\\"form-select\\"
|
+ class=\\"custom-select\\"
|
||||||
+ id=\\"10\\"
|
+ id=\\"10\\"
|
||||||
+ >
|
+ >
|
||||||
+ <option
|
+ <option
|
||||||
|
@ -911,63 +907,63 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
|
||||||
+ WPA2 only
|
+ WPA2 only
|
||||||
+ </option>
|
+ </option>
|
||||||
+ </select>
|
+ </select>
|
||||||
+ <div
|
+ <small
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"form-text text-muted\\"
|
||||||
+ >
|
+ >
|
||||||
+ <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.
|
||||||
+ 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>
|
||||||
+ </small>
|
|
||||||
+ </div>
|
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-check form-switch mb-3 null\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
|
||||||
+ class=\\"form-check-input\\"
|
|
||||||
+ id=\\"11\\"
|
|
||||||
+ role=\\"switch\\"
|
|
||||||
+ type=\\"checkbox\\"
|
|
||||||
+ />
|
|
||||||
+ <label
|
|
||||||
+ class=\\"form-check-label\\"
|
|
||||||
+ for=\\"11\\"
|
|
||||||
+ >
|
|
||||||
+ Disable Management Frame Protection
|
|
||||||
+ </label>
|
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"custom-control custom-switch\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ <input
|
||||||
|
+ class=\\"custom-control-input\\"
|
||||||
|
+ id=\\"11\\"
|
||||||
|
+ type=\\"checkbox\\"
|
||||||
|
+ />
|
||||||
|
+ <label
|
||||||
|
+ class=\\"custom-control-label\\"
|
||||||
|
+ for=\\"11\\"
|
||||||
|
+ >
|
||||||
|
+ Disable Management Frame Protection
|
||||||
|
+ </label>
|
||||||
|
+ <small
|
||||||
|
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||||
|
+ >
|
||||||
+ In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection.
|
+ In case you have trouble connecting to WiFi Access Point, try disabling Management Frame Protection.
|
||||||
+ </small>
|
+ </small>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-check form-switch mb-3 null\\"
|
+ class=\\"form-group\\"
|
||||||
+ >
|
+ >
|
||||||
+ <input
|
|
||||||
+ class=\\"form-check-input\\"
|
|
||||||
+ id=\\"12\\"
|
|
||||||
+ role=\\"switch\\"
|
|
||||||
+ type=\\"checkbox\\"
|
|
||||||
+ />
|
|
||||||
+ <label
|
|
||||||
+ class=\\"form-check-label\\"
|
|
||||||
+ for=\\"12\\"
|
|
||||||
+ >
|
|
||||||
+ Enable Guest Wi-Fi
|
|
||||||
+ </label>
|
|
||||||
+ <div
|
+ <div
|
||||||
+ class=\\"form-text\\"
|
+ class=\\"custom-control custom-switch\\"
|
||||||
+ >
|
+ >
|
||||||
+ <small>
|
+ <input
|
||||||
|
+ class=\\"custom-control-input\\"
|
||||||
|
+ id=\\"12\\"
|
||||||
|
+ type=\\"checkbox\\"
|
||||||
|
+ />
|
||||||
|
+ <label
|
||||||
|
+ class=\\"custom-control-label\\"
|
||||||
|
+ for=\\"12\\"
|
||||||
|
+ >
|
||||||
|
+ Enable Guest Wi-Fi
|
||||||
|
+ </label>
|
||||||
|
+ <small
|
||||||
|
+ class=\\"form-text text-muted mt-0 mb-3\\"
|
||||||
|
+ >
|
||||||
+ 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>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ </div>
|
+ </div>
|
||||||
<hr />
|
<hr />
|
||||||
<div
|
<div
|
||||||
class=\\"form-check form-switch mb-3 d-flex align-items-center\\"
|
class=\\"form-group switch\\"
|
||||||
>
|
>
|
||||||
<input"
|
<div"
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -25,10 +25,15 @@ exports[`<RebootButton/> Render modal. 1`] = `
|
||||||
Warning!
|
Warning!
|
||||||
</h5>
|
</h5>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
class="close"
|
||||||
class="btn-close"
|
|
||||||
type="button"
|
type="button"
|
||||||
/>
|
>
|
||||||
|
<span
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="modal-body"
|
class="modal-body"
|
||||||
|
|
|
@ -48,7 +48,7 @@ describe("AlertContext", () => {
|
||||||
// Alert is present
|
// Alert is present
|
||||||
expect(getByText(componentContainer, "Alert content")).toBeDefined();
|
expect(getByText(componentContainer, "Alert content")).toBeDefined();
|
||||||
|
|
||||||
fireEvent.click(componentContainer.querySelector(".btn-close"));
|
fireEvent.click(componentContainer.querySelector(".close"));
|
||||||
// Alert is gone
|
// Alert is gone
|
||||||
expect(queryByText(componentContainer, "Alert content")).toBeNull();
|
expect(queryByText(componentContainer, "Alert content")).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,13 +6,14 @@ exports[`AlertContext should render alert 1`] = `
|
||||||
id="alert-container"
|
id="alert-container"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="alert alert-danger alert-dismissible"
|
class="alert alert-dismissible alert-danger"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Close"
|
class="close"
|
||||||
class="btn-close"
|
|
||||||
type="button"
|
type="button"
|
||||||
/>
|
>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
Alert content
|
Alert content
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
exports[`<SubmitButton/> Render load 1`] = `
|
exports[`<SubmitButton/> Render load 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||||
disabled=""
|
disabled=""
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
|
@ -22,7 +22,7 @@ exports[`<SubmitButton/> Render load 1`] = `
|
||||||
exports[`<SubmitButton/> Render ready 1`] = `
|
exports[`<SubmitButton/> Render ready 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
@ -35,7 +35,7 @@ exports[`<SubmitButton/> Render ready 1`] = `
|
||||||
exports[`<SubmitButton/> Render saving 1`] = `
|
exports[`<SubmitButton/> Render saving 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary col-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
|
||||||
disabled=""
|
disabled=""
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
|
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { Tooltip } from "bootstrap/dist/js/bootstrap.bundle.min";
|
import { Tooltip } from "bootstrap/dist/js/bootstrap.bundle.min.js";
|
||||||
|
|
||||||
/** Execute callback when condition is set to true. */
|
/** Execute callback when condition is set to true. */
|
||||||
export function useConditionalTimeout(
|
export function useConditionalTimeout(
|
||||||
|
@ -42,15 +42,14 @@ export function useClickOutside(element, callback) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** useTooltip hook for Bootstrap tooltips. */
|
|
||||||
export function useTooltip(description, placement = "top", trigger = "hover") {
|
export function useTooltip(description, placement = "top", trigger = "hover") {
|
||||||
const tooltipRef = useRef();
|
const tooltipRef = useRef();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tooltip = new Tooltip(tooltipRef.current, {
|
const tooltip = new Tooltip(tooltipRef.current, {
|
||||||
title: description,
|
title: description,
|
||||||
placement,
|
placement: placement,
|
||||||
trigger,
|
trigger: trigger,
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user