The disconnected pill now names the retry action statically (refresh icon + "连接异常,刷新重试") instead of swapping text on hover; connecting shows a spinner, holds visible for at least 800ms, and distinguishes manual retry (重新连接中) from automatic backoff (自动重连中); state changes fade over 150ms. Pill chrome tightened to 28px height with a 20%-alpha label border.
124 lines
2.2 KiB
CSS
124 lines
2.2 KiB
CSS
.indicator {
|
|
flex: none;
|
|
display: inline-grid;
|
|
grid-template-columns: 14px max-content;
|
|
align-items: center;
|
|
column-gap: 4px;
|
|
height: 28px;
|
|
padding: 0 8px;
|
|
box-sizing: border-box;
|
|
border: 1px solid transparent;
|
|
border-radius: 13px;
|
|
font-family: inherit;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
line-height: 18px;
|
|
white-space: nowrap;
|
|
transition:
|
|
background-color 160ms ease-out,
|
|
color 160ms ease-out,
|
|
border-color 160ms ease-out,
|
|
opacity 150ms ease-out;
|
|
animation: indicator-enter 150ms ease-out;
|
|
}
|
|
|
|
.leaving {
|
|
opacity: 0;
|
|
}
|
|
|
|
@keyframes indicator-enter {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.warning {
|
|
background: var(--dsw-alias-state-warn-tertiary);
|
|
color: var(--dsw-alias-state-warn-label);
|
|
border-color: color-mix(in srgb, var(--dsw-alias-state-warn-label) 20%, transparent);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.warning:hover {
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--dsw-alias-state-warn-tertiary),
|
|
var(--dsw-alias-state-warn-primary) 6%
|
|
);
|
|
}
|
|
|
|
.warning:active {
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--dsw-alias-state-warn-tertiary),
|
|
var(--dsw-alias-state-warn-primary) 10%
|
|
);
|
|
}
|
|
|
|
.warning:focus-visible {
|
|
outline: 2px solid var(--dsw-alias-state-warn-label);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.success {
|
|
background: var(--dsw-alias-state-success-tertiary);
|
|
color: var(--dsw-alias-state-success-primary);
|
|
border-color: color-mix(in srgb, var(--dsw-alias-state-success-primary) 20%, transparent);
|
|
}
|
|
|
|
.icon {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
.label {
|
|
text-align: left;
|
|
}
|
|
|
|
.spinner {
|
|
animation: spinner-rotate 0.9s linear infinite;
|
|
}
|
|
|
|
@keyframes spinner-rotate {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.dots {
|
|
display: inline-block;
|
|
width: 1em;
|
|
text-align: left;
|
|
}
|
|
|
|
.secondDot {
|
|
animation: reveal-second-dot 1.5s step-end infinite;
|
|
}
|
|
|
|
.thirdDot {
|
|
animation: reveal-third-dot 1.5s step-end infinite;
|
|
}
|
|
|
|
@keyframes reveal-second-dot {
|
|
0%, 33.32% { opacity: 0; }
|
|
33.33%, 100% { opacity: 1; }
|
|
}
|
|
|
|
@keyframes reveal-third-dot {
|
|
0%, 66.65% { opacity: 0; }
|
|
66.66%, 100% { opacity: 1; }
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.indicator,
|
|
.secondDot,
|
|
.thirdDot,
|
|
.spinner {
|
|
animation: none;
|
|
}
|
|
|
|
.indicator {
|
|
transition: none;
|
|
}
|
|
}
|