Skip to content

Commit

Permalink
Display connect error messages, add noscript message
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroglyph committed Apr 7, 2019
1 parent 71a6fa9 commit 2af9da0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
11 changes: 10 additions & 1 deletion fow-mini/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ <h1 class="kernIn">FerryClock Guided Set Up</h1>
<div id="stepsArea">
<div class="step" id="welcomeStep">
<h1>Welcome</h1>
<h3>We need some help connecting FerryClock so that we can get <i>sailing</i> in your local wireless network.</h3>
<h3 id="firstHeading">We need some help connecting FerryClock so that we can get <i>sailing</i> in your local wireless network.</h3>
<noscript>
<h3 id="noscriptWarning">This page won't work with JavaScript disabled.</h3>
<style>
#next,#firstHeading {
display: none;
}
</style>
</noscript>
<button id="next" tabindex="1">Next&nbsp;&raquo;</button>
</div>
<div class="step hidden">
Expand Down Expand Up @@ -129,6 +137,7 @@ <h1>Connecting...</h1>
</div>
<div class="step hidden" id="failedStep">
<h1>Whoah there! Connection failed!</h1>
<p>Error message was: <code id="errorMessage"></code></p>
<p>You can review your connection information and try again.</p>
<button class="split" id="redo" tabindex="9">Review info and retry</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions fow-mini/data/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ window.onload = () => {
unhideAndFocus(successStep);
},
(failReason) => {
document.querySelector("#errorMessage").textContent = failReason;
steps[nextIdx].classList.add("hidden");
unhideAndFocus(failedStep);
})
Expand Down
6 changes: 5 additions & 1 deletion fow-mini/data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ html {
button.danger:active {
background-color: rgb(211, 0, 0);
}

#back {
width: 10%;
padding-left: 10px;
Expand Down Expand Up @@ -276,6 +276,10 @@ html {
width: 100%;
}

#noscriptWarning {
animation: OpacityFadeIn 1s 4s both;
}

.step>input {
width: calc(100% - 24px);
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion fow-mini/lib/fow/ConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ConnectionManager::ConnectionManager(const String programName) : name(programNam
connStatus = "Connection lost";
break;
case WL_DISCONNECTED :
connStatus = "No connection has been made";
connStatus = "Currently disconnected (check that SSID and password are correct)";
break;
default :
connStatus = String("Other (") + WiFi.status() + ")";
Expand Down

0 comments on commit 2af9da0

Please sign in to comment.