1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Merge branch 'dev' into 'master'

Dev

See merge request turris/reforis/foris-js!215
This commit is contained in:
Aleksandr Gumroian 2024-01-19 19:56:06 +01:00
commit bee4bee300
12 changed files with 770 additions and 755 deletions

View File

@ -1,4 +1,4 @@
image: node:16-alpine
image: registry.nic.cz/turris/reforis/reforis/reforis-image
stages:
- test
@ -6,7 +6,7 @@ stages:
- publish
before_script:
- apk add make
- apt-get update && apt-get install -y make
- npm install
test:

1288
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "foris",
"version": "5.6.0",
"version": "5.6.1",
"description": "Foris JS library is a set of components and utils for reForis application and plugins.",
"author": "CZ.NIC, z.s.p.o.",
"repository": {
@ -22,7 +22,7 @@
"react-uid": "^2.2.0"
},
"peerDependencies": {
"bootstrap": "4.4.1",
"bootstrap": "^4.6.2",
"prop-types": "15.8.1",
"react": "16.9.0",
"react-dom": "16.9.0",
@ -38,7 +38,7 @@
"@testing-library/react": "^8.0.9",
"babel-loader": "^8.1.0",
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.5.0",
"bootstrap": "^4.6.2",
"css-loader": "^5.2.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2019-2023 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.
@ -31,24 +31,25 @@ export function Button({
children,
...props
}) {
let buttonClass = className ? `btn ${className}` : "btn btn-primary ";
let buttonClass = className ? `btn ${className}` : "btn btn-primary";
if (forisFormSize) {
buttonClass = `${buttonClass} col-sm-12 col-md-3 col-lg-2`;
}
const span = loading ? (
<span
className="spinner-border spinner-border-sm"
role="status"
aria-hidden="true"
/>
) : null;
return (
<button type="button" className={buttonClass} {...props}>
{span}
{span ? " " : null}
{children}
<button
type="button"
className={`${buttonClass} d-inline-flex justify-content-center align-items-center`}
{...props}
>
{loading && (
<span
className="spinner-border spinner-border-sm mr-1"
role="status"
aria-hidden="true"
/>
)}
<span>{children}</span>
</button>
);
}

View File

@ -31,3 +31,7 @@
.spinner-fs-wrapper .spinner-text {
margin: 1rem;
}
.spinner-border-sm {
min-width: 16px;
}

View File

@ -2,33 +2,38 @@
exports[`<Button /> Render button correctly 1`] = `
<button
class="btn btn-primary "
class="btn btn-primary d-inline-flex justify-content-center align-items-center"
type="button"
>
Test Button
<span>
Test Button
</span>
</button>
`;
exports[`<Button /> Render button with custom classes 1`] = `
<button
class="btn one two three"
class="btn one two three d-inline-flex justify-content-center align-items-center"
type="button"
>
Test Button
<span>
Test Button
</span>
</button>
`;
exports[`<Button /> Render button with spinner 1`] = `
<button
class="btn btn-primary "
class="btn btn-primary d-inline-flex justify-content-center align-items-center"
type="button"
>
<span
aria-hidden="true"
class="spinner-border spinner-border-sm"
class="spinner-border spinner-border-sm mr-1"
role="status"
/>
Test Button
<span>
Test Button
</span>
</button>
`;

View File

@ -301,10 +301,12 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
class="text-right"
>
<button
class="btn btn-primary col-sm-12 col-md-3 col-lg-2"
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
type="submit"
>
Save
<span>
Save
</span>
</button>
</div>
</form>
@ -322,10 +324,12 @@ exports[`<WiFiSettings/> Snapshot both modules disabled. 1`] = `
class="text-right"
>
<button
class="btn btn-primary col-sm-12 col-md-3 col-lg-2"
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
type="button"
>
Reset Wi-Fi Settings
<span>
Reset Wi-Fi Settings
</span>
</button>
</div>
</div>
@ -435,13 +439,13 @@ exports[`<WiFiSettings/> Snapshot guest network. 1`] = `
class=\\"text-right\\"
>
<button
class=\\"btn btn-primary col-sm-12 col-md-3 col-lg-2\\"
class=\\"btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center\\"
+ disabled=\\"\\"
type=\\"submit\\"
>
Save
</button>
</div>"
<span>
Save
</span>"
`;
exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `

View File

@ -46,16 +46,20 @@ exports[`<RebootButton/> Render modal. 1`] = `
class="modal-footer"
>
<button
class="btn btn-primary "
class="btn btn-primary d-inline-flex justify-content-center align-items-center"
type="button"
>
Cancel
<span>
Cancel
</span>
</button>
<button
class="btn btn-danger"
class="btn btn-danger d-inline-flex justify-content-center align-items-center"
type="button"
>
Confirm reboot
<span>
Confirm reboot
</span>
</button>
</div>
</div>
@ -63,10 +67,12 @@ exports[`<RebootButton/> Render modal. 1`] = `
</div>
</div>
<button
class="btn btn-danger"
class="btn btn-danger d-inline-flex justify-content-center align-items-center"
type="button"
>
Reboot
<span>
Reboot
</span>
</button>
</div>
`;
@ -77,10 +83,12 @@ exports[`<RebootButton/> Render. 1`] = `
id="modal-container"
/>
<button
class="btn btn-danger"
class="btn btn-danger d-inline-flex justify-content-center align-items-center"
type="button"
>
Reboot
<span>
Reboot
</span>
</button>
</div>
`;

View File

@ -3,17 +3,18 @@
exports[`<SubmitButton/> Render load 1`] = `
<div>
<button
class="btn btn-primary col-sm-12 col-md-3 col-lg-2"
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
disabled=""
type="submit"
>
<span
aria-hidden="true"
class="spinner-border spinner-border-sm"
class="spinner-border spinner-border-sm mr-1"
role="status"
/>
Load settings
<span>
Load settings
</span>
</button>
</div>
`;
@ -21,10 +22,12 @@ 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"
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
type="submit"
>
Save
<span>
Save
</span>
</button>
</div>
`;
@ -32,17 +35,18 @@ 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"
class="btn btn-primary col-sm-12 col-md-3 col-lg-2 d-inline-flex justify-content-center align-items-center"
disabled=""
type="submit"
>
<span
aria-hidden="true"
class="spinner-border spinner-border-sm"
class="spinner-border spinner-border-sm mr-1"
role="status"
/>
Updating
<span>
Updating
</span>
</button>
</div>
`;

View File

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-12-02 15:54+0100\n"
"PO-Revision-Date: 2023-04-16 13:52+0000\n"
"Last-Translator: František Bartoš <frantisek.bartos@email.cz>\n"
"PO-Revision-Date: 2023-11-23 16:03+0000\n"
"Last-Translator: Lukas Jelinek <lukas.jelinek@nic.cz>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/turris/foris-js/cs/"
">\n"
"Language: cs\n"
@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: Weblate 4.17-dev\n"
"X-Generator: Weblate 5.2.1-rc\n"
"Generated-By: Babel 2.11.0\n"
#: src/api/utils.js:61
@ -79,7 +79,7 @@ msgstr "Nastavení Wi-Fi jsou uvedena do výchozího stavu."
#: src/common/WiFiSettings/ResetWiFiSettings.js:55
#: src/common/WiFiSettings/ResetWiFiSettings.js:69
msgid "Reset Wi-Fi Settings"
msgstr "Resetovat nastavení Wi-Fi"
msgstr "Reset nastavení Wi-Fi"
#: src/common/WiFiSettings/ResetWiFiSettings.js:57
msgid ""
@ -105,7 +105,6 @@ msgid "Hide SSID"
msgstr "Skrýt SSID"
#: src/common/WiFiSettings/WiFiForm.js:186
#, fuzzy
msgid "802.11n/ac/ax mode"
msgstr "Režim 802.11n/ac/ax"
@ -119,22 +118,23 @@ msgstr "Šifrování"
#: src/common/WiFiSettings/WiFiForm.js:226
msgid "Disable Management Frame Protection"
msgstr ""
msgstr "Vypnout Management Frame Protection"
#: src/common/WiFiSettings/WiFiForm.js:227
msgid ""
"In case you have trouble connecting to WiFi Access Point, try disabling "
"Management Frame Protection."
msgstr ""
"Máte-li problémy při připojování k přístupovému bodu Wi-Fi, zkuste vypnout "
"Management Frame Protection."
#: src/common/WiFiSettings/WiFiForm.js:262
msgid "auto"
msgstr "automaticky"
#: src/common/WiFiSettings/WiFiForm.js:303
#, fuzzy
msgid "Custom"
msgstr "automaticky"
msgstr "Uživatelsky určené"
#: src/common/WiFiSettings/WiFiGuestForm.js:42
msgid "Enable Guest Wi-Fi"
@ -170,7 +170,6 @@ msgstr "Je třeba, aby heslo obsahovalo alespoň 8 znaků"
#: src/common/WiFiSettings/WiFiSettings.js:90
#: src/common/WiFiSettings/WiFiSettings.js:109
#, fuzzy
msgid "Password must not contain more than 63 symbols"
msgstr "Heslo nesmí obsahovat více než 63 znaků"
@ -203,24 +202,20 @@ msgid "802.11ac - 160 MHz wide channel"
msgstr "802.11ac kanál šíře 160 MHz"
#: src/common/WiFiSettings/constants.js:16
#, fuzzy
msgid "802.11ax - 20 MHz wide channel"
msgstr "802.11ac kanál šíře 20 MHz"
msgstr "802.11ax kanál šíře 20 MHz"
#: src/common/WiFiSettings/constants.js:17
#, fuzzy
msgid "802.11ax - 40 MHz wide channel"
msgstr "802.11ac kanál šíře 40 MHz"
msgstr "802.11ax kanál šíře 40 MHz"
#: src/common/WiFiSettings/constants.js:18
#, fuzzy
msgid "802.11ax - 80 MHz wide channel"
msgstr "802.11ac kanál šíře 80 MHz"
msgstr "802.11ax kanál šíře 80 MHz"
#: src/common/WiFiSettings/constants.js:19
#, fuzzy
msgid "802.11ax - 160 MHz wide channel"
msgstr "802.11ac kanál šíře 160 MHz"
msgstr "802.11ax kanál šíře 160 MHz"
#: src/common/WiFiSettings/constants.js:26
msgid "WPA3 only"
@ -228,7 +223,7 @@ msgstr "pouze WPA3"
#: src/common/WiFiSettings/constants.js:27
msgid "WPA3 with WPA2 as fallback (default)"
msgstr ""
msgstr "WPA3, nouzově WPA2 (výchozí)"
#: src/common/WiFiSettings/constants.js:28
msgid "WPA2 only"
@ -243,13 +238,8 @@ msgstr ""
"problémy."
#: src/common/WiFiSettings/constants.js:34
#, fuzzy
msgid "WPA2/3 pre-shared key, that is required to connect to the network."
msgstr ""
"\n"
" WPA2 předsdílený klíč, který je vyžadován pro připojení se k "
"síti.\n"
" "
msgstr "Předsdílený klíč WPA2/3, který je vyžadován pro připojení se k síti."
#: src/common/WiFiSettings/constants.js:37
msgid "If set, network is not visible when scanning for available networks."
@ -258,38 +248,29 @@ msgstr ""
"vyhledávat dostupné sítě."
#: src/common/WiFiSettings/constants.js:40
#, fuzzy
msgid ""
"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."
msgstr ""
"\n"
" Pásmo 2,4 GHz je v klientských zařízeních podporováno nejčastěji,"
" ale bývá více zarušené. Pásmo 5 GHz je\n"
" novější standard a nemusí být podporováno všemi vámi používanými "
"zařízeními. Obvykle bývá méně zarušené,\n"
" ale signál se hůře šíři uvnitř budov."
"Pásmo 2,4 GHz je v klientských zařízeních podporováno nejčastěji, bývá ale "
"více zarušené. Pásmo 5 GHz je novější standard a nemusí být podporováno "
"všemi vámi používanými zařízeními. Obvykle bývá méně zarušené, signál se ale "
"hůře šíří uvnitř budov."
#: src/common/WiFiSettings/constants.js:43
#, fuzzy
msgid ""
"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."
msgstr ""
"\n"
" Změna tohoto upraví režim fungování 802.11n/ac. 802.11n s kanály "
"o šíři 40 MHz kanály může pomoci k vyšší\n"
" propustnosti, ale je náchylnější na rušení. Pokud nevíte co "
"zvolit, použijte výchozí volbu s kanálem šíře\n"
" 20 MHz.\n"
" "
"Změna tohoto parametru upraví režim fungování 802.11n/ac. 802.11n s kanály o "
"šíři 40 MHz může pomoci k vyšší propustnosti, je ale náchylnější na rušení. "
"Pokud nevíte co zvolit, použijte výchozí volbu s kanálem šíře 20 MHz."
#: src/common/WiFiSettings/constants.js:46
#, fuzzy
msgid ""
"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 "
@ -297,14 +278,10 @@ msgid ""
"router. Parameters of the guest network can be set in the Guest network "
"tab."
msgstr ""
"\n"
" Zapíná Wi-Fi pro hosty, která je oddělená od místní sítě (LAN). "
"Zařízením připojeným k této síti je umožněn\n"
" přístup do Internetu, ale už ne na ostatní zařízení a k rozhraní "
"pro nastavování směrovače.\n"
" Parametry sítě pro hosty je možné nastavit na panelu „Síť pro "
"hosty“.\n"
" "
"Zapíná Wi-Fi pro hosty, která je oddělená od místní sítě (LAN). Zařízením "
"připojeným k této síti je umožněn přístup do Internetu, ale už ne na ostatní "
"zařízení a k rozhraní pro nastavování směrovače. Parametry sítě pro hosty je "
"možné nastavit na panelu „Síť pro hosty“."
#: src/common/WiFiSettings/constants.js:49
msgid ""
@ -313,6 +290,10 @@ msgid ""
"without WPA3 support require older WPA2. If you experience issues with "
"connecting older devices, try to enable WPA2."
msgstr ""
"Standard WPA3 je nová nejbezpečnější metoda, již se doporučuje používat se "
"všemi zařízeními, která ji podporují. Starší zařízení bez podpory WPA3 "
"potřebují starší WPA2. Zaznamenáte-li problémy s připojováním starších "
"zařízení, zkuste zapnout WPA2."
#: src/form/components/ForisForm.js:121
msgid "Settings saved successfully"
@ -357,7 +338,6 @@ msgid "This is not a valid domain name."
msgstr "Toto není platné doménové jméno."
#: src/utils/validations.js:17
#, fuzzy
msgid "This is not a valid hostname."
msgstr "Toto není platné doménové jméno."

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-12-02 15:54+0100\n"
"PO-Revision-Date: 2023-08-13 10:47+0000\n"
"PO-Revision-Date: 2024-01-04 21:08+0000\n"
"Last-Translator: Erik Pfannenstein <debianignatz@gmx.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/turris/foris-js/"
"de/>\n"
@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.0-dev\n"
"X-Generator: Weblate 5.4-dev\n"
"Generated-By: Babel 2.11.0\n"
#: src/api/utils.js:61
@ -89,6 +89,9 @@ msgid ""
"Fi settings. Note that this will remove the current Wi-Fi configuration "
"and restore the default values."
msgstr ""
"Falls die Anzahl der WLAN-Karten nicht korrekt ist, könnte es helfen, die "
"WLAN-Einstellungen zurückzusetzen. Beachten Sie, dass dabei die aktuelle "
"WLAN-Konfiguration mit den Werkseinstellungen überschrieben wird."
#: src/common/WiFiSettings/WiFiForm.js:95
msgid "Wi-Fi ${deviceID + 1}"

View File

@ -8,15 +8,16 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-12-02 15:54+0100\n"
"PO-Revision-Date: 2020-11-29 19:29+0000\n"
"Last-Translator: Johan van de Wetering <mail@jvdwetering.nl>\n"
"PO-Revision-Date: 2024-01-04 21:08+0000\n"
"Last-Translator: powerburner-nl <peter.mulder.1981@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/turris/foris-js/nl/"
">\n"
"Language: nl\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/turris/foris-"
"js/nl/>\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.4-dev\n"
"Generated-By: Babel 2.11.0\n"
#: src/api/utils.js:61
@ -54,19 +55,19 @@ msgstr "Opnieuw opstarten"
#: src/common/RebootButton.js:66
msgid "Warning!"
msgstr ""
msgstr "Waarschuwing!"
#: src/common/RebootButton.js:68
msgid "Are you sure you want to restart the router?"
msgstr ""
msgstr "Weet u zeker dat u de router opnieuw wilt opstarten?"
#: src/common/RebootButton.js:71
msgid "Cancel"
msgstr ""
msgstr "Annuleren"
#: src/common/RebootButton.js:73
msgid "Confirm reboot"
msgstr ""
msgstr "Opnieuw opstarten bevestigen"
#: src/common/WiFiSettings/ResetWiFiSettings.js:38
msgid "An error occurred during resetting Wi-Fi settings."
@ -418,4 +419,3 @@ msgstr "Bevat geen lijst met e-mails gescheiden door komma's."
#~ " default option with 20 MHz wide "
#~ "channel."
#~ msgstr ""