Skip to content

Commit

Permalink
Only show the lighter curtain if autoreload is on
Browse files Browse the repository at this point in the history
I added this cause I'm slightly worried about other server environments
sending the same 1012 close code.
  • Loading branch information
jcheng5 committed Oct 17, 2023
1 parent 798b336 commit 7f59f93
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inst/www/shared/shiny-autoreload.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inst/www/shared/shiny-autoreload.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny.min.css

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

2 changes: 1 addition & 1 deletion inst/www/shared/shiny_scss/shiny.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pre.shiny-text-output {
pointer-events: none;
}

#shiny-disconnected-overlay.reloading {
html.autoreload-enabled #shiny-disconnected-overlay.reloading {
opacity: 0;
animation: fadeIn 250ms forwards;
animation-delay: 1s;
Expand Down
2 changes: 2 additions & 0 deletions srcts/extras/shiny-autoreload.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable unicorn/filename-case */

document.documentElement.classList.add("autoreload-enabled");

const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
// Add trailing slash to path, if necessary, before appending "autoreload"
const defaultPath =
Expand Down

0 comments on commit 7f59f93

Please sign in to comment.