Skip to content

Commit c3e4566

Browse files
authored
Merge pull request #15 from gjroots/dev
v1.1.3
2 parents badb672 + 533d5e9 commit c3e4566

File tree

15 files changed

+71
-47
lines changed

15 files changed

+71
-47
lines changed

components/utils/initialization.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ esp_err_t IRAM_ATTR parms_init()
4545
get_config_param_str("ap_ip", &ap_ip);
4646
get_config_param_str("auth_username", &authUsername);
4747
// get_config_param_str("mac_ap", &macAp);
48-
get_config_param_str("auth_username", &authPass);
48+
get_config_param_str("auth_password", &authPass);
4949

5050
get_config_param_int("web_server", &webServer);
5151
get_config_param_int("led_enable", &ledEnable);
@@ -67,7 +67,7 @@ esp_err_t IRAM_ATTR parms_init()
6767
gateway_addr = (gateway_addr != NULL) ? gateway_addr : "";
6868

6969
ap_ip = (ap_ip != NULL) ? ap_ip : DEFAULT_AP_IP;
70-
customDNSip = (customDNSip != NULL) ? customDNSip : "default";
70+
customDNSip = (customDNSip != NULL) ? customDNSip : DEFAULT_DNS1;
7171

7272
authUsername = (authUsername != NULL) ? authUsername : DEFAULT_ADMIN_USERNAME;
7373
authPass = (authPass != NULL) ? authPass : DEFAULT_ADMIN_PASSWORD;
@@ -82,13 +82,13 @@ esp_err_t IRAM_ATTR parms_init()
8282
auth_info.username = authUsername;
8383
auth_info.password = authPass;
8484

85-
if (IsCustomDnsEnable)
86-
{
87-
if (strcmp(customDNSip, "default") == 0)
88-
{
89-
customDNSip = DEFAULT_DNS1;
90-
}
91-
}
85+
// if (IsCustomDnsEnable)
86+
// {
87+
// if (strcmp(customDNSip, "default") == 0)
88+
// {
89+
// customDNSip = DEFAULT_DNS1;
90+
// }
91+
// }
9292

9393
macAp = currentMAC; //(macAp != NULL) ? macAp : currentMAC;
9494

components/web_server/storage_handler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ esp_err_t save_settings_data_handler(httpd_req_t *req)
133133
}
134134
}
135135

136-
if (httpd_query_key_value(query_buf, "authUsername", param_buf, sizeof(param_buf)) == ESP_OK)
136+
if (httpd_query_key_value(query_buf, "adminUsername", param_buf, sizeof(param_buf)) == ESP_OK)
137137
{
138138
authUsername = html_escape(strdup(param_buf));
139139
err = nvs_set_str(handle, "auth_username", authUsername);
140140
}
141-
if (httpd_query_key_value(query_buf, "authPassword", param_buf, sizeof(param_buf)) == ESP_OK)
141+
if (httpd_query_key_value(query_buf, "adminPassword", param_buf, sizeof(param_buf)) == ESP_OK)
142142
{
143143
authPass = html_escape(strdup(param_buf));
144-
err = nvs_set_str(handle, "auth_username", authPass);
144+
err = nvs_set_str(handle, "auth_password", authPass);
145145
}
146146

147147
if (httpd_query_key_value(query_buf, "maxLoginAttempts", param_buf, sizeof(param_buf)) == ESP_OK)

components/web_server/www/html/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ GEM
1111
http_parser.rb (~> 0)
1212
eventmachine (1.2.7)
1313
execjs (2.8.1)
14-
ffi (1.15.5-x64-mingw-ucrt)
14+
ffi (1.15.5)
1515
forwardable-extended (2.6.0)
16-
google-protobuf (3.21.12-x64-mingw-ucrt)
16+
google-protobuf (3.24.2-x64-mingw-ucrt)
1717
htmlbeautifier (1.4.2)
1818
htmlcompressor (0.4.0)
1919
http_parser.rb (0.8.0)

components/web_server/www/html/_i18n/english.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ info:
120120
table:
121121
A: "version"
122122
B: "Update"
123-
C: "IP / gateway"
123+
C: "IP / DNS"
124124
card-2:
125125
header: "Connected Users ($$)"
126126
table:

components/web_server/www/html/js/functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
---
3-
var version="1.1.2",
3+
var version="1.1.3",
44
sL = getE('spinner-container'),
55
notification = getE("notification"),
66
themeColor = getComputedStyle(document.body),

components/web_server/www/html/js/info.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
---
33
var versionCell = getE("version"),
44
ipGateway = getE("ipGatewayAddress"),
5+
ssid,
56
ipAddress,
6-
gateWay,
7+
dns,
78
connection = getE("connection"),
89
connectedUserCount = getE('clientsFound'),
910
connectedUsers = getE('users'),
@@ -27,8 +28,9 @@ function getData() {
2728
return
2829
}
2930
// console.log(res.clients.length)
31+
ssid = res.ssid;
3032
ipAddress = res.ipAddress;
31-
gateWay = res.gatewayAddress;
33+
dns = res.dns;
3234
ap_rss = res.rss;
3335
wifiAuthFail = res.wifiAuthFail;
3436
clients = res.clients;
@@ -130,10 +132,10 @@ function ap_connection() {
130132

131133
var tr = '<tr><td>Wifi status</td>';
132134
tr += '<td><div>' + svgImg + '</div><div><span style="background:linear-gradient(135deg, ' + getColor(signalPercent) + ' ' + signalPercent + '%,rgba(0,0,0,0.15) ' + signalPercent + '%)"></span><span style="color:' + getColor(signalPercent, true) + '">' + signalPercent + '</span></div></td>';
133-
tr += '<td class=' + (state ? "green" : "red") + '><b>' + (state ? 'Connected' : (wifiAuthFail ? "wifi Auth Fail" : 'Disconnected')) + '<b></td><tr>';
135+
tr += '<td class=' + (state ? "green" : "red") + '><b>' + (state ? ssid : (wifiAuthFail ? "wifi Auth Fail" : 'Disconnected')) + '<b></td><tr>';
134136
connection.innerHTML = tr;
135137

136-
tr = '<tr><td>{% t info.card-1.table.C %}</td><td><b>' + ipAddress + '</b></td><td>' + gateWay + '</td></tr>';
138+
tr = '<tr><td>{% t info.card-1.table.C %}</td><td><b>' + ipAddress + '</b></td><td>' + dns + '</td></tr>';
137139
ap_rss != 0 ? ipGateway.innerHTML = tr : "";
138140
}
139141
function users() {

components/web_server/www/html/sysinfo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ipAddress": "192.168.1.128",
3-
"gatewayAddress": "192.168.1.1",
4-
"rss": -70,
3+
"dns": "192.168.1.1",
4+
"rss": -70,
55
"wifiAuthFail" : false,
66
"clients": [
77
{
0 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.

components/wifi_handler/include/wifi_handler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extern "C"
1515

1616
char *wifi_scan_handler(void);
1717
char *wifi_info_handler(void);
18+
bool has_static_ip;
1819

1920
#ifdef __cplusplus
2021
}

0 commit comments

Comments
 (0)