fix(feedback): ring around resident photo img

This commit is contained in:
dev
2026-11-01 22:16:25 +03:00
parent b2f070ee7b
commit 0830c99922
2 changed files with 6 additions and 6 deletions
+4 -2
View File
@@ -38,7 +38,8 @@
.fb-tpl-row button:disabled { opacity:.5; cursor:default; }
.fb-mark-wrap { position:relative; }
.fb-mark-stripe { position:absolute; left:2px; right:2px; bottom:-6px; height:3px; border-radius:999px; z-index:0; transition:background .25s ease, box-shadow .25s ease; }
#fbResidentPhoto .fb-mark-stripe { left:0; right:0; top:0; bottom:0; height:auto; border-radius:50%; pointer-events:none; z-index:3; transition:border-color .25s ease, box-shadow .25s ease; }
#fbResidentPhoto .fb-mark-stripe { left:0; right:0; top:0; bottom:0; height:auto; border-radius:50%; pointer-events:none; z-index:3; display:flex; align-items:center; justify-content:center; overflow:hidden; transition:border-color .25s ease, box-shadow .25s ease; }
#fbResidentPhoto .fb-mark-stripe img { width:100%; height:100%; object-fit:cover; display:block; border-radius:50%; }
.fb-mark-stripe[hidden] { display:none; }
.fb-card-resident { display:flex; align-items:center; gap:10px; min-width:0; }
.fb-card-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
@@ -59,6 +60,7 @@
#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; }
.fb-resident-photo img { width:100%; height:100%; object-fit:cover; display:block; }
#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; }
#fbQuickModal { z-index:105; }
@@ -162,7 +164,7 @@
<div class="fb-mark-wrap" style="flex:1;">
<input type="text" id="fbResident" class="settings-input" required maxlength="200" placeholder="Иванов Иван" list="fbResidentList" autocomplete="off">
</div>
<button type="button" id="fbResidentPhoto" class="fb-resident-photo" hidden title="Увеличить фото"><span class="fb-mark-stripe" id="fbMarkStripe" hidden></span><img src="" alt="" loading="lazy"></button>
<button type="button" id="fbResidentPhoto" class="fb-resident-photo" hidden title="Увеличить фото"><span class="fb-mark-stripe" id="fbMarkStripe"><img src="" alt="" loading="lazy"></span></button>
</div>
<datalist id="fbResidentList"></datalist>
</div>
+2 -4
View File
@@ -718,15 +718,13 @@
const m = k ? workMarks.get(k) : null;
const photo = document.getElementById('fbResidentPhoto');
if (!m) {
el.hidden = true;
el.style.border = '';
el.style.boxShadow = '';
el.style.border = '3px solid transparent';
el.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.hidden = false;
el.style.border = `3px solid hsl(${hue}, 72%, 45%)`;
el.style.boxShadow = `inset 0 0 10px hsla(${hue}, 72%, 45%, .4)`;
if (photo) photo.title = `Отметки работы: ${m.total > 0 ? '+' : ''}${m.total} (отметок: ${m.marks})`;