✨ feat: 重构管理后台并增强组件系统与回收站功能

* 新增自适应数值与窗口分析工具,提升交互体验
* 优化回收站模块逻辑,增加展示与选择功能
* 引入 Macaron 主题配置文件并更新 Tailwind 配置
* 精简基础组件代码,移除冗余样式与设置项
* 完善测试用例,覆盖 UI 系统与回收站工作流
* 更新多语言配置,支持功能变更后的文案需求
This commit is contained in:
orion committed 2026-09-18 10:18:07 +08:00
1 parent 614b9a2104
commit 9b22534e2b
61 files changed
+1624 -832

No files matched your search

+77 -332
View File
@@ -1,8 +1,10 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import './controls.css';
html {
color-scheme: light;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
@@ -85,46 +87,8 @@ textarea {
box-shadow: 0 16px 34px rgba(114, 143, 150, 0.26);
}
.fcb-interactive-row {
position: relative;
z-index: 0;
transition:
background-color 180ms ease,
border-color 180ms ease,
box-shadow 180ms ease,
transform 180ms ease;
}
.fcb-interactive-row:hover {
z-index: 1;
box-shadow: inset 3px 0 0 rgba(95, 135, 150, 0.7), 0 10px 22px rgba(86, 118, 126, 0.16);
transform: translateY(-1px);
}
/* List rows use the same pastel highlight timing and palette as cards. */
.fcb-interactive-row {
transition: all 300ms ease !important;
}
.fcb-interactive-row:hover {
background: #f0f4f8 !important;
box-shadow: -6px -6px 16px rgba(255,255,255,.8), 6px 6px 16px rgba(163,177,198,.35) !important;
transform: none !important;
}
.dark .fcb-interactive-row:hover {
background: #2f414a !important;
box-shadow: -6px -6px 16px rgba(69,88,99,.4), 6px 6px 16px rgba(10,18,23,.45) !important;
}
.fcb-list-row { transition: background-color 260ms ease-out, box-shadow 260ms ease-out, border-color 260ms ease-out !important; }
.fcb-list-row:hover { background: #dcebed !important; box-shadow: inset 0 0 0 2px rgba(113,152,166,.42), 0 8px 18px rgba(115,139,151,.28) !important; }
.dark .fcb-list-row:hover { background: #2f414a !important; }
.dark .theme-2026-card {
border-color: rgba(68, 86, 94, 0.82);
background:
linear-gradient(135deg, rgba(34, 49, 56, 0.96), rgba(24, 35, 42, 0.92)),
radial-gradient(circle at 14% 10%, rgba(102, 142, 156, 0.18), transparent 32%);
box-shadow: 0 16px 36px rgba(4, 10, 14, 0.34);
}
.dark .theme-2026-card-hover:hover {
border-color: rgba(113, 153, 168, 0.68);
@@ -132,8 +96,6 @@ textarea {
}
.fcb-secondary-card { transition: all 300ms ease !important; box-shadow: -8px -8px 20px rgba(255,255,255,.8), 8px 8px 20px rgba(163,177,198,.5) !important; }
.fcb-secondary-card:hover { transform: translateY(-2px); background: #f0f4f8 !important; box-shadow: -10px -10px 25px rgba(255,255,255,.9), 10px 10px 25px rgba(163,177,198,.6) !important; }
.fcb-refresh-button { transition: transform 300ms ease, box-shadow 300ms ease, background-color 300ms ease !important; }
.fcb-refresh-button:hover { transform: translateY(-2px) !important; box-shadow: -8px -8px 18px rgba(255,255,255,.86), 8px 8px 18px rgba(163,177,198,.48) !important; }
.data-table-2026 thead th {
background: rgba(236, 244, 246, 0.76);
@@ -145,10 +107,6 @@ textarea {
opacity 180ms ease;
}
.data-table-2026 tbody tr:hover {
background: rgba(226, 236, 238, 0.46);
}
.data-table-2026 tbody tr.is-selected {
background: rgba(213, 228, 230, 0.72);
}
@@ -161,274 +119,10 @@ textarea {
background: rgba(31, 45, 52, 0.82);
}
.dark .data-table-2026 tbody tr:hover {
background: rgba(45, 71, 81, 0.42);
}
.dark .data-table-2026 tbody tr.is-selected-dark {
background: rgba(42, 64, 72, 0.68);
}
.bg-indigo-50,
.bg-blue-50 {
background-color: #dce8eb !important;
}
.bg-indigo-100,
.bg-blue-100 {
background-color: #d1e0e3 !important;
}
.bg-indigo-500,
.bg-blue-500,
.bg-cyan-500 {
background-color: #6f98a6 !important;
}
.bg-indigo-600,
.bg-blue-600,
.bg-cyan-600 {
background-color: #5f8796 !important;
}
.bg-indigo-700,
.bg-blue-700,
.bg-cyan-700 {
background-color: #527887 !important;
}
.bg-green-50 {
background-color: #e1eee8 !important;
}
.bg-green-100 {
background-color: #d4e5dd !important;
}
.bg-green-500,
.bg-green-600 {
background-color: #6f9688 !important;
}
.bg-green-700 {
background-color: #5f8377 !important;
}
.bg-red-50 {
background-color: #f1e2e5 !important;
}
.bg-red-100 {
background-color: #e8d3d7 !important;
}
.bg-red-500,
.bg-red-600 {
background-color: #9b6a72 !important;
}
.bg-red-700 {
background-color: #895c63 !important;
}
.bg-purple-50 {
background-color: #e7e2ea !important;
}
.bg-purple-100 {
background-color: #ddd6e2 !important;
}
.bg-purple-500,
.bg-pink-500 {
background-color: #8c8294 !important;
}
.bg-purple-600,
.bg-pink-600 {
background-color: #7b7284 !important;
}
.text-indigo-200,
.text-blue-200 {
color: #d8e8eb !important;
}
.text-indigo-300,
.text-blue-300 {
color: #b8d4dc !important;
}
.text-indigo-400,
.text-blue-400,
.text-cyan-400 {
color: #8fb2bf !important;
}
.text-indigo-500,
.text-blue-500,
.text-cyan-500 {
color: #6f98a6 !important;
}
.text-indigo-600,
.text-blue-600,
.text-cyan-600 {
color: #5f8796 !important;
}
.text-indigo-700,
.text-blue-700 {
color: #3f6a77 !important;
}
.text-green-300,
.text-green-400 {
color: #b6d6ca !important;
}
.text-green-500,
.text-green-600,
.text-green-700 {
color: #5f8377 !important;
}
.text-red-200,
.text-red-300,
.text-red-400 {
color: #e5c5ca !important;
}
.text-red-500,
.text-red-600,
.text-red-700 {
color: #8b5962 !important;
}
.text-purple-300,
.text-purple-400 {
color: #d4c8dc !important;
}
.text-purple-500,
.text-purple-600,
.text-purple-700 {
color: #6f6379 !important;
}
.border-indigo-100,
.border-blue-100 {
border-color: #cfe1e4 !important;
}
.border-indigo-300,
.border-blue-300 {
border-color: #9db6bd !important;
}
.border-indigo-400,
.border-indigo-500,
.border-blue-500 {
border-color: #8fb2bf !important;
}
.border-indigo-600 {
border-color: #5f8796 !important;
}
.border-red-100 {
border-color: #e8d3d7 !important;
}
.border-red-200,
.border-red-500 {
border-color: #c9a4aa !important;
}
.focus\:ring-indigo-500:focus,
.focus\:ring-blue-500:focus,
.focus\:ring-cyan-500:focus,
.focus\:ring-purple-500:focus {
--tw-ring-color: #8fb2bf !important;
}
.focus\:border-indigo-500:focus,
.focus\:border-cyan-500:focus {
border-color: #8fb2bf !important;
}
.hover\:bg-indigo-100:hover,
.hover\:bg-blue-100:hover {
background-color: #cfe1e4 !important;
}
.hover\:bg-indigo-500:hover,
.hover\:bg-blue-500:hover,
.hover\:bg-cyan-500:hover {
background-color: #6f98a6 !important;
}
.hover\:bg-indigo-600:hover,
.hover\:bg-blue-600:hover,
.hover\:bg-cyan-600:hover {
background-color: #527887 !important;
}
.hover\:bg-indigo-700:hover,
.hover\:bg-blue-700:hover,
.hover\:bg-cyan-700:hover {
background-color: #466b78 !important;
}
.hover\:bg-green-100:hover {
background-color: #d4e5dd !important;
}
.hover\:bg-green-400:hover,
.hover\:bg-green-600:hover,
.hover\:bg-green-700:hover {
background-color: #5f8377 !important;
}
.hover\:bg-red-100:hover {
background-color: #e8d3d7 !important;
}
.hover\:bg-red-400:hover,
.hover\:bg-red-600:hover,
.hover\:bg-red-700:hover {
background-color: #895c63 !important;
}
.hover\:border-indigo-500:hover {
border-color: #8fb2bf !important;
}
.from-indigo-500,
.from-indigo-600,
.from-cyan-500,
.from-cyan-600 {
--tw-gradient-from: #5f8796 var(--tw-gradient-from-position) !important;
--tw-gradient-to: rgba(95, 135, 150, 0) var(--tw-gradient-to-position) !important;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.via-purple-500,
.via-purple-600 {
--tw-gradient-to: rgba(140, 130, 148, 0) var(--tw-gradient-to-position) !important;
--tw-gradient-stops:
var(--tw-gradient-from),
#8c8294 var(--tw-gradient-via-position),
var(--tw-gradient-to) !important;
}
.to-purple-500,
.to-purple-600,
.to-pink-500,
.to-pink-600 {
--tw-gradient-to: #6f9688 var(--tw-gradient-to-position) !important;
}
/* Serenity-inspired soft pastel motion and surfaces. */
:root {
--fcb-pastel-sage: #9fc9bd;
@@ -448,7 +142,6 @@ body { background: var(--fcb-surface); }
box-shadow: 0 16px 34px rgba(112, 137, 151, .22), -8px -8px 20px rgba(255,255,255,.78) !important;
}
button, a { -webkit-tap-highlight-color: transparent; }
button:not(:disabled):not(.fcb-health-card), a { transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease !important; }
.fcb-lifecycle-list { overflow: visible; will-change: height; }
.fcb-lifecycle-row { will-change: opacity; }
.fcb-lifecycle-card { transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease !important; }
@@ -463,7 +156,8 @@ button:not(:disabled):not(.fcb-health-card), a { transition: color 220ms ease, b
--fcb-surface: #f7fafb;
--fcb-surface-muted: #e7eef1;
--fcb-text: #405466;
--fcb-text-muted: #8494a3;
--fcb-text-muted: #607580;
--fcb-border: #cbdde3;
--fcb-primary: #7198a6;
--fcb-primary-dark: #628b9b;
--fcb-mint: #a8d0c2;
@@ -507,39 +201,18 @@ html, body, #app { background: var(--fcb-bg); color: var(--fcb-text); }
background: #2f414a !important;
box-shadow: -10px -10px 25px rgba(69,88,99,.45), 10px 10px 25px rgba(10,18,23,.55) !important;
}
input:not([type=file]), select, textarea { background: var(--fcb-surface) !important; color: var(--fcb-text) !important; border-color: #d5e1e5 !important; box-shadow: var(--fcb-shadow-in); }
input:not([type=file]):not([type=checkbox]):not([type=radio]), select:not(.native-date-part), textarea { background: var(--fcb-surface) !important; color: var(--fcb-text) !important; border-color: var(--fcb-border) !important; box-shadow: var(--fcb-shadow-in); }
button, a { border-radius: 14px; }
button:not(:disabled), a { cursor: pointer; }
button:not(:disabled):hover { filter: brightness(1.025); }
.bg-indigo-500, .bg-indigo-600, .bg-blue-500, .bg-blue-600, .bg-purple-600 { background-color: var(--fcb-primary) !important; }
.from-indigo-500, .from-indigo-600, .from-purple-500, .from-purple-600, .from-pink-500, .via-purple-500, .to-purple-600, .to-pink-500 { --tw-gradient-from: var(--fcb-primary) !important; --tw-gradient-to: var(--fcb-primary-dark) !important; }
.text-indigo-600, .text-indigo-500, .text-blue-600 { color: var(--fcb-primary-dark) !important; }
.border-indigo-500, .border-indigo-600 { border-color: #a8c8cc !important; }
.fcb-lifecycle-card { background: var(--fcb-bg) !important; }
.loading-overlay { background: rgba(225,235,238,.72) !important; backdrop-filter: blur(8px); }
.loading-spinner { border-color: #d5e5e7 !important; border-top-color: var(--fcb-primary) !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .theme-2026-card-hover:hover, .fcb-lifecycle-card:hover { transform: none !important; } }
/* Component-level pastel normalization */
.bg-white, .bg-gray-50, .bg-gray-100 { background-color: var(--fcb-surface) !important; }
.bg-gray-200, .bg-gray-700, .bg-gray-800, .bg-gray-900 { background-color: var(--fcb-surface-muted) !important; color: var(--fcb-text) !important; }
.text-gray-900, .text-gray-800, .text-gray-700 { color: var(--fcb-text) !important; }
.text-gray-600, .text-gray-500, .text-gray-400 { color: var(--fcb-text-muted) !important; }
.border-gray-100, .border-gray-200, .border-gray-300, .border-gray-600, .border-gray-700 { border-color: #d5e1e5 !important; }
.bg-red-600, .bg-red-500 { background-color: #d99a9c !important; }
.hover\\:bg-red-700:hover { background-color: #c9888b !important; }
.fcb-lifecycle-row { transition: opacity 420ms cubic-bezier(.22,1,.36,1); }
.fcb-lifecycle-list, .fcb-expand-content { overflow: hidden; }
/* List highlighting stays inside the hovered row. */
.fcb-list-row {
transition: background-color 260ms ease-out !important;
box-shadow: none !important;
}
.fcb-list-row:hover {
background: #d6e8ec !important;
box-shadow: inset 0 0 0 2px rgba(113,152,166,.5) !important;
}
/* Final specificity: health cards are inner cards, so they lift 2px. */
.theme-2026-card .fcb-health-card:hover,
@@ -553,3 +226,75 @@ button:not(:disabled):hover { filter: brightness(1.025); }
transform: none !important;
}
}
/* Matching dark surfaces retain the same pastel families with readable contrast. */
.dark {
color-scheme: dark;
--fcb-bg: #252b34;
--fcb-surface: #2c3440;
--fcb-surface-muted: #333d49;
--fcb-text: #dfebee;
--fcb-text-muted: #adbec6;
--fcb-border: #495765;
--fcb-shadow-in: inset 3px 3px 8px rgba(9,20,25,.28), inset -3px -3px 8px rgba(75,98,109,.12);
}
/* Dark neumorphism uses soft grey-blue light, not black rims. */
.dark .theme-2026-card, .dark .theme-2026-card-hover, .dark .fcb-lifecycle-card {
box-shadow: -8px -8px 20px rgba(102,119,146,.16), 8px 8px 20px rgba(24,31,44,.55) !important;
}
.dark .theme-2026-card::before { display: none; }
.dark .theme-2026-card-hover:hover, .dark .fcb-secondary-card:hover {
background: #2d3541 !important;
box-shadow: -10px -10px 25px rgba(102,119,146,.21), 10px 10px 25px rgba(24,31,44,.62) !important;
}
.fcb-summary-grid .fcb-secondary-card:hover { transform: translateY(-2px) !important; }
button.theme-2026-card-hover:disabled:hover { transform: none !important; }
@media (prefers-reduced-motion: reduce), (hover: none) {
.fcb-summary-grid .fcb-secondary-card:hover { transform: none !important; }
}
.dark :is(.shadow-sm, .shadow-md, .shadow-lg, .shadow-xl) {
--tw-shadow-color: rgba(35, 46, 65, .24);
--tw-shadow: var(--tw-shadow-colored);
}
/* Light: upper-left light, lower-right shade. Dark reverses this direction. */
:root {
--fcb-card-shadow: -8px -8px 20px rgba(255,255,255,.85), 8px 8px 20px rgba(163,177,198,.38);
--fcb-card-shadow-hover: -10px -10px 25px rgba(255,255,255,.92), 10px 10px 25px rgba(163,177,198,.48);
}
.dark {
--fcb-card-shadow: -8px -8px 20px rgba(24,31,44,.55), 8px 8px 20px rgba(102,119,146,.16);
--fcb-card-shadow-hover: -10px -10px 25px rgba(24,31,44,.62), 10px 10px 25px rgba(102,119,146,.21);
}
:is(.fcb-surface, .theme-2026-card, .theme-2026-card-hover, .fcb-lifecycle-card, .fcb-secondary-card),
.dark :is(.fcb-surface, .theme-2026-card, .theme-2026-card-hover, .fcb-lifecycle-card, .fcb-secondary-card) {
box-shadow: var(--fcb-card-shadow) !important;
}
:is(.theme-2026-card-hover, .fcb-lifecycle-card, .fcb-secondary-card):hover,
.dark :is(.theme-2026-card-hover, .fcb-lifecycle-card, .fcb-secondary-card):hover {
box-shadow: var(--fcb-card-shadow-hover) !important;
}
/* Large content sections retain their position while their children animate. */
section.theme-2026-card:hover { transform: none !important; }
.fcb-surface { background: var(--fcb-bg) !important; border-color: var(--fcb-border) !important; }
/* Matte faces: directional shadows provide depth without a painted gradient. */
.theme-2026-card::before { display: none; }
.fcb-static-container:hover { transform: none !important; translate: none !important; }
.fcb-surface .theme-2026-card-hover:hover { transform: translateY(-2px) !important; }
@media (prefers-reduced-motion: reduce), (hover: none) {
.fcb-surface .theme-2026-card-hover:hover { transform: none !important; }
}
/* Lists highlight without frames, elevation or movement. Keyboard focus stays visible. */
:root { --fcb-row-hover: #dcebef; }
.dark { --fcb-row-hover: #303d4a; }
.fcb-list-row, .fcb-interactive-row, .data-table-2026 tbody tr {
transition: background-color 300ms ease !important;
}
.fcb-list-row:hover, .fcb-interactive-row:hover, .data-table-2026 tbody tr:hover {
background-color: var(--fcb-row-hover) !important;
box-shadow: none !important;
transform: none !important;
}