613 lines
9.5 KiB
CSS
613 lines
9.5 KiB
CSS
/* 管理端:左侧导航 + 内容区(M3 风格:选中项是胶囊,内容区是圆角卡片) */
|
|
.shell {
|
|
display: grid;
|
|
grid-template-columns: 248px minmax(0, 1fr);
|
|
min-height: 100%;
|
|
}
|
|
|
|
.side {
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 16px 12px;
|
|
background: var(--app-card-inset);
|
|
overflow: auto;
|
|
}
|
|
|
|
.runtime-logs {
|
|
display: grid;
|
|
gap: 1px;
|
|
max-height: 520px;
|
|
overflow: auto;
|
|
border-radius: var(--r-card);
|
|
background: var(--app-outline-soft);
|
|
}
|
|
|
|
.runtime-log {
|
|
display: grid;
|
|
grid-template-columns: 150px auto minmax(0, 1fr);
|
|
align-items: start;
|
|
gap: 10px;
|
|
padding: 9px 10px;
|
|
background: var(--app-card);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.runtime-log-message {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.runtime-log-fields {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px 10px;
|
|
margin-top: 4px;
|
|
color: var(--app-ink-muted);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.runtime-log-fields b {
|
|
color: var(--app-ink-faint);
|
|
font-weight: 500;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.runtime-log {
|
|
grid-template-columns: 1fr auto;
|
|
}
|
|
|
|
.runtime-log-message {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
|
|
.side .brand {
|
|
padding: 8px 14px 16px;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--app-ink);
|
|
display: block;
|
|
}
|
|
|
|
.side .brand:hover {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.side .section {
|
|
padding: 16px 14px 4px;
|
|
font-size: 12px;
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.side a.nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
height: 44px;
|
|
padding: 0 14px;
|
|
border-radius: var(--r-pill);
|
|
color: var(--app-ink);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.side a.nav:hover {
|
|
text-decoration: none;
|
|
background: color-mix(in srgb, var(--app-ink), transparent calc((1 - var(--state-hover)) * 100%));
|
|
}
|
|
|
|
.side a.nav.active {
|
|
background: var(--app-accent-container);
|
|
color: var(--app-on-accent-container);
|
|
}
|
|
|
|
.side .spacer {
|
|
flex: 1;
|
|
}
|
|
|
|
.me {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 12px;
|
|
border-radius: var(--r-card);
|
|
background: var(--app-card);
|
|
}
|
|
|
|
/* 用户名太长时省略,不要和右边的按钮叠在一起 */
|
|
.me {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.me .grow {
|
|
flex: 1 1 100px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.me .grow > div {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.me .btn,
|
|
.me .avatar {
|
|
flex: none;
|
|
}
|
|
|
|
.avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
background: var(--app-accent);
|
|
color: var(--app-card);
|
|
display: grid;
|
|
place-items: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.main {
|
|
padding: 24px 32px 64px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.main > header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.main > header h1 {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.login {
|
|
min-height: 100%;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 24px;
|
|
}
|
|
|
|
.login .card {
|
|
width: min(400px, 100%);
|
|
padding: 32px;
|
|
}
|
|
|
|
.login h1 {
|
|
font-size: 28px;
|
|
font-weight: 800;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.kv {
|
|
display: grid;
|
|
grid-template-columns: 140px minmax(0, 1fr);
|
|
gap: 8px 16px;
|
|
}
|
|
|
|
.kv dt {
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.kv dd {
|
|
margin: 0;
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.form-grid {
|
|
display: grid;
|
|
gap: 16px;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.form-grid .wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.switch {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.switch input {
|
|
accent-color: var(--app-accent);
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.test-status {
|
|
text-transform: none;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.shell {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.side {
|
|
position: static;
|
|
height: auto;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.side .section,
|
|
.side .spacer,
|
|
.me .grow {
|
|
display: none;
|
|
}
|
|
|
|
.main {
|
|
padding: 16px;
|
|
}
|
|
|
|
.form-grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
/* 登录页:左边选后端,右边输入凭据 */
|
|
.login .card.login-split {
|
|
width: min(760px, 100%);
|
|
padding: 0;
|
|
display: grid;
|
|
grid-template-columns: 260px minmax(0, 1fr);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.login-side {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
padding: 32px 24px;
|
|
background: var(--app-card-inset);
|
|
}
|
|
|
|
.login-main {
|
|
padding: 32px;
|
|
align-content: start;
|
|
}
|
|
|
|
.login-main h2 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
word-break: break-all;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.login .card.login-split {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.login-side {
|
|
padding: 24px;
|
|
}
|
|
|
|
.login-main {
|
|
padding: 24px;
|
|
}
|
|
}
|
|
|
|
.link-board-header {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.link-board-header .switch {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 线路管理:左边 Agent 列表(健康摘要,有问题的在前),右边是选中 Agent 的全部线路 */
|
|
.link-dot {
|
|
display: inline-block;
|
|
flex: none;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--app-ink-faint);
|
|
}
|
|
|
|
.link-dot.good {
|
|
background: var(--app-ok);
|
|
}
|
|
|
|
.link-dot.fair {
|
|
background: var(--app-warn);
|
|
}
|
|
|
|
.link-dot.poor {
|
|
background: var(--app-bad);
|
|
}
|
|
|
|
.link-explorer {
|
|
display: grid;
|
|
grid-template-columns: 260px minmax(0, 1fr);
|
|
gap: 16px;
|
|
align-items: start;
|
|
}
|
|
|
|
.link-explorer-list {
|
|
display: grid;
|
|
gap: 8px;
|
|
padding: 10px;
|
|
border-radius: var(--r-control);
|
|
background: var(--app-card);
|
|
}
|
|
|
|
.link-explorer-filter {
|
|
display: grid;
|
|
gap: 8px;
|
|
}
|
|
|
|
.link-explorer-list ul {
|
|
display: grid;
|
|
max-height: 560px;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-y: auto;
|
|
list-style: none;
|
|
}
|
|
|
|
.link-explorer-agent {
|
|
display: flex;
|
|
width: 100%;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 7px 8px;
|
|
border: 0;
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: var(--app-ink);
|
|
cursor: pointer;
|
|
font: inherit;
|
|
font-size: 13px;
|
|
text-align: left;
|
|
}
|
|
|
|
.link-explorer-agent:hover {
|
|
background: var(--app-card-inset);
|
|
}
|
|
|
|
.link-explorer-agent.selected {
|
|
background: var(--app-accent-container);
|
|
color: var(--app-accent);
|
|
}
|
|
|
|
.link-explorer-agent.offline .name {
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.link-explorer-agent .name {
|
|
min-width: 0;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
font-weight: 600;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.link-explorer-agent small {
|
|
color: var(--app-ink-faint);
|
|
font-size: 10px;
|
|
}
|
|
|
|
.link-explorer-agent .count {
|
|
color: var(--app-ink-faint);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.link-explorer-agent .badge {
|
|
min-width: 18px;
|
|
padding: 1px 6px;
|
|
border-radius: var(--r-pill);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
text-align: center;
|
|
}
|
|
|
|
.link-explorer-agent .badge.poor {
|
|
background: color-mix(in srgb, var(--app-bad) 30%, transparent);
|
|
color: var(--app-bad);
|
|
}
|
|
|
|
.link-explorer-agent .badge.fair {
|
|
background: color-mix(in srgb, var(--app-warn) 26%, transparent);
|
|
color: var(--app-warn);
|
|
}
|
|
|
|
.link-explorer-list .empty {
|
|
padding: 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.link-explorer-hint {
|
|
margin-left: 6px;
|
|
color: var(--app-ink-faint);
|
|
cursor: help;
|
|
}
|
|
|
|
.link-explorer-detail {
|
|
min-width: 0;
|
|
}
|
|
|
|
.link-explorer-head {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.link-explorer-head .input {
|
|
width: auto;
|
|
margin-left: 6px;
|
|
}
|
|
|
|
.link-explorer-peer {
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: var(--app-ink);
|
|
cursor: pointer;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.link-explorer-peer:hover {
|
|
color: var(--app-accent);
|
|
}
|
|
|
|
.link-explorer-lines td {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.link-explorer-lines tr.poor {
|
|
background: color-mix(in srgb, var(--app-bad) 8%, transparent);
|
|
}
|
|
|
|
.link-explorer-lines tr.fair,
|
|
.link-explorer-lines tr.pending {
|
|
background: color-mix(in srgb, var(--app-warn) 7%, transparent);
|
|
}
|
|
|
|
.link-explorer-lines tr.disabled {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.warn-text {
|
|
color: var(--app-warn);
|
|
font-weight: 600;
|
|
}
|
|
|
|
@media (width <= 900px) {
|
|
.link-explorer {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Agent 详情:顶部概览条、线路表、折叠的 IPv6 诊断 */
|
|
.agent-summary {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
border-radius: var(--r-control);
|
|
background: var(--app-card);
|
|
}
|
|
|
|
.agent-summary > div {
|
|
display: grid;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.agent-summary span {
|
|
color: var(--app-ink-faint);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.agent-summary b {
|
|
overflow: hidden;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.agent-lines td {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.agent-ipv6 {
|
|
margin-top: 12px;
|
|
padding-top: 10px;
|
|
border-top: 1px solid var(--app-outline-soft);
|
|
}
|
|
|
|
.agent-ipv6 > summary {
|
|
color: var(--app-ink-muted);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.agent-ipv6 > .kv {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.task-kind {
|
|
display: grid;
|
|
gap: 2px;
|
|
}
|
|
|
|
.task-params {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px 8px;
|
|
max-width: 360px;
|
|
font-size: 12px;
|
|
color: var(--app-ink-muted);
|
|
}
|
|
|
|
.task-params b {
|
|
color: var(--app-ink);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.param-more {
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.param-more > summary {
|
|
cursor: pointer;
|
|
margin-bottom: 8px;
|
|
color: var(--app-ink-muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.task-agents {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
gap: 8px 12px;
|
|
max-height: 160px;
|
|
overflow: auto;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--app-outline-soft);
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.task-kind-id {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.task-child td {
|
|
padding-top: 6px;
|
|
padding-bottom: 6px;
|
|
}
|
|
|
|
.task-child .task-branch {
|
|
display: inline-block;
|
|
padding-left: 14px;
|
|
color: var(--app-ink-faint);
|
|
}
|
|
|
|
.task-run {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|