From 620c6c6aae6653cf0b5fc50dda834ae20b961441 Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 31 Aug 2021 18:58:29 +0200 Subject: [PATCH] update(front): links to loader code, add css --- static/tmp.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/static/tmp.html b/static/tmp.html index feb8832..35ae3f5 100644 --- a/static/tmp.html +++ b/static/tmp.html @@ -1,6 +1,7 @@ + @@ -10,8 +11,8 @@
-

La playlist est en cours de traitement [/]…

-

[Code Source du loader](https://codepen.io/brunjo/pen/bNEWjV) sous [licence MIT](https://blog.codepen.io/documentation/licensing/).

+

La playlist est en cours de traitement [0/0]…

+

Code Source du loader sous licence MIT.

@@ -22,11 +23,6 @@ async function test() { const data = await fetch('/refresh').then(response => response.json()); if (data != null) { - if (data.done === data.todo) { - document.getElementById("inf-loader").remove(); - clearInterval(refreshList); - } - if (data.url != null) { for (const elem of data.url) { let tmp = document.createTextNode(elem); @@ -38,6 +34,11 @@ document.getElementById("nb-fait").textContent = data.done; document.getElementById("nb-total").textContent = data.todo; + + if (data.done === data.todo) { + document.getElementById("inf-loader").remove(); + clearInterval(refreshList); + } } }