Add loading spinner for enable/disable services

This commit is contained in:
Taylor Helsper 2021-04-17 00:08:27 -05:00
parent 0169d196b4
commit 6d8016929d
3 changed files with 30 additions and 0 deletions

View File

@ -820,6 +820,21 @@ a:link.ui-button, a:visited.ui-button, .ui-button {
width: 128px;
}
.loading_spinner_overlay {
background: #ffffff;
color: #444444;
position: fixed;
height: 100%;
width: 100%;
z-index: 5000;
top: 0;
left: 0;
float: left;
text-align: center;
padding-top: 25%;
opacity: .92;
}
.halving_message_main_page {
color: #333333;
border: 3px solid orange;

View File

@ -110,6 +110,11 @@ th td {
background-color: #3a4854;
}
.loading_spinner_overlay {
color: #ddd;
background-color: #303841;
}
.main_page_warning_block,
.halving_message_main_page {
color: #ddd;

View File

@ -40,6 +40,8 @@
"Disable "+full_name,
"Are you sure you want to disable "+full_name+"?",
function(){
$( this ).dialog( "close" );
$('#loading_spinner_overlay').fadeIn();
window.location.href="/toggle-enabled?app="+short_name
});
} else {
@ -50,6 +52,8 @@
get_custom_enable_message(short_name) +
"Are you sure you want to enable "+full_name+"?",
function(){
$( this ).dialog( "close" );
$('#loading_spinner_overlay').fadeIn();
window.location.href="/toggle-enabled?app="+short_name
});
}
@ -629,6 +633,12 @@
<a href="/settings/shutdown-device" class="ui-button ui-widget ui-corner-all" style="width: 80%; margin: auto;">Shutdown</a>
</center>
</div>
<div id="loading_spinner_overlay" class="loading_spinner_overlay" style="display:none;">
<img id="loading_spinner" class="loading_image" src="{{ url_for('static', filename="images/loading.gif")}}"/>
<br/>
Loading...
</div>
{% include 'includes/footer.html' %}
</body>