mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Add successMsg, set btn state disabled until update complete
This commit is contained in:
parent
ea5ee29d4a
commit
ffafcf2c83
2 changed files with 12 additions and 4 deletions
|
@ -337,15 +337,22 @@ function fetchUpdateResponse() {
|
|||
$(divId).removeClass('invisible');
|
||||
}
|
||||
if (response.includes(complete)) {
|
||||
var successMsg = $('#successMsg').data('message');
|
||||
$('#updateMsg').after('<span class="small">' + successMsg + '</span>');
|
||||
$('#updateMsg').addClass('fa-check');
|
||||
$('#updateMsg').removeClass('invisible');
|
||||
$('#updateStep6').removeClass('invisible');
|
||||
$('#updateSync2').removeClass("fa-spin");
|
||||
$('#updateOk').removeAttr('disabled');
|
||||
endPolling = true;
|
||||
break;
|
||||
} else if (response.includes(error)) {
|
||||
var errorMsg = $('#errorMsg').data('message');
|
||||
$('#updateErr').after('<span class="small">' + errorMsg + '</span>');
|
||||
$('#updateErr').removeClass('invisible');
|
||||
$('#updateMsg').after('<span class="small">' + errorMsg + '</span>');
|
||||
$('#updateMsg').addClass('fa-times');
|
||||
$('#updateMsg').removeClass('invisible');
|
||||
$('#updateSync2').removeClass("fa-spin");
|
||||
$('#updateOk').removeAttr('disabled');
|
||||
endPolling = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -122,11 +122,12 @@ require_once 'app/lib/Parsedown.php';
|
|||
<div class="ml-5"><i class="fas fa-check mr-2 invisible" id="updateStep4"></i><?php echo _("Downloading latest files"); ?></div>
|
||||
<div class="ml-5"><i class="fas fa-check mr-2 invisible" id="updateStep5"></i><?php echo _("Installing application"); ?></div>
|
||||
<div class="ml-5 mb-1"><i class="fas fa-check mr-2 invisible" id="updateStep6"></i><?php echo _("Update complete"); ?></div>
|
||||
<div class="ml-5 mb-3"><i class="fas fa-times mr-2 invisible" id="updateErr"></i></div>
|
||||
<div class="ml-5 mb-3"><i class="fas mr-2 invisible" id="updateMsg"></i></div>
|
||||
<div id="errorMsg" data-message="<?php echo _("An error occurred. Check the log at <code>/tmp/raspap_install.log</code>"); ?>"></div>
|
||||
<div id="successMsg" data-message="<?php echo _("Success. Refresh this page to confirm the new version."); ?>"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline btn-primary" data-dismiss="modal" /><?php echo _("OK"); ?></button>
|
||||
<button type="button" class="btn btn-outline btn-primary" data-dismiss="modal" disabled id="updateOk" /><?php echo _("OK"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue