@@ -75,6 +75,7 @@
Active Session
// just during the on-submit window.
var actionButtons = document.querySelectorAll('button[type="submit"]');
disableButtonsOnSubmit(actionButtons);
+ initTransitioning('transitioning-hint', actionButtons, {{ belt_transitioning|tojson }});
// Native only: needs a secure context (localhost/HTTPS), so a phone on LAN HTTP skips it.
if ('wakeLock' in navigator) {
@@ -85,6 +86,13 @@
Active Session
});
}
+ var speedEl = document.getElementById('speed'), distanceEl = document.getElementById('distance');
+ function updateTitle() {
+ var title = speedEl.textContent + ' mph \u00b7 ' + distanceEl.textContent + ' - WalkingDad';
+ if (document.title !== title) document.title = title;
+ }
+ updateTitle();
+
startStatsStream(function(data) {
setTransitioning('transitioning-hint', actionButtons, data.belt_transitioning === true);
// Check if the server has auto-paused the session
@@ -92,10 +100,11 @@
Active Session
window.location.reload();
} else {
setStatValue(document.getElementById('time_active'), data.time_active);
- setStatValue(document.getElementById('speed'), data.speed.toFixed(1));
- setStatValue(document.getElementById('distance'), data.distance.toFixed(2) + ' mi');
+ setStatValue(speedEl, data.speed.toFixed(1));
+ setStatValue(distanceEl, data.distance.toFixed(2) + ' mi');
setStatValue(document.getElementById('steps'), String(parseInt(data.steps, 10)));
setStatValue(document.getElementById('calories'), data.calories.toFixed(0));
+ updateTitle();
}
});
diff --git a/templates/base.html b/templates/base.html
index 83963da..868daf2 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1504,13 +1504,20 @@
-- Active/Paused/Start's own page headings are
// call this synchronously the moment their own inline
+ {% if keyboard_shortcuts_enabled %}
+
+
+
+
+
+
No shortcuts on this screen. They work while a session is running.
+
+
Start and End Session have no shortcut. Turn shortcuts off in Settings.
+
+
+
+
+
+ {% endif %}