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