refactor(theme): migrate all CSS variable references and adapt third-party components
- Task 10: Bulk migrate CSS variable references from --primary/--secondary/etc to --color-primary/--color-secondary/etc across all components - Task 11: Adapt CodeEditor to auto-detect theme from ThemeProvider context, remove hardcoded theme='dark' from plugin-config and bot config pages
This commit is contained in:
@@ -16,29 +16,29 @@
|
||||
|
||||
/* 拖放区域样式 */
|
||||
.uppy-Dashboard-AddFiles {
|
||||
border: 2px dashed hsl(var(--border)) !important;
|
||||
border: 2px dashed hsl(var(--color-border)) !important;
|
||||
border-radius: 0.5rem !important;
|
||||
background: hsl(var(--muted) / 0.3) !important;
|
||||
background: hsl(var(--color-muted) / 0.3) !important;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-AddFiles:hover {
|
||||
border-color: hsl(var(--primary)) !important;
|
||||
background: hsl(var(--muted) / 0.5) !important;
|
||||
border-color: hsl(var(--color-primary)) !important;
|
||||
background: hsl(var(--color-muted) / 0.5) !important;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-AddFiles-title {
|
||||
color: hsl(var(--foreground)) !important;
|
||||
color: hsl(var(--color-foreground)) !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-AddFiles-info {
|
||||
color: hsl(var(--muted-foreground)) !important;
|
||||
color: hsl(var(--color-muted-foreground)) !important;
|
||||
}
|
||||
|
||||
/* 按钮样式 */
|
||||
.uppy-Dashboard-browse {
|
||||
color: hsl(var(--primary)) !important;
|
||||
color: hsl(var(--color-primary)) !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
@@ -52,63 +52,63 @@
|
||||
}
|
||||
|
||||
.uppy-Dashboard-Item {
|
||||
border-bottom-color: hsl(var(--border)) !important;
|
||||
border-bottom-color: hsl(var(--color-border)) !important;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-Item-name {
|
||||
color: hsl(var(--foreground)) !important;
|
||||
color: hsl(var(--color-foreground)) !important;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-Item-status {
|
||||
color: hsl(var(--muted-foreground)) !important;
|
||||
color: hsl(var(--color-muted-foreground)) !important;
|
||||
}
|
||||
|
||||
/* 进度条样式 */
|
||||
.uppy-StatusBar {
|
||||
background: hsl(var(--muted)) !important;
|
||||
border-top: 1px solid hsl(var(--border)) !important;
|
||||
background: hsl(var(--color-muted)) !important;
|
||||
border-top: 1px solid hsl(var(--color-border)) !important;
|
||||
}
|
||||
|
||||
.uppy-StatusBar-progress {
|
||||
background: hsl(var(--primary)) !important;
|
||||
background: hsl(var(--color-primary)) !important;
|
||||
}
|
||||
|
||||
.uppy-StatusBar-content {
|
||||
color: hsl(var(--foreground)) !important;
|
||||
color: hsl(var(--color-foreground)) !important;
|
||||
}
|
||||
|
||||
.uppy-StatusBar-actionBtn--upload {
|
||||
background: hsl(var(--primary)) !important;
|
||||
color: hsl(var(--primary-foreground)) !important;
|
||||
background: hsl(var(--color-primary)) !important;
|
||||
color: hsl(var(--color-primary-foreground)) !important;
|
||||
border-radius: 0.375rem !important;
|
||||
font-weight: 500 !important;
|
||||
padding: 0.5rem 1rem !important;
|
||||
}
|
||||
|
||||
.uppy-StatusBar-actionBtn--upload:hover {
|
||||
background: hsl(var(--primary) / 0.9) !important;
|
||||
background: hsl(var(--color-primary) / 0.9) !important;
|
||||
}
|
||||
|
||||
/* Note 提示文字样式 */
|
||||
.uppy-Dashboard-note {
|
||||
color: hsl(var(--muted-foreground)) !important;
|
||||
color: hsl(var(--color-muted-foreground)) !important;
|
||||
font-size: 0.75rem !important;
|
||||
}
|
||||
|
||||
/* 暗色主题适配 */
|
||||
[data-uppy-theme="dark"] .uppy-Dashboard-AddFiles,
|
||||
.dark .uppy-Dashboard-AddFiles {
|
||||
background: hsl(var(--muted) / 0.2) !important;
|
||||
background: hsl(var(--color-muted) / 0.2) !important;
|
||||
}
|
||||
|
||||
[data-uppy-theme="dark"] .uppy-Dashboard-AddFiles-title,
|
||||
.dark .uppy-Dashboard-AddFiles-title {
|
||||
color: hsl(var(--foreground)) !important;
|
||||
color: hsl(var(--color-foreground)) !important;
|
||||
}
|
||||
|
||||
[data-uppy-theme="dark"] .uppy-StatusBar,
|
||||
.dark .uppy-StatusBar {
|
||||
background: hsl(var(--muted) / 0.5) !important;
|
||||
background: hsl(var(--color-muted) / 0.5) !important;
|
||||
}
|
||||
|
||||
/* 移除 Uppy 自带的边框和阴影 */
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
/* 删除按钮样式 */
|
||||
.uppy-Dashboard-Item-action--remove {
|
||||
color: hsl(var(--destructive)) !important;
|
||||
color: hsl(var(--color-destructive)) !important;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-Item-action--remove:hover {
|
||||
@@ -137,7 +137,7 @@
|
||||
}
|
||||
|
||||
.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progress {
|
||||
color: hsl(var(--destructive)) !important;
|
||||
color: hsl(var(--color-destructive)) !important;
|
||||
}
|
||||
|
||||
/* 滚动条样式 */
|
||||
@@ -150,10 +150,10 @@
|
||||
}
|
||||
|
||||
.uppy-Dashboard-files::-webkit-scrollbar-thumb {
|
||||
background: hsl(var(--muted-foreground) / 0.3);
|
||||
background: hsl(var(--color-muted-foreground) / 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.uppy-Dashboard-files::-webkit-scrollbar-thumb:hover {
|
||||
background: hsl(var(--muted-foreground) / 0.5);
|
||||
background: hsl(var(--color-muted-foreground) / 0.5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user