diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 8f2df2840..dc5b696fe 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -34,10 +34,10 @@ jobs: c = c.split('__SUPABASE_URL__').join(process.env.SUPABASE_URL); c = c.split('__SUPABASE_KEY__').join(process.env.SUPABASE_KEY); fs.writeFileSync(f, c); - console.log('✅ Supabase credentials injected'); + console.log('Supabase credentials injected'); " else - echo "⚠️ Secrets not found — placeholders remain (OK for forks)" + echo "Secrets not found — placeholders remain (OK for forks)" fi - name: Setup Pages diff --git a/js/features/points.js b/js/features/points.js index 638dfcdea..467072a78 100644 --- a/js/features/points.js +++ b/js/features/points.js @@ -26,7 +26,8 @@ window.AppPoints = (function (utils) { pointB = b; } function readPoint(ix, iy) { - const gx = parseFloat(ix.value), gy = parseFloat(iy.value); + const gx = parseFloat(String(ix.value).replace(',', '.')); + const gy = parseFloat(String(iy.value).replace(',', '.')); if (isNaN(gx) || isNaN(gy)) return null; const maxGame = mapSize / 100; return { diff --git a/js/features/share.js b/js/features/share.js index f5587958c..b31f69c05 100644 --- a/js/features/share.js +++ b/js/features/share.js @@ -1,6 +1,6 @@ // js/features/share.js — Шаринг ссылок и toast-уведомления -window.AppShare = (function(utils) { +window.AppShare = (function (utils) { let toastTimer = null; function generateUrl(pointA, pointB, currentWeapon, mapSize) { const params = new URLSearchParams(); @@ -37,7 +37,8 @@ window.AppShare = (function(utils) { toast = document.createElement('div'); toast.id = 'toast'; toast.className = 'toast'; - document.querySelector('.map-wrap').appendChild(toast); + const wrap = document.querySelector('.map-wrap') || document.body; + wrap.appendChild(toast); } toast.textContent = message; toast.className = 'toast ' + type; diff --git a/js/map/interactions.js b/js/map/interactions.js index d190260a2..9dcee8dae 100644 --- a/js/map/interactions.js +++ b/js/map/interactions.js @@ -112,7 +112,13 @@ window.MapInteractions = (function () { const cursorCoords = document.getElementById('cursorCoords'); if (cursorCoords) { const wpt = utils.screenToWorld(p.x, p.y, view); - cursorCoords.innerHTML = `x${utils.gameCoord(wpt.x)}y${utils.gameCoord(wpt.y)}`; + cursorCoords.textContent = ''; + const xSpan = document.createElement('span'); + xSpan.textContent = `x${utils.gameCoord(wpt.x)}`; + const ySpan = document.createElement('span'); + ySpan.textContent = `y${utils.gameCoord(wpt.y)}`; + cursorCoords.appendChild(xSpan); + cursorCoords.appendChild(ySpan); const wrap = canvas.parentElement.getBoundingClientRect(); let lx = p.x + 14; let ly = p.y + 18;