feat(web): let users set their own photo on the account page
Pick a PNG/JPEG/WebP file, crop it to a square on a canvas (drag, wheel, slider or keyboard), export a 256x256 PNG and send it to Hub. Adds remove photo, error states, RU/EN copy and privacy policy text about the stored photo and 30-day backups.
This commit is contained in:
parent
a4cae66336
commit
4c06a17d7e
10 changed files with 739 additions and 14 deletions
|
|
@ -2169,3 +2169,73 @@ p {
|
|||
.privacy-block p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Avatar editor */
|
||||
.avatar-block {
|
||||
margin: 0 0 25px;
|
||||
padding-top: 22px;
|
||||
border-top: 1px solid #ffffff0c;
|
||||
}
|
||||
.avatar-block h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.avatar-block .small {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.avatar-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.avatar-actions .button {
|
||||
padding: 11px 13px;
|
||||
min-height: 43px;
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
.avatar-block .form-message {
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
.avatar-editor {
|
||||
margin-top: 16px;
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
justify-items: start;
|
||||
}
|
||||
.avatar-editor h4 {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.avatar-canvas {
|
||||
width: 280px;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 50%;
|
||||
background: #1a1a1b;
|
||||
border: 1px solid #44413c;
|
||||
cursor: grab;
|
||||
touch-action: none;
|
||||
}
|
||||
.avatar-canvas.dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
.avatar-canvas.disabled {
|
||||
opacity: 0.6;
|
||||
cursor: default;
|
||||
}
|
||||
.avatar-canvas:focus-visible,
|
||||
.avatar-zoom input:focus-visible {
|
||||
outline: 2px solid var(--sand);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
.avatar-zoom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-size: 0.78rem;
|
||||
max-width: 100%;
|
||||
}
|
||||
.avatar-zoom input {
|
||||
width: 180px;
|
||||
max-width: 55vw;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue