621 lines
11 KiB
CSS
621 lines
11 KiB
CSS
/* 小红书采集器样式表 */
|
|
|
|
/* ========== CSS 变量 ========== */
|
|
:root {
|
|
--bg-primary: #f5f7fa;
|
|
--bg-secondary: #ffffff;
|
|
--bg-tertiary: #e8ecf1;
|
|
--text-primary: #2c3e50;
|
|
--text-secondary: #5a6c7d;
|
|
--text-muted: #8b95a5;
|
|
--border-color: #d1d9e6;
|
|
--primary-color: #ff2442; /* 小红书红 */
|
|
--primary-hover: #e01f3a;
|
|
--success-color: #10b981;
|
|
--warning-color: #f59e0b;
|
|
--error-color: #ef4444;
|
|
--info-color: #3b82f6;
|
|
--debug-color: #8b95a5;
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
--radius-sm: 4px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
}
|
|
|
|
/* 深色主题 */
|
|
body.dark-theme {
|
|
--bg-primary: #1a1d23;
|
|
--bg-secondary: #242830;
|
|
--bg-tertiary: #2d333d;
|
|
--text-primary: #e8eaed;
|
|
--text-secondary: #9aa0a6;
|
|
--text-muted: #5f6368;
|
|
--border-color: #3c4043;
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
/* ========== 基础重置 ========== */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
line-height: 1.5;
|
|
transition: background 0.3s, color 0.3s;
|
|
}
|
|
|
|
/* ========== 布局 ========== */
|
|
.container {
|
|
max-width: 1600px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* ========== 头部 ========== */
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
padding: 20px;
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.theme-toggle {
|
|
background: var(--bg-tertiary);
|
|
border: none;
|
|
padding: 10px 16px;
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.theme-toggle:hover {
|
|
background: var(--border-color);
|
|
}
|
|
|
|
/* ========== 控制面板 ========== */
|
|
.control-panel {
|
|
background: var(--bg-secondary);
|
|
padding: 20px;
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.control-group {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.control-group:not(:last-child) {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* ========== 按钮 ========== */
|
|
.btn {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
background: var(--primary-hover);
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--error-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover:not(:disabled) {
|
|
background: #dc2626;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--border-color);
|
|
}
|
|
|
|
.btn-small {
|
|
padding: 6px 12px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* ========== 单选按钮组 ========== */
|
|
.radio-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.label-text {
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.radio-group label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.radio-group input[type="radio"] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ========== 下拉选择 ========== */
|
|
.select, .select-small {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.select-small {
|
|
padding: 4px 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* ========== 输入框 ========== */
|
|
.input-small {
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
font-size: 12px;
|
|
width: 150px;
|
|
}
|
|
|
|
/* ========== 线程控制 ========== */
|
|
.thread-control {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.thread-control label {
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ========== 进度卡片 ========== */
|
|
.progress-section {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.progress-card {
|
|
background: var(--bg-secondary);
|
|
padding: 20px;
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.progress-card h3 {
|
|
margin-bottom: 16px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.progress-bar-container {
|
|
width: 100%;
|
|
height: 24px;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, var(--primary-color), #ff6b8a);
|
|
border-radius: var(--radius-md);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: width 0.3s ease;
|
|
min-width: 40px;
|
|
}
|
|
|
|
.progress-text {
|
|
color: white;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.progress-stats {
|
|
display: flex;
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.stat-success {
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.stat-error {
|
|
color: var(--error-color);
|
|
}
|
|
|
|
.stat-info {
|
|
color: var(--info-color);
|
|
}
|
|
|
|
/* ========== 主内容区 ========== */
|
|
.main-content {
|
|
display: grid;
|
|
grid-template-columns: 300px 1fr;
|
|
gap: 20px;
|
|
}
|
|
|
|
.main-content.with-threads {
|
|
grid-template-columns: 300px 250px 1fr;
|
|
}
|
|
|
|
/* ========== 面板 ========== */
|
|
.panel {
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-height: 500px;
|
|
}
|
|
|
|
.panel-header {
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.panel-header h2 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.panel-body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
/* ========== 用户列表 ========== */
|
|
.user-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.user-item {
|
|
padding: 12px;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.user-item:hover {
|
|
background: var(--border-color);
|
|
}
|
|
|
|
.user-item-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.user-id {
|
|
font-family: monospace;
|
|
font-size: 13px;
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.user-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.status-icon {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.status-pending { background: var(--text-muted); }
|
|
.status-processing { background: var(--info-color); }
|
|
.status-completed { background: var(--success-color); }
|
|
.status-failed { background: var(--error-color); }
|
|
|
|
.user-meta {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.hint {
|
|
font-size: 12px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* ========== 线程监控 ========== */
|
|
.thread-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.thread-item {
|
|
padding: 12px;
|
|
background: var(--bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.thread-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.thread-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.thread-status {
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-secondary);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.thread-status.busy {
|
|
background: var(--info-color);
|
|
color: white;
|
|
}
|
|
|
|
.thread-status.error {
|
|
background: var(--error-color);
|
|
color: white;
|
|
}
|
|
|
|
.thread-current {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
font-family: monospace;
|
|
}
|
|
|
|
/* ========== 日志面板 ========== */
|
|
.log-controls {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.log-container {
|
|
font-family: 'Consolas', 'Monaco', monospace;
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.log-entry {
|
|
padding: 6px 8px;
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 4px;
|
|
display: flex;
|
|
gap: 8px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.log-entry:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.log-time {
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.log-level {
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
padding: 0 6px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 11px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.log-level.INFO {
|
|
background: rgba(59, 130, 246, 0.15);
|
|
color: var(--info-color);
|
|
}
|
|
|
|
.log-level.SUCCESS {
|
|
background: rgba(16, 185, 129, 0.15);
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.log-level.WARNING {
|
|
background: rgba(245, 158, 11, 0.15);
|
|
color: var(--warning-color);
|
|
}
|
|
|
|
.log-level.ERROR {
|
|
background: rgba(239, 68, 68, 0.15);
|
|
color: var(--error-color);
|
|
}
|
|
|
|
.log-level.DEBUG {
|
|
background: rgba(139, 149, 165, 0.15);
|
|
color: var(--debug-color);
|
|
}
|
|
|
|
.log-message {
|
|
flex: 1;
|
|
}
|
|
|
|
.log-thread {
|
|
color: var(--primary-color);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ========== 截图面板 ========== */
|
|
.screenshot-panel {
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
overflow: hidden;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.screenshot-panel img {
|
|
width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
/* ========== 滚动条样式 ========== */
|
|
.panel-body::-webkit-scrollbar,
|
|
.log-container::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.panel-body::-webkit-scrollbar-track,
|
|
.log-container::-webkit-scrollbar-track {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.panel-body::-webkit-scrollbar-thumb,
|
|
.log-container::-webkit-scrollbar-thumb {
|
|
background: var(--border-color);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.panel-body::-webkit-scrollbar-thumb:hover,
|
|
.log-container::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-muted);
|
|
}
|
|
|
|
/* ========== 响应式 ========== */
|
|
@media (max-width: 1200px) {
|
|
.main-content {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.main-content.with-threads {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.thread-monitor-panel {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.control-group {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.progress-stats {
|
|
gap: 16px;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 16px;
|
|
}
|
|
}
|