mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: update progress bar more frequently
This commit is contained in:
@@ -25,16 +25,16 @@ $('document').ready(function () {
|
||||
let successCount = 0;
|
||||
const url = $('#installing').attr('data-url');
|
||||
const progressEl = $('#installing .progress-bar');
|
||||
const intervalId = setInterval(function () {
|
||||
setInterval(function () {
|
||||
let p = parseFloat(progressEl.attr('data-percent'), 10) || 0;
|
||||
p = Math.min(100, p + 1.5);
|
||||
p = Math.min(100, p + 0.5);
|
||||
progressEl.attr('data-percent', p);
|
||||
progressEl.css({ width: p + '%' });
|
||||
|
||||
}, 1000);
|
||||
setInterval(function () {
|
||||
$.get(url + '/admin').done(function () {
|
||||
if (successCount >= 5) {
|
||||
window.location = url + '/admin';
|
||||
clearInterval(intervalId);
|
||||
} else {
|
||||
successCount += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user