MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / showUpgradeProgress

Function showUpgradeProgress

apps/OpenSign/src/utils/upgradeProgress.js:3–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1let intervalId;
2
3export function showUpgradeProgress() {
4 if (document.getElementById("upgrade-progress")) return;
5
6 const overlay = document.createElement("div");
7 overlay.id = "upgrade-progress";
8 Object.assign(overlay.style, {
9 position: "fixed",
10 top: 0,
11 left: 0,
12 width: "100%",
13 height: "100%",
14 background: "rgba(255,255,255,0.9)",
15 display: "flex",
16 flexDirection: "column",
17 justifyContent: "center",
18 alignItems: "center",
19 zIndex: 9999
20 });
21
22 const text = document.createElement("div");
23 text.textContent = "Applying update...";
24 text.style.marginBottom = "0.5rem";
25
26 const progress = document.createElement("progress");
27 progress.max = 100;
28 progress.value = 0;
29 progress.style.width = "60%";
30
31 overlay.appendChild(text);
32 overlay.appendChild(progress);
33 document.body.appendChild(overlay);
34
35 intervalId = setInterval(() => {
36 progress.value = (progress.value + 5) % 100;
37 }, 100);
38}
39
40export function hideUpgradeProgress() {
41 if (intervalId) {

Callers 2

index.jsxFile · 0.90
lazyWithRetryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected