Merge pull request #441 from nextcloud/enh/418/add-before-unload

add before-unload animation
This commit is contained in:
Simon L 2022-03-31 16:04:40 +02:00 committed by GitHub
commit cd055c0838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -10,4 +10,8 @@ if (document.hasFocus()) {
setTimeout(function(){
window.location.reload(1);
}, 5000);
} else {
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});
}

View file

@ -0,0 +1,3 @@
window.addEventListener("beforeunload", function() {
document.getElementById('overlay').classList.add('loading')
});

View file

@ -406,6 +406,8 @@
{% if isApacheStarting == true or isBackupContainerRunning == true or isWatchtowerRunning == true %}
<script type="text/javascript" src="automatic_reload.js"></script>
{% else %}
<script type="text/javascript" src="before-unload.js"></script>
{% endif %}
</div>