Fix catalog-price-check.js served from wrong wwwroot
File was written to repo-root wwwroot/ instead of src/PowderCoating.Web/wwwroot/ — causing a 404 and MIME type refusal. Moved to the correct location. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -53,7 +53,7 @@
|
|||||||
// Animate progress: fast to ~85%, then slow crawl toward 99%.
|
// Animate progress: fast to ~85%, then slow crawl toward 99%.
|
||||||
// Uses two easing phases so it never "finishes" before the server responds.
|
// Uses two easing phases so it never "finishes" before the server responds.
|
||||||
var start = Date.now();
|
var start = Date.now();
|
||||||
var phase1End = totalSecs * 0.80 * 1000; // 80% of time → 85% progress
|
var phase1End = totalSecs * 0.80 * 1000; // 80% of time -> 85% progress
|
||||||
var raf;
|
var raf;
|
||||||
|
|
||||||
function tick() {
|
function tick() {
|
||||||
@@ -61,11 +61,11 @@
|
|||||||
var pct;
|
var pct;
|
||||||
|
|
||||||
if (elapsed < phase1End) {
|
if (elapsed < phase1End) {
|
||||||
// Phase 1: ease-out from 0 → 85
|
// Phase 1: ease-out from 0 -> 85
|
||||||
var t = elapsed / phase1End;
|
var t = elapsed / phase1End;
|
||||||
pct = 85 * (1 - Math.pow(1 - t, 2));
|
pct = 85 * (1 - Math.pow(1 - t, 2));
|
||||||
} else {
|
} else {
|
||||||
// Phase 2: slow crawl 85 → 99 (never quite reaches 99)
|
// Phase 2: slow crawl 85 -> 99 (never quite reaches 99)
|
||||||
var t2 = (elapsed - phase1End) / (totalSecs * 1000);
|
var t2 = (elapsed - phase1End) / (totalSecs * 1000);
|
||||||
pct = 85 + 14 * (1 - Math.exp(-t2 * 1.5));
|
pct = 85 + 14 * (1 - Math.exp(-t2 * 1.5));
|
||||||
}
|
}
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
|
|
||||||
raf = requestAnimationFrame(tick);
|
raf = requestAnimationFrame(tick);
|
||||||
|
|
||||||
// Safety: if the server takes much longer than estimated, keep the overlay up.
|
// The page navigation itself tears down the overlay; cancel the RAF to avoid
|
||||||
// The page navigation itself will tear it down.
|
// running after the page is gone.
|
||||||
window.addEventListener('pagehide', function () {
|
window.addEventListener('pagehide', function () {
|
||||||
cancelAnimationFrame(raf);
|
cancelAnimationFrame(raf);
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user