fix(app): 全链路验证修复 — 编译错误/CORS/迁移/启动脚本
Some checks failed
Main Merge / backend (push) Has been cancelled
Main Merge / frontend (push) Has been cancelled

前端修复:
- calendar_page: 移除不存在的 JournalEntry.content getter
- responsive_scaffold: 移除不存在的 notchThickness 参数
- splash_page: SingleTickerProvider → TickerProvider (多 AnimationController)
- profile_page: UserRoleType.name → .code (修复运行时崩溃)
- 导入缺失的 user.dart

后端修复:
- class_service: generate_class_code 取 UUID 后6位(随机部分)避免碰撞
- diary_role_seed: 移除不存在的 id 列,使用复合主键 ON CONFLICT

基础设施:
- config/default.toml: CORS 改为通配符(开发模式)
- scripts/dev.sh: 统一启动脚本(自动清理端口)
- docs/opendesign/: Open Design 设计规格 HTML 原型稿

验证结果: flutter analyze 0 error, cargo test 77/77 通过, 17个页面全部渲染正常
This commit is contained in:
iven
2026-06-02 01:03:58 +08:00
parent 749ef55b89
commit b320641d9c
56 changed files with 20696 additions and 239 deletions

View File

@@ -0,0 +1,227 @@
/* ─────────────────────────────────────────────────────────
* 暖记 — 平板端 (iPad 1024×768) 共享布局组件
* ───────────────────────────────────────────────────────── */
/* Sidebar navigation */
.sidebar {
position: fixed;
left: 0;
top: 0;
bottom: 0;
width: 260px;
background: var(--surface);
border-right: 1px solid var(--border-soft);
display: flex;
flex-direction: column;
z-index: 100;
padding: var(--space-6) 0;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-6);
margin-bottom: var(--space-8);
}
.sidebar-logo {
width: 42px;
height: 42px;
border-radius: var(--radius-md);
background: linear-gradient(135deg, var(--accent), var(--tertiary));
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
.sidebar-brand-text {
font-family: var(--font-display);
font-size: var(--text-xl);
font-weight: 700;
color: var(--fg);
}
.sidebar-brand-sub {
font-size: var(--text-xs);
color: var(--muted);
}
.sidebar-nav {
flex: 1;
display: flex;
flex-direction: column;
gap: 2px;
padding: 0 var(--space-3);
}
.sidebar-nav-item {
display: flex;
align-items: center;
gap: var(--space-3);
padding: var(--space-3) var(--space-4);
min-height: 44px;
border-radius: var(--radius-sm);
font-size: var(--text-base);
font-weight: 500;
color: var(--muted);
cursor: pointer;
border: none;
background: none;
width: 100%;
text-align: left;
transition: all var(--motion-fast) var(--ease-standard);
}
.sidebar-nav-item:hover {
background: var(--surface-warm);
color: var(--fg);
}
.sidebar-nav-item.active {
background: var(--surface-warm);
color: var(--accent);
font-weight: 600;
}
.sidebar-nav-item svg {
width: 22px;
height: 22px;
flex-shrink: 0;
}
.sidebar-write-btn {
margin: var(--space-4) var(--space-5);
padding: var(--space-4) var(--space-5);
min-height: 44px;
background: var(--accent);
color: var(--accent-on);
border: none;
border-radius: var(--radius-md);
font-family: var(--font-display);
font-size: var(--text-md);
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
transition: all var(--motion-fast) var(--ease-bounce);
box-shadow: var(--shadow-accent);
}
.sidebar-write-btn:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-accent-hover);
}
.sidebar-write-btn:active { transform: scale(0.97); }
.sidebar-write-btn svg { width: 20px; height: 20px; }
.sidebar-footer {
padding: var(--space-4) var(--space-5);
border-top: 1px solid var(--border-soft);
display: flex;
align-items: center;
gap: var(--space-3);
}
.sidebar-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--secondary-soft);
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.sidebar-user-name {
font-size: var(--text-sm);
font-weight: 600;
color: var(--fg);
}
.sidebar-user-streak {
font-size: var(--text-xs);
color: var(--muted);
}
/* Main content area for tablet */
.main-content {
margin-left: 260px;
height: 100vh;
overflow-y: auto;
background: var(--bg);
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.content-inner {
padding: var(--space-8) var(--space-10);
max-width: 740px;
}
/* Two-column layout */
.two-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-5);
}
/* Page header for tablet */
.page-header {
margin-bottom: var(--space-6);
}
.page-header h1 {
font-family: var(--font-display);
font-size: var(--text-3xl);
font-weight: 700;
color: var(--fg);
}
.page-header-sub {
font-size: var(--text-base);
color: var(--muted);
margin-top: var(--space-1);
}
/* Tablet status bar (simplified) */
.tablet-statusbar {
position: fixed;
top: 0;
left: 260px;
right: 0;
height: 28px;
background: var(--surface);
border-bottom: 1px solid var(--border-soft);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--space-5);
font-size: 12px;
color: var(--muted);
font-weight: 500;
z-index: 50;
}
/* Focus visible styles for accessibility */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
box-shadow: var(--focus-ring);
outline: none;
}
/* Minimum touch target for tablet */
button,
[role="button"] {
min-height: 44px;
}