Skip to content

Commit 7f59f93

Browse files
committed
Only show the lighter curtain if autoreload is on
I added this cause I'm slightly worried about other server environments sending the same 1012 close code.
1 parent 798b336 commit 7f59f93

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

inst/www/shared/shiny-autoreload.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny-autoreload.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny_scss/shiny.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pre.shiny-text-output {
9696
pointer-events: none;
9797
}
9898

99-
#shiny-disconnected-overlay.reloading {
99+
html.autoreload-enabled #shiny-disconnected-overlay.reloading {
100100
opacity: 0;
101101
animation: fadeIn 250ms forwards;
102102
animation-delay: 1s;

srcts/extras/shiny-autoreload.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* eslint-disable unicorn/filename-case */
22

3+
document.documentElement.classList.add("autoreload-enabled");
4+
35
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
46
// Add trailing slash to path, if necessary, before appending "autoreload"
57
const defaultPath =

0 commit comments

Comments
 (0)