React 19 + Vite 6 + Router 7 + TanStack Query + Zustand;Semi 二次封装与 Remix 图标统一出口;顶部模块 + 左侧功能菜单布局、Cloud Blue 主题、登录页与 401/403/404/500 页面;请求层含 token 注入、单飞刷新与统一错误提示。
552 lines
10 KiB
CSS
552 lines
10 KiB
CSS
/* 方向 A · 云白蓝:登录页与业务页 */
|
|
|
|
/* ---------- 登录页 ---------- */
|
|
|
|
.lx-login {
|
|
position: relative;
|
|
display: flex;
|
|
min-height: 100%;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 96px var(--lx-space-6) 72px;
|
|
background:
|
|
radial-gradient(circle at 50% 0%, #eef5ff 0%, transparent 46%), var(--lx-color-bg-app);
|
|
}
|
|
|
|
.lx-login__topbar {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
display: flex;
|
|
height: 72px;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 var(--lx-space-8);
|
|
}
|
|
|
|
.lx-login__brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.lx-login__mark {
|
|
display: inline-flex;
|
|
width: 34px;
|
|
height: 34px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, #1677ff, #4096ff);
|
|
color: #ffffff;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.lx-login__wordmark {
|
|
font-size: var(--lx-font-size-lg);
|
|
font-weight: 600;
|
|
color: var(--lx-color-text-primary);
|
|
}
|
|
|
|
.lx-login__brand-sub {
|
|
font-size: 11px;
|
|
color: var(--lx-color-text-tertiary);
|
|
letter-spacing: 0.06em;
|
|
}
|
|
|
|
.lx-login__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
height: 28px;
|
|
padding: 0 10px;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: var(--lx-radius-sm);
|
|
background: var(--lx-color-bg-panel);
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-secondary);
|
|
}
|
|
|
|
.lx-login__badge::before {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--lx-color-success);
|
|
content: '';
|
|
}
|
|
|
|
.lx-login__panel {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
padding: 32px;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: 8px;
|
|
background: var(--lx-color-bg-panel);
|
|
box-shadow: 0 8px 28px rgba(31, 35, 41, 0.08);
|
|
}
|
|
|
|
.lx-login__form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--lx-space-5);
|
|
}
|
|
|
|
.lx-login__form-head h2 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
line-height: 1.3;
|
|
color: var(--lx-color-text-primary);
|
|
}
|
|
|
|
.lx-login__form-head p {
|
|
margin-top: 6px;
|
|
font-size: var(--lx-font-size-sm);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-login__form form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-login__form-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--lx-space-3);
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-login__form-foot {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 6px;
|
|
padding-top: var(--lx-space-4);
|
|
border-top: 1px solid var(--lx-color-border);
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-login__form-foot-dot {
|
|
width: 5px;
|
|
height: 5px;
|
|
flex: 0 0 5px;
|
|
margin-top: 6px;
|
|
border-radius: 50%;
|
|
background: var(--lx-color-border-strong);
|
|
}
|
|
|
|
.lx-login__footer {
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
display: flex;
|
|
height: 56px;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 var(--lx-space-8);
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-login__footer-links {
|
|
display: flex;
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
/* ---------- 工作台 ---------- */
|
|
|
|
.lx-home {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-home__hero {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: space-between;
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-home__hero h1 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.lx-home__hero-meta {
|
|
display: flex;
|
|
margin-top: 6px;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-home__hero-dot {
|
|
width: 3px;
|
|
height: 3px;
|
|
border-radius: 50%;
|
|
background: var(--lx-color-border-strong);
|
|
}
|
|
|
|
.lx-home__hero-actions {
|
|
display: flex;
|
|
gap: var(--lx-space-2);
|
|
}
|
|
|
|
.lx-metrics {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-metric {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
padding: 18px 20px;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: var(--lx-radius-md);
|
|
background: var(--lx-color-bg-panel);
|
|
box-shadow: var(--lx-shadow-panel);
|
|
}
|
|
|
|
.lx-metric__head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-secondary);
|
|
}
|
|
|
|
.lx-metric__icon {
|
|
display: inline-flex;
|
|
width: 28px;
|
|
height: 28px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--lx-radius-sm);
|
|
background: var(--lx-color-brand-soft);
|
|
color: var(--lx-color-brand);
|
|
}
|
|
|
|
.lx-metric__value {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 4px;
|
|
font-size: 28px;
|
|
font-weight: 600;
|
|
line-height: 1;
|
|
color: var(--lx-color-text-primary);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.lx-metric__unit {
|
|
font-size: var(--lx-font-size-xs);
|
|
font-weight: 400;
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-metric__foot {
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-metric__trend {
|
|
color: var(--lx-color-success);
|
|
}
|
|
|
|
.lx-home__grid {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) 316px;
|
|
align-items: start;
|
|
gap: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-home__tasks {
|
|
min-width: 0;
|
|
}
|
|
|
|
.lx-home__quick {
|
|
gap: var(--lx-space-3);
|
|
}
|
|
|
|
.lx-quick-list {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--lx-space-2);
|
|
}
|
|
|
|
.lx-quick-item {
|
|
display: flex;
|
|
min-width: 0;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: var(--lx-radius-md);
|
|
background: var(--lx-color-bg-panel);
|
|
text-align: left;
|
|
transition:
|
|
border-color var(--lx-motion-fast) var(--lx-ease-out),
|
|
background var(--lx-motion-fast) var(--lx-ease-out);
|
|
}
|
|
|
|
.lx-quick-item:hover {
|
|
border-color: var(--lx-color-brand);
|
|
background: #f8fbff;
|
|
}
|
|
|
|
.lx-quick-item__icon {
|
|
display: inline-flex;
|
|
width: 30px;
|
|
height: 30px;
|
|
flex: 0 0 30px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--lx-radius-sm);
|
|
background: var(--lx-color-brand-soft);
|
|
color: var(--lx-color-brand);
|
|
}
|
|
|
|
.lx-quick-item__copy {
|
|
display: flex;
|
|
min-width: 0;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.lx-quick-item__label {
|
|
font-size: var(--lx-font-size-sm);
|
|
font-weight: 500;
|
|
color: var(--lx-color-text-primary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.lx-quick-item__hint {
|
|
overflow: hidden;
|
|
font-size: 11px;
|
|
color: var(--lx-color-text-tertiary);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.lx-quick-item__arrow {
|
|
display: none;
|
|
}
|
|
|
|
.lx-home__recent {
|
|
min-width: 0;
|
|
}
|
|
|
|
.lx-asset-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
gap: var(--lx-space-3);
|
|
}
|
|
|
|
.lx-asset-tile {
|
|
display: flex;
|
|
min-width: 0;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
.lx-asset-tile__preview {
|
|
display: block;
|
|
aspect-ratio: 3 / 4;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: var(--lx-radius-md);
|
|
background: #eef2f7;
|
|
}
|
|
|
|
.lx-asset-tile__preview--1 {
|
|
background: linear-gradient(150deg, #dbeafe, #93c5fd 55%, #60a5fa);
|
|
}
|
|
|
|
.lx-asset-tile__preview--2 {
|
|
background: linear-gradient(150deg, #e0f2fe, #bae6fd 55%, #7dd3fc);
|
|
}
|
|
|
|
.lx-asset-tile__preview--3 {
|
|
background: linear-gradient(150deg, #fef3c7, #fde68a 55%, #fcd34d);
|
|
}
|
|
|
|
.lx-asset-tile__preview--4 {
|
|
background: linear-gradient(150deg, #dcfce7, #bbf7d0 55%, #86efac);
|
|
}
|
|
|
|
.lx-asset-tile__preview--5 {
|
|
background: linear-gradient(150deg, #fae8ff, #f5d0fe 55%, #e9a8f5);
|
|
}
|
|
|
|
.lx-asset-tile__preview--6 {
|
|
background: linear-gradient(150deg, #ffe4e6, #fecdd3 55%, #fda4af);
|
|
}
|
|
|
|
.lx-asset-tile__meta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
}
|
|
|
|
.lx-asset-tile__name {
|
|
overflow: hidden;
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-primary);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.lx-asset-tile__spec {
|
|
font-size: 11px;
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
/* ---------- 占位工作区 / 错误页 ---------- */
|
|
|
|
.lx-page-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
margin-bottom: var(--lx-space-4);
|
|
}
|
|
|
|
.lx-page-header h1 {
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.lx-page-header p {
|
|
font-size: var(--lx-font-size-sm);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-panel--empty {
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 320px;
|
|
}
|
|
|
|
.lx-workspace-missing {
|
|
display: flex;
|
|
min-height: 320px;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--lx-space-3);
|
|
color: var(--lx-color-text-secondary);
|
|
}
|
|
|
|
.lx-workspace-missing strong {
|
|
font-size: 40px;
|
|
font-weight: 600;
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-error-page {
|
|
display: flex;
|
|
min-height: 70vh;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--lx-space-8);
|
|
}
|
|
|
|
.lx-error-page__body {
|
|
display: flex;
|
|
max-width: 480px;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.lx-error-page__icon {
|
|
display: inline-flex;
|
|
width: 56px;
|
|
height: 56px;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 14px;
|
|
background: var(--lx-color-brand-soft);
|
|
color: var(--lx-color-brand);
|
|
}
|
|
|
|
.lx-error-page__code {
|
|
margin-top: var(--lx-space-4);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.12em;
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-error-page__title {
|
|
margin-top: 6px;
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.lx-error-page__description {
|
|
margin-top: 8px;
|
|
color: var(--lx-color-text-secondary);
|
|
}
|
|
|
|
.lx-error-page__trace {
|
|
margin-top: 12px;
|
|
padding: 6px 10px;
|
|
border: 1px solid var(--lx-color-border);
|
|
border-radius: var(--lx-radius-sm);
|
|
background: var(--lx-color-bg-panel);
|
|
font-size: var(--lx-font-size-xs);
|
|
color: var(--lx-color-text-tertiary);
|
|
}
|
|
|
|
.lx-error-page__trace code {
|
|
font-family: var(--lx-font-mono);
|
|
color: var(--lx-color-text-secondary);
|
|
}
|
|
|
|
.lx-error-page__actions {
|
|
display: flex;
|
|
margin-top: var(--lx-space-5);
|
|
gap: var(--lx-space-2);
|
|
}
|
|
|
|
@media (width <= 1200px) {
|
|
.lx-metrics {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.lx-home__grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.lx-asset-grid {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (width <= 720px) {
|
|
.lx-metrics {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.lx-asset-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.lx-home__hero {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|