Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
9c3b17f
1
Parent(s):
9a27d48
- static/index.html +3 -3
static/index.html
CHANGED
@@ -274,7 +274,7 @@
|
|
274 |
document.getElementById('useRnnToggle').checked = data.use_rnn;
|
275 |
} else if (data.type === "timeout_warning") {
|
276 |
console.log(`Received timeout warning: ${data.timeout_in} seconds remaining`);
|
277 |
-
setTimeoutMessage(`No activity detected. Connection will be dropped in <span id="timeoutCountdown">${data.timeout_in}</span> seconds and page will refresh automatically.`);
|
278 |
startTimeoutCountdown(data.timeout_in, false, 'idle'); // false = show stay connected button
|
279 |
} else if (data.type === "activity_reset") {
|
280 |
console.log("Server detected user activity, resetting timeout");
|
@@ -320,7 +320,7 @@
|
|
320 |
startTimeoutCountdown(Math.ceil(data.time_remaining), true, 'session'); // true = hide stay connected button
|
321 |
} else if (data.type === "idle_warning") {
|
322 |
console.log(`Idle warning: ${data.time_remaining} seconds until timeout`);
|
323 |
-
setTimeoutMessage(`No activity detected. Connection will be dropped in <span id="timeoutCountdown">${Math.ceil(data.time_remaining)}</span> seconds and page will refresh automatically.`);
|
324 |
startTimeoutCountdown(Math.ceil(data.time_remaining), false, 'idle'); // false = show stay connected button
|
325 |
} else if (data.type === "grace_period") {
|
326 |
console.log(`Grace period: ${data.time_remaining} seconds remaining`);
|
@@ -605,7 +605,7 @@
|
|
605 |
|
606 |
// Update timeout message based on new timeout type
|
607 |
if (newEarliestTimeout.type === 'idle') {
|
608 |
-
setTimeoutMessage(`No activity detected. Connection will be dropped in <span id="timeoutCountdown">${newEarliestTimeout.remaining}</span> seconds and page will refresh automatically.`);
|
609 |
} else if (newEarliestTimeout.type === 'session' || newEarliestTimeout.type === 'grace') {
|
610 |
setTimeoutMessage(`⏰ Other users waiting. Time remaining: <span id="timeoutCountdown">${newEarliestTimeout.remaining}</span> seconds.`);
|
611 |
}
|
|
|
274 |
document.getElementById('useRnnToggle').checked = data.use_rnn;
|
275 |
} else if (data.type === "timeout_warning") {
|
276 |
console.log(`Received timeout warning: ${data.timeout_in} seconds remaining`);
|
277 |
+
setTimeoutMessage(`No user activity detected. Connection will be dropped in <span id="timeoutCountdown">${data.timeout_in}</span> seconds and page will refresh automatically.`);
|
278 |
startTimeoutCountdown(data.timeout_in, false, 'idle'); // false = show stay connected button
|
279 |
} else if (data.type === "activity_reset") {
|
280 |
console.log("Server detected user activity, resetting timeout");
|
|
|
320 |
startTimeoutCountdown(Math.ceil(data.time_remaining), true, 'session'); // true = hide stay connected button
|
321 |
} else if (data.type === "idle_warning") {
|
322 |
console.log(`Idle warning: ${data.time_remaining} seconds until timeout`);
|
323 |
+
setTimeoutMessage(`No user activity detected. Connection will be dropped in <span id="timeoutCountdown">${Math.ceil(data.time_remaining)}</span> seconds and page will refresh automatically.`);
|
324 |
startTimeoutCountdown(Math.ceil(data.time_remaining), false, 'idle'); // false = show stay connected button
|
325 |
} else if (data.type === "grace_period") {
|
326 |
console.log(`Grace period: ${data.time_remaining} seconds remaining`);
|
|
|
605 |
|
606 |
// Update timeout message based on new timeout type
|
607 |
if (newEarliestTimeout.type === 'idle') {
|
608 |
+
setTimeoutMessage(`No user activity detected. Connection will be dropped in <span id="timeoutCountdown">${newEarliestTimeout.remaining}</span> seconds and page will refresh automatically.`);
|
609 |
} else if (newEarliestTimeout.type === 'session' || newEarliestTimeout.type === 'grace') {
|
610 |
setTimeoutMessage(`⏰ Other users waiting. Time remaining: <span id="timeoutCountdown">${newEarliestTimeout.remaining}</span> seconds.`);
|
611 |
}
|