Skip to content

Commit

Permalink
Small fixes and ench. see changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
omersiar committed Mar 16, 2018
1 parent f0f0696 commit 47b27bb
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 33 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
All notable changes to this project will be documented in this file.

## [Unreleased]
#### Added
- [webui] Try to connect button upon inprogress complete.
- [webui] Restart without saving changes.

#### Fixed
- [webui] wrong version is shown
- [webui] wrong version is shown #80 .
- [webui] whole html was shifted previous css change.

## [0.6.1] - 2018-03-14
#### Added
Expand Down
Binary file modified bin/firmware.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,9 @@ void ICACHE_RAM_ATTR onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * c
else if (strcmp(command, "status") == 0) {
sendStatus();
}
else if (strcmp(command, "restart") == 0) {
ESP.restart();
}
else if (strcmp(command, "destroy") == 0) {
formatreq = true;
}
Expand Down
14 changes: 7 additions & 7 deletions src/webh/esprfid.htm.gz.h

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/webh/esprfid.js.gz.h

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/webh/index.html.gz.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/webh/required.css.gz.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/websrc/3rdparty/css/sidebar.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions src/websrc/esprfid.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,28 @@
<div class="row">
<div class="col-sm-6">
<legend>Backup</legend>
<h6 class="text-muted">Please make sure that you have made a backup before updating the firmware.</h6>
<h6 class="text-muted">Please make sure that you have made a backup on regular basis.</h6>
<div>
<button class="btn btn-link btn-sm" onclick="backupuser()">Backup User Data</button>
<button class="btn btn-link btn-sm" onclick="backupuser();">Backup User Data</button>
<a id="downloadUser" style="display:none"></a>
<button class="btn btn-link btn-sm" onclick="backupset()">Backup Settings</button>
<button class="btn btn-link btn-sm" onclick="backupset();">Backup Settings</button>
<a id="downloadSet" style="display:none"></a>
</div>
<br>
<div>
<legend>Restore</legend>
<h6 class="text-muted">Click on links and choose your backup file to restore.</h6>
<label for="restoreUser" class="btn btn-link btn-sm">Restore User Data</label>
<input id="restoreUser" type="file" accept="text/json" onchange="restoreUser()" style="display:none;">
<input id="restoreUser" type="file" accept="text/json" onchange="restoreUser();" style="display:none;">
<label for="restoreSet" class="btn btn-link btn-sm">Restore Settings</label>
<input id="restoreSet" type="file" accept="text/json" onchange="restoreSet()" style="display:none;">
<input id="restoreSet" type="file" accept="text/json" onchange="restoreSet();" style="display:none;">
</div>
<br>
<div>
<legend>Restart</legend>
<h6 class="text-muted">Click to restart your device without saving changes.</h6>
<label for="restart" class="btn btn-link btn-sm">Restart Device</label>
<button id="restart" class="btn btn-link btn-sm" onclick="restartESP();" style="display:none;"></button>
</div>
<br>
<div id="restoremodal" class="modal fade" role="dialog">
Expand Down Expand Up @@ -50,7 +57,7 @@ <h4 class="modal-title">Please wait while restoring user data...</h4>
<div class="container">
<div class="row">
<br>
<div class="col-md-4 col-md-offset-4">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Please wait while your ESP restarts...</h3>
Expand All @@ -61,6 +68,7 @@ <h3 class="panel-title">Please wait while your ESP restarts...</h3>
</div>
</div>
</div>
<div class="panel-footer text-center" id="reconnect" style="display:none;"></div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/websrc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h1><i class="glyphicon glyphicon-tags" aria-hidden="true"></i>esp-rfid</h1>
<a href="#" class="article" onclick="logout();">Logout</a>
</li>
<li>
<h6 class="text-center">esp-rfid v0.6</h6>
<h6 id="mainver" class="text-center"></h6>
</li>
</ul>
</nav>
Expand Down
16 changes: 13 additions & 3 deletions src/websrc/js/esprfid.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,9 @@ function acctypefinder() {
}
}



function restartESP() {
inProgress("restart");
}

function colorStatusbar(ref) {
var percentage = ref.style.width.slice(0, -1);
Expand All @@ -805,6 +806,7 @@ function listStats() {
document.getElementById("dns").innerHTML = ajaxobj.dns;
document.getElementById("mac").innerHTML = ajaxobj.mac;
document.getElementById("sver").innerText = config.general.version;
$("#mainver").text(config.general.version);
}

var nextIsNotJson = false;
Expand Down Expand Up @@ -861,7 +863,7 @@ function socketMessageListener(evt) {
break;
case "configfile":
config = obj;
config.general.version = "v0.6.1";
config.general.version = "v0.6.2";
break;
default:
break;
Expand Down Expand Up @@ -1132,6 +1134,11 @@ function inProgress(callback) {
i++;
if (i === 101) {
clearInterval(prg);
var a = document.createElement("a");
a.href = "https://" + config.general.hostnm + ".local";
a.innerText = "Try to reconnect ESP";
document.getElementById("reconnect").appendChild(a);
document.getElementById("reconnect").style.display = "block";
document.getElementById("updateprog").className = "progress-bar progress-bar-success";
document.getElementById("updateprog").innerHTML = "Completed";
}
Expand All @@ -1152,6 +1159,9 @@ function inProgress(callback) {
case "destroy":
websock.send("{\"command\":\"destroy\"}");
break;
case "restart":
websock.send("{\"command\":\"restart\"}");
break;
default:
break;

Expand Down

0 comments on commit 47b27bb

Please sign in to comment.