feat(web): add runnable fleet console foundation

This commit is contained in:
chick
2026-07-17 16:02:15 +08:00
parent b4ae28c8f0
commit 4093634e13
16 changed files with 2730 additions and 7 deletions
+263
View File
@@ -0,0 +1,263 @@
:root {
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
color: #e8edf5;
background: #0b1018;
--surface: #121a26;
--surface-raised: #192434;
--border: #2b394d;
--muted: #a9b6c8;
--accent: #75a7ff;
--danger: #ff8b91;
--radius: 0.5rem;
--space: clamp(0.75rem, 2vw, 1.5rem);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-width: 20rem;
background: #0b1018;
}
a {
color: var(--accent);
}
button,
input,
select {
font: inherit;
}
button,
input,
select {
color: inherit;
background: var(--surface-raised);
border: 1px solid var(--border);
border-radius: 0.35rem;
padding: 0.5rem 0.65rem;
}
button,
input,
select,
a {
outline-offset: 3px;
}
.skip-link {
position: fixed;
top: -5rem;
left: 1rem;
z-index: 10;
background: white;
color: black;
padding: 0.75rem;
}
.skip-link:focus {
top: 1rem;
}
.app-topbar {
min-height: 3.5rem;
padding: 0 var(--space);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 1rem;
}
.product-name {
margin-right: auto;
font-weight: 750;
color: inherit;
text-decoration: none;
}
.connection-status {
color: var(--muted);
}
.app-layout {
display: grid;
grid-template-columns: 11rem minmax(0, 1fr);
min-height: calc(100vh - 3.5rem);
}
.global-navigation,
.instance-context {
padding: var(--space);
border-right: 1px solid var(--border);
}
.global-navigation ul,
.instance-context ul {
list-style: none;
padding: 0;
margin: 0;
display: grid;
gap: 0.35rem;
}
.global-navigation a,
.instance-context nav a {
display: block;
padding: 0.55rem;
border-radius: 0.35rem;
text-decoration: none;
}
a[aria-current='page'] {
background: var(--surface-raised);
color: white;
}
.instance-context {
grid-column: 2;
grid-row: 1;
border-bottom: 1px solid var(--border);
}
.instance-context + main {
grid-column: 2;
grid-row: 2;
}
.instance-context code {
display: block;
color: var(--muted);
}
.instance-context dl div {
display: flex;
justify-content: space-between;
gap: 1rem;
}
main {
min-width: 0;
padding: var(--space);
}
.fleet-heading,
.fleet-toolbar {
display: flex;
align-items: end;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}
.fleet-toolbar {
justify-content: flex-start;
padding: 1rem 0;
}
.fleet-toolbar label {
display: grid;
gap: 0.3rem;
min-width: min(100%, 14rem);
}
.fleet-toolbar label:first-child {
flex: 1;
}
.selection-summary,
small {
color: var(--muted);
}
.table-scroll {
overflow-x: auto;
border: 1px solid var(--border);
border-radius: var(--radius);
}
table {
width: 100%;
border-collapse: collapse;
white-space: nowrap;
}
caption {
text-align: left;
padding: 0.75rem;
font-weight: 700;
}
th,
td {
padding: 0.6rem 0.75rem;
border-top: 1px solid var(--border);
text-align: left;
}
tbody tr:hover,
tr[aria-selected='true'] {
background: var(--surface);
}
tbody th small {
display: block;
font-weight: normal;
}
.select-column {
width: 3rem;
}
.status {
display: inline-block;
padding: 0.2rem 0.45rem;
border-radius: 999px;
background: var(--surface-raised);
}
.status-online {
color: #75e6a3;
}
.status-offline,
.status-auth {
color: #ffbd76;
}
.state-panel {
padding: 1rem;
border: 1px dashed var(--border);
border-radius: var(--radius);
}
.state-error {
color: var(--danger);
border-color: currentColor;
}
@media (max-width: 48rem) {
.app-topbar {
flex-wrap: wrap;
padding-block: 0.6rem;
}
.app-layout {
display: block;
}
.global-navigation {
border-right: 0;
border-bottom: 1px solid var(--border);
overflow-x: auto;
}
.global-navigation ul {
display: flex;
}
.instance-context {
border-right: 0;
}
.fleet-toolbar label {
width: 100%;
}
.table-scroll {
overflow: visible;
border: 0;
}
.dense-table,
.dense-table tbody,
.dense-table tr,
.dense-table th,
.dense-table td {
display: block;
width: 100%;
white-space: normal;
}
.dense-table thead {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
}
.dense-table tbody tr {
margin-block: 0.75rem;
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: var(--radius);
}
.dense-table tbody td,
.dense-table tbody th {
border: 0;
padding: 0.3rem 0;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
}
}