fix(feedback): ring around resident photo img
This commit is contained in:
@@ -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})`;
|
||||
|
||||
Reference in New Issue
Block a user