Desktop: drag and drop profile photo; share drop-zone hook with post form

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SlimusMinus
2026-10-26 23:27:40 +03:00
parent abd6f83535
commit 16b886081b
9 changed files with 209 additions and 45 deletions

View File

@@ -125,6 +125,18 @@ select.f-m-field::selection { background: transparent; }
box-shadow: 0 0 0 4px rgba(var(--teal-rgb), .15);
}
.f-img-drop-zone.is-dragover .f-img-grid { opacity: .55; transition: opacity .2s; }
/* Аватар уже есть: поверх превью — затемнение с подсказкой «заменить» */
.f-img-drop-zone.is-dragover .f-img-preview-wrap {
box-shadow: 0 0 0 3px var(--teal), 0 0 0 7px rgba(var(--teal-rgb), .18);
}
.f-img-drop-overlay {
position: absolute; inset: 0; z-index: 1;
display: flex; align-items: center; justify-content: center;
padding: 8px; text-align: center;
background: rgba(0, 0, 0, .55);
color: #fff; font-size: .75rem; font-weight: 600; line-height: 1.3;
pointer-events: none;
}
/* Profile Photo Preview */
.f-img-preview-wrap {