-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh button plus issue opener and email contact
- Loading branch information
1 parent
76128c7
commit 1c1a6df
Showing
1 changed file
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,16 +104,19 @@ ui <- shiny::fluidPage( | |
background-color: grey; | ||
opacity: 1; | ||
z-index: 99999 !important; | ||
} | ||
#shiny-disconnected-overlay::after { | ||
content: 'Connection lost. You need to refresh the page. You will need to start again. There can be multiple reasons, such as instable internet connection. If you reproduce this behaviour please report the steps/ clicks you took and report them! This would help all of us, developers, contributors and users <3'; | ||
color: white; | ||
font-size: 20px; | ||
position: absolute; | ||
top: 50%; /* Center the text vertically */ | ||
left: 50%; /* Center the text horizontally */ | ||
transform: translate(-50%, -50%); | ||
text-align: center; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
pointer-events: auto; /* Allow pointer events */ | ||
padding: 20px; | ||
line-height: 1.5; | ||
} | ||
#shiny-disconnected-overlay a { | ||
color: #add8e6; /* Light blue color for links */ | ||
text-decoration: underline; | ||
} | ||
#sidebar_data_selection { | ||
background-color: #70BF4F47; | ||
|
@@ -203,7 +206,29 @@ ui <- shiny::fluidPage( | |
background-color: #A208BA !important; /* Strong Purple */ | ||
color: white !important; | ||
} | ||
")) | ||
")), | ||
tags$script(HTML(" | ||
$(document).on('shiny:disconnected', function(event) { | ||
function checkOverlay() { | ||
var overlay = $('#shiny-disconnected-overlay'); | ||
if (overlay.length) { | ||
console.log('Overlay found, updating content'); // Debugging line | ||
overlay.html( | ||
'<div style=\"text-align: center; line-height: 1.5;\">' + | ||
'Connection lost.<br>You need to <a href=\"#\" onclick=\"location.reload();\" style=\"color: #add8e6;\">refresh the page</a> to start again.<br>' + | ||
'There can be multiple reasons, such as an unstable internet connection. If you reproduce this behavior, ' + | ||
'please report the steps/clicks you took!<br>This would help all of us—developers, contributors, and users ❤️<br>' + | ||
'Report best through <a href=\"https://github.com/ICB-DCM/cOmicsArt/issues/new/choose\" target=\"_blank\" style=\"color: #add8e6; margin: 0 5px;\">GitHub</a> ' + | ||
'or email to <a href=\"mailto:[email protected]\" style=\"color: #add8e6; margin: 0 5px;\">[email protected]</a>.' + | ||
'</div>' | ||
); | ||
} else { | ||
setTimeout(checkOverlay, 100); // Retry after 100ms | ||
} | ||
} | ||
checkOverlay(); | ||
}); | ||
")) | ||
), | ||
########## | ||
use_cicerone(), | ||
|