File tree Expand file tree Collapse file tree
apps/webapp/app/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,12 +158,11 @@ const script = `(function () {
158158 });
159159 return;
160160 }
161- var text = final
162- ? "This page failed to load properly. Please reload."
163- : "An update is being deployed. This page will reload automatically.";
161+ var text = final ? "This page failed to load properly. Please reload." : "Loading…";
164162 var existing = document.getElementById("stale-asset-overlay-text");
165163 if (existing) {
166164 existing.textContent = text;
165+ if (final) document.getElementById("stale-asset-overlay-button").style.display = "";
167166 return;
168167 }
169168 var overlay = document.createElement("div");
@@ -174,9 +173,11 @@ const script = `(function () {
174173 message.id = "stale-asset-overlay-text";
175174 message.textContent = text;
176175 var button = document.createElement("button");
176+ button.id = "stale-asset-overlay-button";
177177 button.textContent = "Reload";
178178 button.style.cssText =
179- "border:0;border-radius:4px;padding:7px 18px;background:#6366f1;color:#fff;font:inherit;cursor:pointer";
179+ "border:0;border-radius:4px;padding:7px 18px;background:#6366f1;color:#fff;font:inherit;cursor:pointer" +
180+ (final ? "" : ";display:none");
180181 button.onclick = doReload;
181182 overlay.appendChild(message);
182183 overlay.appendChild(button);
You can’t perform that action at this time.
0 commit comments