SHA256
CORE/CONTENT test5593 и адаптация UI
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
/* Общие состояния экрана (js/components/feedback.js): спиннер, загрузка с задержкой,
|
||||
* «пусто» и ошибка с «Повторить». */
|
||||
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
flex: 0 0 auto;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid color-mix(in srgb, var(--text-secondary) 26%, transparent);
|
||||
border-top-color: var(--accent);
|
||||
animation: spinner-spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.spinner--sm { width: 16px; height: 16px; }
|
||||
.spinner--lg { width: 28px; height: 28px; border-width: 2.5px; }
|
||||
|
||||
@keyframes spinner-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Появляется только если ждать дольше --loading-delay: быстрые загрузки не мелькают. */
|
||||
.loading-state {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-6) 0;
|
||||
opacity: 0;
|
||||
animation: loading-state-in 180ms ease forwards;
|
||||
animation-delay: var(--loading-delay, 350ms);
|
||||
}
|
||||
|
||||
@keyframes loading-state-in {
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.state-message {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: var(--space-2);
|
||||
max-width: 340px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-6) var(--space-4);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state-message__icon {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin-bottom: var(--space-1);
|
||||
border-radius: 50%;
|
||||
color: var(--text-secondary);
|
||||
background: var(--surface-raised);
|
||||
}
|
||||
|
||||
.state-message__icon svg {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.state-message--error .state-message__icon {
|
||||
color: var(--danger);
|
||||
background: color-mix(in srgb, var(--danger) 13%, transparent);
|
||||
}
|
||||
|
||||
.state-message__title {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
font-size: var(--text-md);
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
|
||||
.state-message__text {
|
||||
margin: 0;
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--text-sm);
|
||||
line-height: var(--leading-sm, 1.45);
|
||||
}
|
||||
|
||||
.state-message__action {
|
||||
margin-top: var(--space-2);
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
/* Короткие сообщения внизу (showToast в services/channels-ux.js): над нижним меню и полем
|
||||
* ввода (bottom задаёт JS), значок по смыслу, касание закрывает. */
|
||||
.toast-host {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(90px + env(safe-area-inset-bottom));
|
||||
z-index: 140;
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 var(--page-gutter);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.toast {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
max-width: min(100%, 440px);
|
||||
min-height: 44px;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 14px;
|
||||
background: var(--surface-raised);
|
||||
box-shadow: var(--shadow);
|
||||
color: var(--text-primary);
|
||||
font-size: var(--text-sm);
|
||||
line-height: 1.35;
|
||||
pointer-events: auto;
|
||||
cursor: default;
|
||||
opacity: 0;
|
||||
transform: translateY(8px) scale(0.98);
|
||||
transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
.toast.is-visible {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.toast.is-hiding {
|
||||
opacity: 0;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
.toast__icon {
|
||||
flex: 0 0 auto;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.toast__icon svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.toast--error .toast__icon { color: var(--danger); }
|
||||
.toast--info .toast__icon { color: var(--accent); }
|
||||
|
||||
.toast__text {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.toast__action {
|
||||
flex: 0 0 auto;
|
||||
margin: -6px -6px -6px 2px;
|
||||
padding: 8px 8px;
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
background: none;
|
||||
color: var(--accent);
|
||||
font: inherit;
|
||||
font-weight: var(--weight-bold);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toast__action:active {
|
||||
background: var(--surface-selected);
|
||||
}
|
||||
@media (hover: hover) {
|
||||
.toast__action:hover {
|
||||
background: var(--surface-selected);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.spinner { animation-duration: 1.6s; }
|
||||
.loading-state { animation: none; opacity: 1; }
|
||||
.toast { transition: none; transform: none; }
|
||||
}
|
||||
Reference in New Issue
Block a user