🐛 fix(sidebar): 恢复连接加载中的转圈状态

- 扩展连接状态为 loading/success/error

- 在连接根节点加载开始时显示 pending,成功后才置绿

- 同步 V2 active host 与 legacy Badge 状态显示并补测试
This commit is contained in:
Syngnat
2026-06-24 22:31:13 +08:00
parent 322d0a7cb8
commit 672d05d124
8 changed files with 63 additions and 13 deletions

View File

@@ -2098,6 +2098,15 @@ body[data-ui-version="v2"] .gn-v2-live-dot.is-live {
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
body[data-ui-version="v2"] .gn-v2-live-dot.is-loading {
width: 10px;
height: 10px;
border: 2px solid rgba(37, 99, 235, 0.24);
border-top-color: #2563eb;
background: transparent;
animation: gn-v2-tree-status-spin 0.8s linear infinite;
}
body[data-ui-version="v2"] .gn-v2-live-dot.is-error {
background: var(--gn-danger);
}
@@ -2760,11 +2769,26 @@ body[data-ui-version="v2"] .gn-v2-tree-status.is-success::before {
box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
body[data-ui-version="v2"] .gn-v2-tree-status.is-loading::before {
width: 10px;
height: 10px;
flex: 0 0 10px;
border: 2px solid rgba(37, 99, 235, 0.24);
border-top-color: #2563eb;
background: transparent;
box-shadow: none;
animation: gn-v2-tree-status-spin 0.8s linear infinite;
}
body[data-ui-version="v2"] .gn-v2-tree-status.is-error::before {
background: var(--gn-danger);
box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}
@keyframes gn-v2-tree-status-spin {
to { transform: rotate(360deg); }
}
body[data-ui-version="v2"] .gn-v2-tree-label {
min-width: 0;
flex: 1 1 auto;