From d1472afb96921c0c83295dec9de0820dec0435a9 Mon Sep 17 00:00:00 2001 From: Artem Baskal Date: Thu, 11 Jun 2020 12:07:46 +0300 Subject: [PATCH] - client: Refactor Setup guide component: Merge pull request #633 in DNS/adguard-home from fix/1740 to master Close #1740 Squashed commit of the following: commit 13593ad7580a0ad5a4d5c0abcb4f67d01ddb944a Merge: 8cdc68de 1356ac26 Author: ArtemBaskal Date: Thu Jun 11 12:02:02 2020 +0300 Merge branch 'master' into fix/1740 commit 8cdc68debab3f0668ec4aa5cf9b55ce40ddd4985 Author: ArtemBaskal Date: Wed Jun 10 19:35:51 2020 +0300 Update locales with link commit 320d8d2f189dff594954b3f5964279410594ee29 Author: ArtemBaskal Date: Wed Jun 3 16:40:36 2020 +0300 Refactor Tabs commit 98bdcdb5eb35448d38ed42aa08cec2fce9ac849e Author: ArtemBaskal Date: Wed Jun 3 14:01:55 2020 +0300 Separate content from markup of dns privacy list commit cee5e5c411d1e9a93a16eba9d78f2f9479d9e729 Author: ArtemBaskal Date: Wed May 27 21:12:11 2020 +0300 - client: Refactor Setup guide component --- client/src/__locales/de.json | 8 +- client/src/__locales/en.json | 2 +- client/src/__locales/fr.json | 8 +- client/src/__locales/id.json | 8 +- client/src/__locales/it.json | 8 +- client/src/__locales/ja.json | 8 +- client/src/__locales/nl.json | 16 +- client/src/__locales/pl.json | 28 +- client/src/__locales/ru.json | 8 +- client/src/__locales/sv.json | 8 +- client/src/__locales/vi.json | 8 +- client/src/__locales/zh-cn.json | 15 +- .../src/components/Settings/Clients/Form.js | 183 ++--- client/src/components/ui/Guide.js | 636 ++++++++---------- client/src/components/ui/Tab.js | 54 +- client/src/components/ui/Tabs.css | 1 - client/src/components/ui/Tabs.js | 74 +- client/src/helpers/form.js | 2 +- 18 files changed, 504 insertions(+), 571 deletions(-) diff --git a/client/src/__locales/de.json b/client/src/__locales/de.json index 6a23d1e4..15a1c511 100644 --- a/client/src/__locales/de.json +++ b/client/src/__locales/de.json @@ -162,9 +162,9 @@ "example_comment_hash": "# Auch ein Kommentar", "example_regex_meaning": "Zugriff auf die Domains blockieren, die dem <0>spezifizierten regulären Ausdruck entsprechen", "example_upstream_regular": "regulärer DNS (über UDP)", - "example_upstream_dot": "verschlüsseltes DNS-over-TLS", - "example_upstream_doh": "verschlüsseltes DNS-over-HTTPS", - "example_upstream_sdns": "Sie können DNS-Stempel für DNSCrypt oder DNS-over-HTTPS Resolver benutzen.", + "example_upstream_dot": "verschlüsseltes <0>DNS-over-TLS", + "example_upstream_doh": "verschlüsseltes <0>DNS_over_HTTPS", + "example_upstream_sdns": "Sie können <0>DNS-Stempel für <1>DNSCrypt oder <2>DNS-over-HTTPS Resolver benutzen", "example_upstream_tcp": "regulärer DNS (über TCP)", "all_lists_up_to_date_toast": "Alle Listen sind bereits auf dem neuesten Stand", "updated_upstream_dns_toast": "Upstream-DNS-Server wurden aktualisiert", @@ -490,4 +490,4 @@ "list_updated_plural": "{{count}} Listen aktualisiert", "dnssec_enable": "DNSSEC aktivieren", "dnssec_enable_desc": "DNSSEC-Flag in den ausgehenden DNS-Abfragen mitsenden und das Ergebnis überprüfen (DNSSEC-fähiger Resolver erforderlich)" -} \ No newline at end of file +} diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index baa0d353..f1178b81 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -259,7 +259,7 @@ "install_devices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.", "install_devices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.", "install_devices_router_list_3": "Enter your AdGuard Home server addresses there.", - "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a DHCP server. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.", + "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.", "install_devices_windows_list_1": "Open Control Panel through Start menu or Windows search.", "install_devices_windows_list_2": "Go to Network and Internet category and then to Network and Sharing Center.", "install_devices_windows_list_3": "On the left side of the screen find Change adapter settings and click on it.", diff --git a/client/src/__locales/fr.json b/client/src/__locales/fr.json index bf599be2..422e3a40 100644 --- a/client/src/__locales/fr.json +++ b/client/src/__locales/fr.json @@ -162,9 +162,9 @@ "example_comment_hash": "# Et comme ça aussi on peut laisser des commentaires", "example_regex_meaning": "bloquer l'accés aux domaines correspondants à l'expression régulière spécifiée", "example_upstream_regular": "DNS classique (au-dessus de UDP)", - "example_upstream_dot": "DNS-au-dessus-de-TLS chiffré", - "example_upstream_doh": "DNS-au-dessus-de-HTTPS chiffré", - "example_upstream_sdns": "vous pouvez utiliser DNS Stamps pour DNSCrypt ou les resolveurs DNS-au-dessus-de-HTTPS", + "example_upstream_dot": "<0>DNS-over-TLS chiffré", + "example_upstream_doh": "<0>DNS-over-HTTPS chiffré", + "example_upstream_sdns": "vous pouvez utiliser <0>DNS Stamps pour <1>DNSCrypt ou les resolveurs <2>DNS_over_HTTPS", "example_upstream_tcp": "DNS classique (au-dessus de TCP)", "all_lists_up_to_date_toast": "Toutes les listes sont déjà à jour", "updated_upstream_dns_toast": "Les serveurs DNS upstream sont mis à jour", @@ -489,4 +489,4 @@ "list_updated_plural": "{{count}} listes mises à jour", "dnssec_enable": "Activer DNSSEC", "dnssec_enable_desc": "Définir l’indicateur DNSSEC dans les requêtes DNS sortantes et vérifier le résultat (résolveur compatible DNSSEC requis)" -} \ No newline at end of file +} diff --git a/client/src/__locales/id.json b/client/src/__locales/id.json index 19d68c38..480c3057 100644 --- a/client/src/__locales/id.json +++ b/client/src/__locales/id.json @@ -145,9 +145,9 @@ "example_comment_hash": "Juga sebuah komentar", "example_regex_meaning": "blokir akses ke domain yang cocok dengan <0>ekspresi reguler yang ditentukan", "example_upstream_regular": "DNS reguler (melalui UDP)", - "example_upstream_dot": "terenkripsi DNS-over-TLS", - "example_upstream_doh": "terenkripsi DNS-over-HTTPS", - "example_upstream_sdns": "anda bisa menggunakan Stempel DNS untuk DNSCrypt atau pengarah DNS-over-HTTPS", + "example_upstream_dot": "terenkripsi <0>DNS-over-TLS", + "example_upstream_doh": "terenkripsi <0>DNS-over-HTTPS", + "example_upstream_sdns": "anda bisa menggunakan <0>Stempel DNS untuk <1>DNSCrypt atau pengarah <2>DNS-over-HTTPS", "example_upstream_tcp": "DNS reguler (melalui TCP)", "updated_upstream_dns_toast": "Server DNS hulu terbarui", "dns_test_ok_toast": "Server DNS yang ditentukan bekerja dengan benar", @@ -428,4 +428,4 @@ "client_blocked": "Klien \"{{ip}}\" sukses di blokir", "client_unblocked": "Klien \"{{ip}}\" sukses di unblock", "static_ip": "Alamat IP statis" -} \ No newline at end of file +} diff --git a/client/src/__locales/it.json b/client/src/__locales/it.json index a34aa5aa..95046b4c 100644 --- a/client/src/__locales/it.json +++ b/client/src/__locales/it.json @@ -162,9 +162,9 @@ "example_comment_hash": "# Un altro commento", "example_regex_meaning": "blocca l'accesso ai domini che corrispondono alla specifica espressione regolare", "example_upstream_regular": "DNS regolari (via UDP)", - "example_upstream_dot": "DNS-over-TLS criptato", - "example_upstream_doh": "DNS-over-HTTPS criptato", - "example_upstream_sdns": "puoi usare DNS Stamps per DNSCrypt oppure dei resolver con DNS-over-HTTPS", + "example_upstream_dot": "<0>DNS_over_TLS crittografato", + "example_upstream_doh": "<0>DNS-over-HTTPS crittografato", + "example_upstream_sdns": "puoi usare <0>DNS Stamps per <1>DNSCrypt oppure dei resolver con <2>DNS-over-HTTPS", "example_upstream_tcp": "DNS regolari (via TCP)", "all_lists_up_to_date_toast": "Tutte le liste sono aggiornate", "updated_upstream_dns_toast": "Server DNS upstream aggiornati", @@ -490,4 +490,4 @@ "list_updated_plural": "{{count}} liste aggiornate", "dnssec_enable": "Abilita DNSSEC", "dnssec_enable_desc": "Imposta la spunta DNSSEC nelle interrogazioni DNS in uscita e verifica il risultato (è richiesta l'attivazione del risolutore DNSSEC)" -} \ No newline at end of file +} diff --git a/client/src/__locales/ja.json b/client/src/__locales/ja.json index 3bc355ac..3783311d 100644 --- a/client/src/__locales/ja.json +++ b/client/src/__locales/ja.json @@ -162,9 +162,9 @@ "example_comment_hash": "# ここもコメントです", "example_regex_meaning": "指定の正規表現に一致するドメインへのアクセスをブロックします", "example_upstream_regular": "通常のDNS(UDPでの問い合わせ)", - "example_upstream_dot": "暗号化されている DNS-over-TLS", - "example_upstream_doh": "暗号化されている DNS-over-HTTPS", - "example_upstream_sdns": "DNSCrypt または DNS-over-HTTPS リゾルバのために DNS Stamps を使えます", + "example_upstream_dot": "暗号化されている <0>DNS-over-TLS", + "example_upstream_doh": "暗号化されている <0>DNS-over-HTTPS", + "example_upstream_sdns": "<1>DNSCrypt または <2>DNS-over-HTTPS リゾルバのために <0>DNS Stamps を使えます", "example_upstream_tcp": "通常のDNS(TCPでの問い合わせ)", "all_lists_up_to_date_toast": "すべてのリストは既に最新です", "updated_upstream_dns_toast": "上流DNSサーバを更新しました", @@ -487,4 +487,4 @@ "list_updated": "{{count}}個のリストが更新されました", "list_updated_plural": "{{count}}個のリストが更新されました", "dnssec_enable": "DNSSECを有効にする" -} \ No newline at end of file +} diff --git a/client/src/__locales/nl.json b/client/src/__locales/nl.json index 18536bcd..a21d2ace 100644 --- a/client/src/__locales/nl.json +++ b/client/src/__locales/nl.json @@ -161,16 +161,16 @@ "example_comment_hash": "# Nog een opmerking", "example_regex_meaning": "blokkeer de toegang tot de domeinen die overeenkomen met de opgegeven reguliere expressie", "example_upstream_regular": "standaard DNS (over UDP)", - "example_upstream_dot": "versleuteldeDNS-over-TLS", - "example_upstream_doh": "versleuteldeDNS-over-HTTPS", - "example_upstream_sdns": "je kunt DNS Stamps voor DNSCrypt of DNS-over-HTTPS resolvers", + "example_upstream_dot": "versleutelde <0>DNS_over_TLS", + "example_upstream_doh": "versleutelde <0>DNS_over_HTTPS", + "example_upstream_sdns": "je kunt <0>DNS Stamps voor <1>DNSCrypt of <2>DNS-over-HTTPS resolvers", "example_upstream_tcp": "standaard DNS (over TCP)", "all_lists_up_to_date_toast": "Alle lijsten zijn reeds up-to-date", "updated_upstream_dns_toast": "De upstream DNS-servers zijn bijgewerkt", "dns_test_ok_toast": "Opgegeven DNS-servers werken correct", "dns_test_not_ok_toast": "Server \"{{key}}\": kon niet worden gebruikt, controleer of u het correct hebt geschreven", - "unblock_btn": "Deblokkeer", - "block_btn": "Blokkeer", + "unblock_btn": "Deblokkeren", + "block_btn": "Blokkeren", "time_table_header": "Tijd", "domain_name_table_header": "Domein naam", "type_table_header": "Type", @@ -237,7 +237,7 @@ "install_devices_router_list_1": "Open de instellingen pagina voor uw router. Meestal kunt u deze vanuit uw browser openen via een URL (zoals http://192.168.0.1/ of http://192.168.1.1/). Mogelijk wordt u gevraagd om het wachtwoord in te voeren. Als u het niet meer weet, kunt u het wachtwoord vaak opnieuw instellen door op een knop op de router zelf te drukken. Voor sommige routers is een specifieke toepassing vereist, die in dat geval al op uw computer / telefoon moet zijn geïnstalleerd.", "install_devices_router_list_2": "Zoek de DHCP/DNS-instellingen. Zoek naar de DNS-letters naast een veld dat twee of drie reeksen nummers toestaat, elk verdeeld in vier groepen van één tot drie cijfers.", "install_devices_router_list_3": "Voer je AdGuard Home server adressen daar in.", - "install_devices_router_list_4": "Je kan de DNS server niet aanpassen op sommige routers. In dat geval kan het een oplossing zijn om AdGuard Home te definiëren als een DHCP server. Je kan ook in de handleiding van je router kijken hoe je een DNS server aanpast.", + "install_devices_router_list_4": "Je kan de DNS server niet aanpassen op sommige routers. In dat geval kan het een oplossing zijn om AdGuard Home te definiëren als een DHCP server. Je kan ook in de handleiding van je router kijken hoe je een DNS server aanpast.", "install_devices_windows_list_1": "Open het Configuratiescherm via het menu Start of Windows zoeken.", "install_devices_windows_list_2": "Ga naar de categorie Netwerk en Internet en vervolgens naar Netwerkcentrum.", "install_devices_windows_list_3": "Zoek aan de linkerkant van het scherm Adapter-instellingen wijzigen en klik erop.", @@ -434,7 +434,7 @@ "example_rewrite_domain": "herschrijf reacties uitsluitend voor deze domeinnaam.", "example_rewrite_wildcard": "herschrijf reacties voor alle subdomeinen van <0>example.org.", "fastest_addr": "Snelste IP adres", - "fastest_addr_desc": "Alle DNS servers bevragen en het snelste IP adres terugkoppelen", + "fastest_addr_desc": "Alle DNS servers bevragen en het snelste IP adres terugkoppelen. Dit zal de DNS verzoeken vertragen omdat we moeten wachten op de antwoorden van alles DNS servers, maar verbetert wel de connectiviteit.", "tags_title": "Labels", "check": "Controleren", "form_enter_host": "Voer een hostnaam in", @@ -447,4 +447,4 @@ "list_updated": "{{count}} lijst geüpdatet", "list_updated_plural": "{{count}} lijsten geüpdatet", "dnssec_enable": "DNSSEC inschakelen" -} \ No newline at end of file +} diff --git a/client/src/__locales/pl.json b/client/src/__locales/pl.json index 8efd5224..19061fbf 100644 --- a/client/src/__locales/pl.json +++ b/client/src/__locales/pl.json @@ -13,8 +13,8 @@ "dhcp_description": "Jeśli router nie zapewnia ustawień DHCP, możesz użyć wbudowanego serwera DHCP AdGuard.", "dhcp_enable": "Włącz serwer DHCP", "dhcp_disable": "Wyłącz serwer DHCP", - "dhcp_not_found": "W sieci nie znaleziono aktywnych serwerów DHCP. Bezpiecznie jest włączyć wbudowany serwer DHCP.", - "dhcp_found": "Znaleziono aktywne serwery DHCP odszukane w sieci. Włączenie wbudowanego serwera DHCP nie jest bezpieczne.", + "dhcp_not_found": "Włączenie wbudowanego serwera DHCP jest bezpieczne - nie znaleźliśmy żadnych aktywnych serwerów DHCP w sieci. Sprawdź to jednak ręcznie, ponieważ nasz automatyczny test nie daje obecnie 100% gwarancji.", + "dhcp_found": "W sieci został znaleziony aktywny serwer DHCP. Włączenie wbudowanego serwera DHCP nie jest bezpieczne.", "dhcp_leases": "Dzierżawa DHCP", "dhcp_static_leases": "Dzierżawy statyczne DHCP", "dhcp_leases_not_found": "Nie znaleziono dzierżaw DHCP", @@ -114,18 +114,18 @@ "encryption_settings": "Ustawienia szyfrowania", "dhcp_settings": "Ustawienia DHCP", "upstream_dns": "Główne serwery DNS", - "upstream_dns_hint": "Jeśli to pole pozostawisz puste, AdGuard Home wykorzysta usługęQuad9 jako główny serwer DNS.", + "upstream_dns_hint": "Jeśli to pole pozostawisz puste, AdGuard Home wykorzysta usługę Quad9 jako główny serwer DNS.", "test_upstream_btn": "Test głównych serwerów DNS", "upstreams": "Główne serwery DNS", "apply_btn": "Zastosuj", "disabled_filtering_toast": "Wyłączone filtrowanie", "enabled_filtering_toast": "Włączone filtrowanie", - "disabled_safe_browsing_toast": "Wyłączone bezpieczne przeglądanie", - "enabled_safe_browsing_toast": "Włączone bezpieczne przeglądanie", + "disabled_safe_browsing_toast": "Bezpieczne przeglądanie zostało wyłączone", + "enabled_safe_browsing_toast": "Bezpieczne przeglądanie zostało włączone", "disabled_parental_toast": "Wyłączona Kontrola Rodzicielska", "enabled_parental_toast": "Włączona Kontrola Rodzicielska", - "disabled_safe_search_toast": "Wyłączone bezpieczne wyszukiwanie", - "enabled_save_search_toast": "Włączone bezpieczne wyszukiwanie", + "disabled_safe_search_toast": "Bezpieczne wyszukiwanie zostało włączone", + "enabled_save_search_toast": "Bezpieczne wyszukiwanie zostało włączone", "enabled_table_header": "Włączone", "name_table_header": "Nazwa", "list_url_table_header": "Adres URL listy", @@ -164,7 +164,7 @@ "example_upstream_regular": "normalny DNS (przez UDP)", "example_upstream_dot": "zaszyfrowany <0>DNS-over-TLS", "example_upstream_doh": "zaszyfrowany <0>DNS-over-HTTPS", - "example_upstream_sdns": "możesz użyć adresu<0>DNS Stamps dla protokołu <1>DNSCrypt lub <2>DNS-over-HTTPS", + "example_upstream_sdns": "możesz użyć adresu <0>DNS Stamps dla protokołu <1>DNSCrypt lub <2>DNS-over-HTTPS", "example_upstream_tcp": "zwykły DNS (przez TCP)", "all_lists_up_to_date_toast": "Wszystkie listy są już aktualne", "updated_upstream_dns_toast": "Główne serwery DNS zostały zaktualizowane", @@ -229,7 +229,7 @@ "rule_label": "Reguła", "list_label": "Lista", "unknown_filter": "Nieznany filtr {{filterId}}", - "install_welcome_title": "Witamy w AdGuard Home!", + "install_welcome_title": "Witaj w AdGuard Home!", "install_welcome_desc": "AdGuard Home to w pełni funkcjonalny serwer DNS do blokowania reklam i śledzenia. Jego celem jest kontrolowanie całej sieci i wszystkich urządzeń, bez konieczności korzystania z jakiegokolwiek programu po stronie klienta.", "install_settings_title": "Interfejs internetowy administratora", "install_settings_listen": "Interfejs sieciowy", @@ -257,7 +257,7 @@ "install_devices_router_list_1": "Otwórz ustawienia routera. Zazwyczaj możesz uzyskać do niego dostęp przez przeglądarkę za pośrednictwem adresu URL (na przykład http://192.168.0.1/ lub http://192.168.1.1/). Możesz zostać poproszony o wpisanie hasła. Jeśli nie pamiętasz hasła, możesz je odzyskać, naciskając przycisk na samym routerze. Niektóre routery wymagają określonej aplikacji, która powinna być już zainstalowana na komputerze lub telefonie.", "install_devices_router_list_2": "Znajdź ustawienia DHCP/DNS. Poszukaj skrótu DNS obok pola, które pozwala wstawić dwa lub trzy zestawy liczb, z których każdy jest podzielony na cztery grupy z jedną do trzech cyfr.", "install_devices_router_list_3": "Wpisz adresy swojego serwera AdGuard Home.", - "install_devices_router_list_4": "Nie możesz ustawić niestandardowego serwera DNS na niektórych routerach. W takim przypadku może pomóc Ci skonfigurowanie AdGuard Home jako serwera DHCP. W przeciwnym razie musisz poszukać instrukcji ustawienia serwerów DNS dla konkretnego modelu routera.", + "install_devices_router_list_4": "Nie możesz ustawić niestandardowego serwera DNS na niektórych routerach. W takim przypadku może pomóc Ci skonfigurowanie AdGuard Home jako serwera DHCP. W przeciwnym razie musisz poszukać instrukcji ustawienia serwerów DNS dla konkretnego modelu routera.", "install_devices_windows_list_1": "Otwórz panel Ustawienia w menu Start lub w Windows.", "install_devices_windows_list_2": "Przejdź do kategorii Sieć i Internet, a następnie do Centrum sieci i udostępniania.", "install_devices_windows_list_3": "Po lewej stronie ekranu znajdź Zmień ustawienia adaptera i kliknij na niego.", @@ -301,7 +301,7 @@ "encryption_key": "Klucz prywatny", "encryption_key_input": "Tutaj kopiuj/wklej klucze prywatne zakodowane w PEM do swojego certyfikatu.", "encryption_enable": "Włącz szyfrowanie (HTTPS, DNS-over-HTTPS i DNS-over-TLS)", - "encryption_enable_desc": "Jeśli szyfrowanie jest włączone, interfejs administracyjny AdGuard Home będzie działał przez HTTPS, a serwer DNS będzie nasłuchiwał żądań przez DNS-overHTTPS i DNS-over-TLS.", + "encryption_enable_desc": "Jeśli szyfrowanie jest włączone, interfejs administracyjny AdGuard Home będzie działał przez HTTPS, a serwer DNS będzie nasłuchiwał żądań przez DNS-over-HTTPS i DNS-over-TLS.", "encryption_chain_valid": "Łańcuch certyfikatów jest prawidłowy", "encryption_chain_invalid": "Łańcuch certyfikatu jest nieprawidłowy", "encryption_key_valid": "Poprawny {{type}} klucz prywatny.", @@ -455,8 +455,8 @@ "example_rewrite_wildcard": "przepisz odpowiedzi dla wszystkich subdomen <0>example.org.", "disable_ipv6": "Wyłącz IPv6", "disable_ipv6_desc": "Jeśli ta funkcja jest włączona, wszystkie zapytania DNS dotyczące adresów IPv6 (typ AAAA) zostaną usunięte.", - "fastest_addr": "Szybszy adres IP", - "fastest_addr_desc": "Zapytaj wszystkie serwery DNS i zwróć najszybszy adres IP spośród wszystkich odpowiedzi", + "fastest_addr": "Najszybszy adres IP", + "fastest_addr_desc": "Zapytaj wszystkie serwery DNS i zwróć najszybszy adres IP spośród wszystkich odpowiedzi. Ta czynność spowolni zapytania DNS, ponieważ odpowiedź musi nadejść ze wszystkich serwerów DNS, ale poprawi ogólną stabilność połączenia.", "autofix_warning_text": "Jeśli klikniesz „Napraw”, AdGuardHome skonfiguruje system do korzystania z serwera DNS AdGuardHome.", "autofix_warning_list": "Wykona następujące zadania: <0>Dezaktywuj system DNSStubListener <0>Ustaw adres serwera DNS na 127.0.0.1 <0>Zamień symboliczny cel łącza z /etc/resolv.conf na /run/systemd/resolve/resolv.conf <0>Zatrzymaj DNSStubListener (przeładuj usługę systemową)", "autofix_warning_result": "W rezultacie wszystkie żądania DNS z Twojego systemu będą domyślnie przetwarzane przez AdGuardHome.", @@ -490,4 +490,4 @@ "list_updated_plural": "{{count}} list zaktualizowanych", "dnssec_enable": "Włącz DNSSEC", "dnssec_enable_desc": "Ustaw flagę DNSSEC w wychodzących zapytaniach DNS i sprawdź wynik (wymagany jest resolver z obsługą zabezpieczania DNSSEC)" -} \ No newline at end of file +} diff --git a/client/src/__locales/ru.json b/client/src/__locales/ru.json index 8010c499..2ee509fe 100644 --- a/client/src/__locales/ru.json +++ b/client/src/__locales/ru.json @@ -162,9 +162,9 @@ "example_comment_hash": "# И вот так тоже", "example_regex_meaning": "блокирует доступ к доменам, соответствующим <0>заданному регулярному выражению", "example_upstream_regular": "обычный DNS (поверх UDP)", - "example_upstream_dot": "зашифрованный DNS-поверх-TLS", - "example_upstream_doh": "зашифрованный DNS-over-HTTPS", - "example_upstream_sdns": "вы можете использовать DNS Stamps для DNSCrypt или DNS-over-HTTPS резолверов", + "example_upstream_dot": "зашифрованный <0>DNS-over-TLS", + "example_upstream_doh": "зашифрованный <0>DNS-over-HTTPS", + "example_upstream_sdns": "вы можете использовать <0>DNS Stamps для <1>DNSCrypt или <2>DNS-over-HTTPS резолверов", "example_upstream_tcp": "обычный DNS (поверх TCP)", "all_lists_up_to_date_toast": "Все списки уже обновлены", "updated_upstream_dns_toast": "Upstream DNS-серверы обновлены", @@ -490,4 +490,4 @@ "list_updated_plural": "Обновлено списков: {{count}}", "dnssec_enable": "Включить DNSSEC", "dnssec_enable_desc": "Установите флаг DNSSEC в исходящих DNS-запросах и проверьте результат (требуется резолвер с поддержкой DNSSEC)" -} \ No newline at end of file +} diff --git a/client/src/__locales/sv.json b/client/src/__locales/sv.json index 763b3807..933e0746 100644 --- a/client/src/__locales/sv.json +++ b/client/src/__locales/sv.json @@ -136,9 +136,9 @@ "example_comment_hash": "# Också en kommentar", "example_regex_meaning": "blockera åtkomst till domäner som matchar det angivna uttrycket", "example_upstream_regular": "vanlig DNS (över UDP)", - "example_upstream_dot": "krypterat DNS-over-TLS", - "example_upstream_doh": "krypterat DNS-over-HTTPS", - "example_upstream_sdns": "Du kan använda DNS-stamps för DNSCrypt eller DNS-över-HTTPS\n-resolvers", + "example_upstream_dot": "krypterat <0>DNS-over-TLS", + "example_upstream_doh": "krypterat <0>DNS-over-HTTPS", + "example_upstream_sdns": "Du kan använda <0>DNS-stamps för <1>DNSCrypt eller <2>DNS-over-HTTPS-resolvers", "example_upstream_tcp": "vanlig DNS (över UDP)", "updated_upstream_dns_toast": "Uppdaterade uppströms-dns-servrar", "dns_test_ok_toast": "Angivna DNS servrar fungerar korrekt", @@ -357,4 +357,4 @@ "descr": "Beskrivning", "whois": "Whois", "filtering_rules_learn_more": "<0>Mer info om att skapa dina egna blockeringslistor för värdar." -} \ No newline at end of file +} diff --git a/client/src/__locales/vi.json b/client/src/__locales/vi.json index 92db28bc..6ff45758 100644 --- a/client/src/__locales/vi.json +++ b/client/src/__locales/vi.json @@ -141,9 +141,9 @@ "example_comment_hash": "# Cũng là một chú thích", "example_regex_meaning": "chặn quyền truy cập vào các miền khớp với <0>biểu thức chính được quy định", "example_upstream_regular": "DNS thông thường (dùng UDP)", - "example_upstream_dot": "được mã hoá DNS-over-TLS", - "example_upstream_doh": "được mã hoá DNS-over-HTTPS", - "example_upstream_sdns": "bạn có thể sử dụng DNS Stamps for DNSCrypt hoặcDNS-over-HTTPS ", + "example_upstream_dot": "được mã hoá <0>DNS-over-TLS", + "example_upstream_doh": "được mã hoá <0>DNS-over-HTTPS", + "example_upstream_sdns": "bạn có thể sử dụng <0>DNS Stamps for <1>DNSCrypt hoặc <2>DNS-over-HTTPS ", "example_upstream_tcp": "DNS thông thường(dùng TCP)", "updated_upstream_dns_toast": "Đã cập nhật máy chủ DNS tìm kiếm", "dns_test_ok_toast": "Máy chủ DNS có thể sử dụng", @@ -414,4 +414,4 @@ "try_again": "Hãy thử lại", "dnssec_enable": "Bật DNSSEC", "dnssec_enable_desc": "Cắm mốc DNSSEC trong các truy vấn DNS sắp tới và kiểm tra kết quả (buộc phải có trình sửa lỗi hỗ trợ DNSSEC)" -} \ No newline at end of file +} diff --git a/client/src/__locales/zh-cn.json b/client/src/__locales/zh-cn.json index 429dd565..8f962a04 100644 --- a/client/src/__locales/zh-cn.json +++ b/client/src/__locales/zh-cn.json @@ -82,7 +82,7 @@ "no_domains_found": "未找到域名", "requests_count": "请求数", "top_blocked_domains": "被拦截域名排行", - "top_clients": "顶级客户端", + "top_clients": "客户端排行", "no_clients_found": "未找到客户端", "general_statistics": "概况统计", "number_of_dns_query_days": "过去 {{count}} 天内 处理的DNS 查询总数", @@ -162,9 +162,9 @@ "example_comment_hash": "# 这也是一行注释", "example_regex_meaning": "阻止访问与<0>指定的正则表达式匹配的域", "example_upstream_regular": "常规 DNS(基于 UDP)", - "example_upstream_dot": "加密 DNS-over-TLS", - "example_upstream_doh": "加密 DNS-over-HTTPS", - "example_upstream_sdns": "你可以使用 DNSCryptDNS Stamps 或者 DNS-over-HTTPS 解析器", + "example_upstream_dot": "加密 <0>DNS-over-TLS", + "example_upstream_doh": "加密 <0>DNS-over-HTTPS", + "example_upstream_sdns": "你可以使用 <1>DNSCrypt 的 <0>DNS Stamps 或者 <2>DNS-over-HTTPS 解析器", "example_upstream_tcp": "常规 DNS(基于 TCP )", "all_lists_up_to_date_toast": "所有列表都是最新的", "updated_upstream_dns_toast": "上游 DNS 已更新", @@ -361,7 +361,7 @@ "access_allowed_desc": "CIDR 或 IP 地址列表。如配置,则 AdGuard Home 仅会接受源自这些 IP 地址的请求。", "access_disallowed_title": "不允许的客户端", "access_disallowed_desc": "CIDR 或 IP 地址列表。如配置,则 AdGuard Home 会放弃源自这些 IP 地址的请求。", - "access_blocked_title": "被拦截的网域", + "access_blocked_title": "不允许的域名", "access_blocked_desc": "不要将此功能与过滤器混淆。AdGuard Home 将在查询时删除具有这些网域的 DNS 查询。在此可以明确指定域名、通配符(wildcard)和网址过滤器规则,例如 'example.org'、'*.example.org' 或 '||example.org^'。", "access_settings_saved": "访问设置保存成功", "updates_checked": "检查更新成功", @@ -417,7 +417,7 @@ "interval_24_hour": "24 小时", "interval_days": "{{count}} 天", "interval_days_plural": "{{count}} 天", - "domain": "域", + "domain": "域名", "answer": "应答", "filter_added_successfully": "已成功添加过滤器", "filter_updated": "成功更新过滤器", @@ -456,7 +456,6 @@ "disable_ipv6": "禁用 IPv6", "disable_ipv6_desc": "启用后,所有IPv6地址 (type AAAA) 的DNS查询都会被丢弃。", "fastest_addr": "最快的 IP 地址", - "fastest_addr_desc": "查询所有DNS服务器并返回所有响应中最快的IP地址", "autofix_warning_text": "若您单击“修复”,AdGuardHome将会配置您的系统以使用AdGuardHome的DNS服务器", "autofix_warning_list": "其将会进行如下工作:<0>停用系统DNSStubListener<0>设置DNS服务器地址为127.0.0.1<0>将/etc/resolv.conf的符号链接目标替换为/run/systemd/resolv/resolv.conf<0>停止DNSStubListener(重新加载系统解析服务)", "autofix_warning_result": "因此,默认情况下所有来自系统的DNS请求都将由AdGuardHome处理。", @@ -490,4 +489,4 @@ "list_updated_plural": "{{count}} 条列表已更新", "dnssec_enable": "启用DNSSEC", "dnssec_enable_desc": "在发出DNS查询中设置DNSSEC标志并检查结果(需要启用DNSSEC的解析器)" -} \ No newline at end of file +} diff --git a/client/src/components/Settings/Clients/Form.js b/client/src/components/Settings/Clients/Form.js index 5b2a49c4..836a672f 100644 --- a/client/src/components/Settings/Clients/Form.js +++ b/client/src/components/Settings/Clients/Form.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { @@ -63,7 +63,6 @@ const validate = (values) => { return errors; }; - const renderFieldsWrapper = (placeholder, buttonTitle) => function cell(row) { const { fields, @@ -122,7 +121,7 @@ const renderMultiselect = (props) => { renderMultiselect.propTypes = { input: PropTypes.object.isRequired, placeholder: PropTypes.string, - options: PropTypes.object, + options: PropTypes.array, }; let Form = (props) => { @@ -142,6 +141,101 @@ let Form = (props) => { tagsOptions, } = props; + const [activeTabLabel, setActiveTabLabel] = useState('settings'); + + const tabs = { + settings: { + title: 'settings', + component:
+ {settingsCheckboxes.map((setting) => ( +
+ +
+ ))} +
, + }, + block_services: { + title: 'block_services', + component:
+
+ +
+
+ +
+
+ +
+
+
+ {SERVICES.map((service) => ( + + ))} +
+
+
, + }, + upstream_dns: { + title: 'upstream_dns', + component:
+
+ link]}> + upstream_dns_client_desc + +
+ + +
, + }, + }; + + const activeTab = tabs[activeTabLabel].component; + return (
@@ -207,86 +301,9 @@ let Form = (props) => {
- -
- {settingsCheckboxes.map((setting) => ( -
- -
- ))} -
-
-
- -
-
- -
-
- -
-
-
- {SERVICES.map((service) => ( - - ))} -
-
-
-
-
- link]}> - upstream_dns_client_desc - -
- - -
+ + {activeTab} diff --git a/client/src/components/ui/Guide.js b/client/src/components/ui/Guide.js index b16cab47..4d0a48f3 100644 --- a/client/src/components/ui/Guide.js +++ b/client/src/components/ui/Guide.js @@ -1,364 +1,293 @@ -import React, { Fragment } from 'react'; +import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { Trans, withTranslation } from 'react-i18next'; import Tabs from './Tabs'; import Icons from './Icons'; -const Guide = (props) => { - const { dnsAddresses } = props; +const dnsPrivacyList = [{ + title: 'Android', + list: [ + { + label: 'setup_dns_privacy_android_1', + }, + { + label: 'setup_dns_privacy_android_2', + components: [ + { + key: 0, + href: 'https://adguard.com/adguard-android/overview.html', + }, + text, + ], + }, + { + label: 'setup_dns_privacy_android_3', + components: [ + { + key: 0, + href: 'https://getintra.org/', + }, + text, + ], + }, + ], +}, +{ + title: 'iOS', + list: [ + { + label: 'setup_dns_privacy_ios_1', + components: [ + { + key: 0, + href: 'https://itunes.apple.com/app/id1452162351', + }, + text, + { + key: 2, + href: 'https://dnscrypt.info/stamps', + }, + + ], + }, + { + label: 'setup_dns_privacy_ios_2', + components: [ + { + key: 0, + href: 'https://adguard.com/adguard-ios/overview.html', + }, + text, + ], + }, + ], +}, +{ + title: 'setup_dns_privacy_other_title', + list: [ + { + label: 'setup_dns_privacy_other_1', + }, + { + label: 'setup_dns_privacy_other_2', + components: [ + { + key: 0, + href: 'https://github.com/AdguardTeam/dnsproxy', + }, + ], + }, + { + href: 'https://github.com/jedisct1/dnscrypt-proxy', + label: 'setup_dns_privacy_other_3', + components: [ + { + key: 0, + href: 'https://github.com/jedisct1/dnscrypt-proxy', + }, + text, + ], + }, + { + label: 'setup_dns_privacy_other_4', + components: [ + { + key: 0, + href: 'https://github.com/jedisct1/dnscrypt-proxy', + }, + text, + ], + }, + { + label: 'setup_dns_privacy_other_5', + components: [ + { + key: 0, + href: 'https://dnscrypt.info/implementations', + }, + { + key: 1, + href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', + }, + ], + }, + ], +}, +]; + +const renderDnsPrivacyList = ({ title, list }) =>
+ {title} +
    {list.map(({ label, components }) =>
  • + { + if (React.isValidElement(props)) { + return props; + } + const { + // eslint-disable-next-line react/prop-types + href, target = '_blank', rel = 'noopener noreferrer', key = '0', + } = props; + + return link; + })}> + {label} + +
  • )} +
+
; + +const getTabs = ({ + tlsAddress, + httpsAddress, + showDnsPrivacyNotice, + t, +}) => ({ + Router: { + // eslint-disable-next-line react/display-name + getTitle: () =>

+ install_devices_router_desc +

, + title: 'Router', + list: ['install_devices_router_list_1', + 'install_devices_router_list_2', + 'install_devices_router_list_3', + // eslint-disable-next-line react/jsx-key + + link + , + ]}>install_devices_router_list_4, + ], + }, + Windows: { + title: 'Windows', + list: ['install_devices_windows_list_1', + 'install_devices_windows_list_2', + 'install_devices_windows_list_3', + 'install_devices_windows_list_4', + 'install_devices_windows_list_5', + 'install_devices_windows_list_6'], + }, + macOS: { + title: 'macOS', + list: ['install_devices_macos_list_1', + 'install_devices_macos_list_2', + 'install_devices_macos_list_3', + 'install_devices_macos_list_4'], + }, + Android: { + title: 'Android', + list: ['install_devices_android_list_1', + 'install_devices_android_list_2', + 'install_devices_android_list_3', + 'install_devices_android_list_4', + 'install_devices_android_list_5'], + }, + iOS: { + title: 'iOS', + list: ['install_devices_ios_list_1', + 'install_devices_ios_list_2', + 'install_devices_ios_list_3', + 'install_devices_ios_list_4'], + }, + dns_privacy: { + title: 'dns_privacy', + // eslint-disable-next-line react/display-name + getTitle: () =>
+
+ {tlsAddress && tlsAddress.length > 0 && ( +
+ text, + text, + ]} + > + setup_dns_privacy_1 + +
+ )} + {httpsAddress && httpsAddress.length > 0 && ( +
+ text, + text, + ]} + > + setup_dns_privacy_2 + +
+ )} + {showDnsPrivacyNotice + ?
+ + link + , + text, + ]} + > + setup_dns_notice + +
+ : <> +
+ text

]}> + setup_dns_privacy_3 +
+
+ {dnsPrivacyList.map(renderDnsPrivacyList)} + } +
+
, + }, +}); + +const renderContent = ({ title, list, getTitle }, t) =>
+
{t(title)}
+
+ {typeof getTitle === 'function' && getTitle()} + {list + &&
    {list.map((item) =>
  1. + {item} +
  2. )} +
} +
+
; + +const Guide = ({ dnsAddresses, t }) => { const tlsAddress = (dnsAddresses && dnsAddresses.filter((item) => item.includes('tls://'))) || ''; const httpsAddress = (dnsAddresses && dnsAddresses.filter((item) => item.includes('https://'))) || ''; const showDnsPrivacyNotice = httpsAddress.length < 1 && tlsAddress.length < 1; + const [activeTabLabel, setActiveTabLabel] = useState('Router'); + + const tabs = getTabs({ + tlsAddress, + httpsAddress, + showDnsPrivacyNotice, + t, + }); + + const activeTab = renderContent(tabs[activeTabLabel], t); + return (
- -
-
- install_devices_router -
-
-

- install_devices_router_desc -

-
    -
  1. - install_devices_router_list_1 -
  2. -
  3. - install_devices_router_list_2 -
  4. -
  5. - install_devices_router_list_3 -
  6. -
  7. - install_devices_router_list_4 -
  8. -
-
-
-
-
Windows
-
-
    -
  1. - install_devices_windows_list_1 -
  2. -
  3. - install_devices_windows_list_2 -
  4. -
  5. - install_devices_windows_list_3 -
  6. -
  7. - install_devices_windows_list_4 -
  8. -
  9. - install_devices_windows_list_5 -
  10. -
  11. - install_devices_windows_list_6 -
  12. -
-
-
-
-
macOS
-
-
    -
  1. - install_devices_macos_list_1 -
  2. -
  3. - install_devices_macos_list_2 -
  4. -
  5. - install_devices_macos_list_3 -
  6. -
  7. - install_devices_macos_list_4 -
  8. -
-
-
-
-
Android
-
-
    -
  1. - install_devices_android_list_1 -
  2. -
  3. - install_devices_android_list_2 -
  4. -
  5. - install_devices_android_list_3 -
  6. -
  7. - install_devices_android_list_4 -
  8. -
  9. - install_devices_android_list_5 -
  10. -
-
-
-
-
iOS
-
-
    -
  1. - install_devices_ios_list_1 -
  2. -
  3. - install_devices_ios_list_2 -
  4. -
  5. - install_devices_ios_list_3 -
  6. -
  7. - install_devices_ios_list_4 -
  8. -
-
-
-
-
- dns_privacy -
-
- {tlsAddress && tlsAddress.length > 0 && ( -
- text, - text, - ]} - > - setup_dns_privacy_1 - -
- )} - {httpsAddress && httpsAddress.length > 0 && ( -
- text, - text, - ]} - > - setup_dns_privacy_2 - -
- )} - {showDnsPrivacyNotice && ( -
- - link - , - text, - ]} - > - setup_dns_notice - -
- )} - {!showDnsPrivacyNotice && ( - -
- text

]}> - setup_dns_privacy_3 -
-
-
- Android -
    -
  • - setup_dns_privacy_android_1 -
  • -
  • - - link - , - text, - ]} - > - setup_dns_privacy_android_2 - -
  • -
  • - - link - , - text, - ]} - > - setup_dns_privacy_android_3 - -
  • -
