Skip to content

Node.js based forum software built for the modern web

feat: update progress bar more frequently

Barış Soner Uşaklı99aaa9f14179
diff --git a/public/src/installer/install.js b/public/src/installer/install.js
index 16a826710c..cb027f4ce6 100644
--- a/public/src/installer/install.js
+++ b/public/src/installer/install.js
@@ -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;
}