From 63e96bc7b604327b27f6f7bf9a3740de3bb3b3a0 Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 1 Nov 2026 22:28:58 +0300 Subject: [PATCH] fix(feedback): ring directly on photo img --- public/feedback.html | 2 +- public/js/feedback.js | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/public/feedback.html b/public/feedback.html index b1e7990..981d976 100644 --- a/public/feedback.html +++ b/public/feedback.html @@ -59,7 +59,7 @@ .fb-top-row .fb-mark-wrap { width:100%; } #fbResidentPhoto[hidden] { display:none; } .fb-resident-photo { width:34px; height:34px; flex:none; border-radius:50%; overflow:hidden; border:1px solid var(--border); background:var(--bg); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; position:relative; } - .fb-resident-photo img { width:100%; height:100%; object-fit:cover; display:block; } + .fb-resident-photo img { width:100%; height:100%; object-fit:cover; display:block; border-radius:50%; box-sizing:border-box; } #fbResidentPhoto .fb-mark-stripe img { width:100%; height:100%; object-fit:cover; display:block; border-radius:50%; } #fbPromptModal { overflow:auto; align-items:flex-start; padding:4vh 16px; } #fbPromptModal > .edit-modal { margin:auto; } diff --git a/public/js/feedback.js b/public/js/feedback.js index ccf0e73..11e676e 100644 --- a/public/js/feedback.js +++ b/public/js/feedback.js @@ -713,20 +713,21 @@ function applyMarkStripe() { const el = document.getElementById('fbMarkStripe'); - if (!el) return; + const photo = document.getElementById('fbResidentPhoto'); + const img = photo ? photo.querySelector('img') : null; + if (!el || !img) return; const k = normName(document.getElementById('fbResident').value); const m = k ? workMarks.get(k) : null; - const photo = document.getElementById('fbResidentPhoto'); if (!m) { - el.style.border = '3px solid transparent'; - el.style.boxShadow = 'none'; + img.style.border = '3px solid transparent'; + img.style.boxShadow = 'none'; if (photo) photo.title = 'Увеличить фото'; return; } const t = Math.max(-4, Math.min(4, m.total)); const hue = Math.round(120 * (t + 4) / 8); - el.style.border = `3px solid hsl(${hue}, 72%, 45%)`; - el.style.boxShadow = `inset 0 0 10px hsla(${hue}, 72%, 45%, .4)`; + img.style.border = `3px solid hsl(${hue}, 72%, 45%)`; + img.style.boxShadow = `inset 0 0 10px hsla(${hue}, 72%, 45%, .4)`; if (photo) photo.title = `Отметки работы: ${m.total > 0 ? '+' : ''}${m.total} (отметок: ${m.marks})`; }