feat(status-bar): add gradient colors and tooltip with mobile support

This commit is contained in:
Supra4E8C
2026-02-14 13:24:53 +08:00
parent faadc3ea3e
commit 1f8c4331c7
8 changed files with 426 additions and 96 deletions

View File

@@ -402,37 +402,123 @@
gap: 2px;
flex: 1;
min-width: 180px;
position: relative;
}
.statusBlockWrapper {
flex: 1;
min-width: 6px;
position: relative;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.statusBlock {
flex: 1;
width: 100%;
height: 8px;
border-radius: 2px;
min-width: 6px;
transition: transform 0.15s ease, opacity 0.15s ease;
&:hover {
transform: scaleY(1.5);
opacity: 0.85;
.statusBlockWrapper:hover &,
.statusBlockWrapper.statusBlockActive & {
transform: scaleY(1.8);
opacity: 0.9;
}
}
.statusBlockSuccess {
background-color: var(--success-color, #22c55e);
}
.statusBlockFailure {
background-color: var(--danger-color);
}
.statusBlockMixed {
background-color: var(--warning-color);
}
.statusBlockIdle {
background-color: var(--border-secondary, #e5e7eb);
}
.statusTooltip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
background: var(--bg-primary, #fff);
border: 1px solid var(--border-secondary, #e5e7eb);
border-radius: 6px;
padding: 6px 10px;
font-size: 11px;
line-height: 1.5;
white-space: nowrap;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
z-index: $z-dropdown;
pointer-events: none;
color: var(--text-primary);
// 小箭头
&::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: var(--bg-primary, #fff);
}
&::before {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: var(--border-secondary, #e5e7eb);
}
}
// 防止左右溢出
.statusTooltipLeft {
left: 0;
transform: translateX(0);
&::after,
&::before {
left: 8px;
transform: none;
}
}
.statusTooltipRight {
left: auto;
right: 0;
transform: translateX(0);
&::after,
&::before {
left: auto;
right: 8px;
transform: none;
}
}
.tooltipTime {
color: var(--text-secondary);
display: block;
margin-bottom: 2px;
}
.tooltipStats {
display: flex;
align-items: center;
gap: 8px;
}
.tooltipSuccess {
color: var(--success-color, #22c55e);
}
.tooltipFailure {
color: var(--danger-color, #ef4444);
}
.tooltipRate {
color: var(--text-secondary);
margin-left: 2px;
}
.statusRate {
display: flex;
align-items: center;
@@ -460,6 +546,17 @@
background: var(--failure-badge-bg);
}
@include mobile {
.statusTooltip {
font-size: 12px;
padding: 8px 12px;
}
.statusBlocks {
min-width: 140px;
}
}
// ============================================
// Model Config Section - Unified Layout
// ============================================
@@ -816,6 +913,20 @@
background-color: var(--border-primary, #374151);
}
.statusTooltip {
background: var(--bg-secondary, #1f2937);
border-color: var(--border-primary, #374151);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
&::after {
border-top-color: var(--bg-secondary, #1f2937);
}
&::before {
border-top-color: var(--border-primary, #374151);
}
}
.statusRateHigh {
background: rgba(34, 197, 94, 0.2);
color: #86efac;

View File

@@ -605,39 +605,121 @@
gap: 2px;
flex: 1;
min-width: 180px;
position: relative;
}
.statusBlockWrapper {
flex: 1;
min-width: 6px;
position: relative;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.statusBlock {
flex: 1;
width: 100%;
height: 8px;
border-radius: 2px;
min-width: 6px;
transition:
transform 0.15s ease,
opacity 0.15s ease;
transition: transform 0.15s ease, opacity 0.15s ease;
&:hover {
transform: scaleY(1.5);
opacity: 0.85;
.statusBlockWrapper:hover &,
.statusBlockWrapper.statusBlockActive & {
transform: scaleY(1.8);
opacity: 0.9;
}
}
.statusBlockSuccess {
background-color: var(--success-color, #22c55e);
}
.statusBlockFailure {
background-color: var(--danger-color);
}
.statusBlockMixed {
background-color: var(--warning-color);
}
.statusBlockIdle {
background-color: var(--border-secondary, #e5e7eb);
}
.statusTooltip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
background: var(--bg-primary, #fff);
border: 1px solid var(--border-secondary, #e5e7eb);
border-radius: 6px;
padding: 6px 10px;
font-size: 11px;
line-height: 1.5;
white-space: nowrap;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
z-index: $z-dropdown;
pointer-events: none;
color: var(--text-primary);
&::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: var(--bg-primary, #fff);
}
&::before {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: var(--border-secondary, #e5e7eb);
}
}
.statusTooltipLeft {
left: 0;
transform: translateX(0);
&::after,
&::before {
left: 8px;
transform: none;
}
}
.statusTooltipRight {
left: auto;
right: 0;
transform: translateX(0);
&::after,
&::before {
left: auto;
right: 8px;
transform: none;
}
}
.tooltipTime {
color: var(--text-secondary);
display: block;
margin-bottom: 2px;
}
.tooltipStats {
display: flex;
align-items: center;
gap: 8px;
}
.tooltipSuccess {
color: var(--success-color, #22c55e);
}
.tooltipFailure {
color: var(--danger-color, #ef4444);
}
.tooltipRate {
color: var(--text-secondary);
margin-left: 2px;
}
.statusRate {
display: flex;
align-items: center;
@@ -665,6 +747,17 @@
background: var(--failure-badge-bg);
}
@include mobile {
.statusTooltip {
font-size: 12px;
padding: 8px 12px;
}
.statusBlocks {
min-width: 140px;
}
}
.prefixProxyEditor {
display: flex;
flex-direction: column;