UI - ЛАУНЧЕР: LIVE PREVIEW АВАТАРА КЛИЕНТА
This commit is contained in:
parent
e8ae3b08f8
commit
a53f286860
|
|
@ -3057,6 +3057,7 @@ code {
|
|||
}
|
||||
|
||||
.client-avatar-preview {
|
||||
position: relative;
|
||||
display: grid;
|
||||
width: 3.1rem;
|
||||
min-width: 3.1rem;
|
||||
|
|
@ -3069,10 +3070,14 @@ code {
|
|||
background: rgba(255, 255, 255, 0.055);
|
||||
}
|
||||
|
||||
.client-avatar-preview img {
|
||||
.client-avatar-preview__image {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100% !important;
|
||||
max-width: none !important;
|
||||
height: 100% !important;
|
||||
max-height: none !important;
|
||||
border-radius: inherit;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1783,7 +1783,6 @@ function ClientEditorModal({
|
|||
try {
|
||||
const storedFile = await uploadStorageFile(file);
|
||||
update("avatarUrl", storedFile.url);
|
||||
setAvatarPreviewUrl(storedFile.url);
|
||||
} catch (error) {
|
||||
setStorageError(error instanceof Error ? error.message : "Не удалось сохранить аватар компании");
|
||||
setAvatarPreviewUrl(draft.avatarUrl ?? null);
|
||||
|
|
@ -1843,7 +1842,7 @@ function ClientEditorModal({
|
|||
<span>Аватар компании</span>
|
||||
<div className="client-avatar-control">
|
||||
<div className="client-avatar-preview" aria-hidden="true">
|
||||
{avatarPreviewUrl ? <img src={avatarPreviewUrl} alt="" /> : null}
|
||||
{avatarPreviewUrl ? <img className="client-avatar-preview__image" src={avatarPreviewUrl} alt="" /> : null}
|
||||
</div>
|
||||
<div className="client-avatar-control__copy">
|
||||
<strong>{avatarPreviewUrl ? "Аватар подключён" : "Аватар не задан"}</strong>
|
||||
|
|
|
|||
Loading…
Reference in New Issue