-
-
- iOS -
    -
  • - - link - , - text, - - link - , - ]} - > - setup_dns_privacy_ios_1 - -
  • -
  • - - link - , - text, - ]} - > - setup_dns_privacy_ios_2 - -
  • -
-
-
- - setup_dns_privacy_other_title - -
    -
  • - setup_dns_privacy_other_1 -
  • -
  • - - link - , - ]} - > - setup_dns_privacy_other_2 - -
  • -
  • - - link - , - text, - ]} - > - setup_dns_privacy_other_3 - -
  • -
  • - - link - , - text, - ]} - > - setup_dns_privacy_other_4 - -
  • -
  • - - link - , - - link - , - ]} - > - setup_dns_privacy_other_5 - -
  • -
-
-
- )} -
-
-
+ {activeTab}
); }; @@ -372,4 +301,15 @@ Guide.propTypes = { t: PropTypes.func.isRequired, }; +renderDnsPrivacyList.propTypes = { + title: PropTypes.string.isRequired, + list: PropTypes.array.isRequired, +}; + +renderContent.propTypes = { + title: PropTypes.string.isRequired, + list: PropTypes.array.isRequired, + getTitle: PropTypes.func, +}; + export default withTranslation()(Guide); diff --git a/client/src/components/ui/Tab.js b/client/src/components/ui/Tab.js index cce9b132..c9860ad5 100644 --- a/client/src/components/ui/Tab.js +++ b/client/src/components/ui/Tab.js @@ -1,40 +1,34 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; +import { useTranslation } from 'react-i18next'; -class Tab extends Component { - handleClick = () => { - this.props.onClick(this.props.label); - } +const Tab = ({ + activeTabLabel, label, title, onClick, +}) => { + const [t] = useTranslation(); + const handleClick = () => onClick(label); - render() { - const { - activeTab, - label, - title, - } = this.props; + const tabClass = classnames({ + tab__control: true, + 'tab__control--active': activeTabLabel === label, + }); - const tabClass = classnames({ - tab__control: true, - 'tab__control--active': activeTab === label, - }); - - return ( -
- - - - {title || label} -
- ); - } -} + return ( +
+ + + + {t(title || label)} +
+ ); +}; Tab.propTypes = { - activeTab: PropTypes.string.isRequired, + activeTabLabel: PropTypes.string.isRequired, label: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired, title: PropTypes.string, diff --git a/client/src/components/ui/Tabs.css b/client/src/components/ui/Tabs.css index 1e6f75c6..871f399a 100644 --- a/client/src/components/ui/Tabs.css +++ b/client/src/components/ui/Tabs.css @@ -37,7 +37,6 @@ } .tab__control--active { - font-weight: 700; color: #4a4a4a; opacity: 1; } diff --git a/client/src/components/ui/Tabs.js b/client/src/components/ui/Tabs.js index 7da68fba..f8081a72 100644 --- a/client/src/components/ui/Tabs.js +++ b/client/src/components/ui/Tabs.js @@ -1,68 +1,52 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; - import Tab from './Tab'; import './Tabs.css'; -class Tabs extends Component { - state = { - activeTab: this.props.children[0].props.label, - }; +const Tabs = (props) => { + const { + tabs, controlClass, activeTabLabel, setActiveTabLabel, children: activeTab, + } = props; - onClickTabControl = (tab) => { - this.setState({ activeTab: tab }); - } + const onClickTabControl = (tabLabel) => setActiveTabLabel(tabLabel); - render() { - const { - props: { - controlClass, - children, - }, - state: { - activeTab, - }, - } = this; - - const getControlClass = classnames({ - tabs__controls: true, - [`tabs__controls--${controlClass}`]: controlClass, - }); - - return ( -
-
- {children.map((child) => { - const { label, title } = child.props; + const getControlClass = classnames({ + tabs__controls: true, + [`tabs__controls--${controlClass}`]: controlClass, + }); + return ( +
+
+ {Object.values(tabs) + .map((props) => { + // eslint-disable-next-line react/prop-types + const { title, label = title } = props; return ( ); })} -
-
- {children.map((child) => { - if (child.props.label !== activeTab) { - return false; - } - return child.props.children; - })} -
- ); - } -} +
+ {activeTab} +
+
+ ); +}; Tabs.propTypes = { controlClass: PropTypes.string, - children: PropTypes.array.isRequired, + tabs: PropTypes.object.isRequired, + activeTabLabel: PropTypes.string.isRequired, + setActiveTabLabel: PropTypes.func.isRequired, + children: PropTypes.element.isRequired, }; export default Tabs; diff --git a/client/src/helpers/form.js b/client/src/helpers/form.js index d312df39..bace77b5 100644 --- a/client/src/helpers/form.js +++ b/client/src/helpers/form.js @@ -103,7 +103,7 @@ export const renderGroupField = ({ renderGroupField.propTypes = { input: PropTypes.object.isRequired, - id: PropTypes.string.isRequired, + id: PropTypes.string, className: PropTypes.string, placeholder: PropTypes.string, type: PropTypes.string,