Files
ESP32_COMM/tools/style.css
T
小龙虾 478e5e5a31 feat(ota-relay): 更新ESP32-C3 OTA中继固件配置和功能增强
- 修改WiFi配置默认为STA模式连接路由器,并调整相关参数
- 优化调试日志系统,添加环形缓冲区支持HTTP日志拉取功能
- 重构健康监控,提高温度监控频率至1秒并添加电压监控定时器
- 更新分区表配置以适应4MB Flash布局
- 添加OTA更新组件依赖和蓝牙支持
- 修复UDP socket延迟创建时机,确保网络接口初始化正确
- 调整WiFi信号强度告警阈值,提升连接稳定性
- 更新README文档中的IP地址配置示例
- 修改VSCode端口配置为COM13
2026-05-05 03:28:44 +08:00

681 lines
13 KiB
CSS

:root {
--bg-primary: #0a0e1a;
--bg-secondary: #111827;
--bg-card: #1a2235;
--bg-card-hover: #1f2a40;
--accent: #00d4ff;
--accent-glow: rgba(0, 212, 255, 0.3);
--accent-secondary: #7c3aed;
--success: #10b981;
--warning: #f59e0b;
--danger: #ef4444;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--border: #1e293b;
--gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--gradient-2: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
--gradient-3: linear-gradient(135deg, #0a0e1a 0%, #1a2235 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
overflow-x: hidden;
}
body::before {
content: '';
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background:
radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
radial-gradient(ellipse 60% 40% at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
pointer-events: none;
z-index: 0;
}
.container {
position: relative;
z-index: 1;
max-width: 1400px;
margin: 0 auto;
padding: 30px 40px;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 40px;
padding-bottom: 24px;
border-bottom: 1px solid var(--border);
}
.logo-section {
display: flex;
align-items: center;
gap: 16px;
}
.logo-icon {
width: 56px;
height: 56px;
background: var(--gradient-2);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
box-shadow: 0 8px 32px var(--accent-glow);
}
.logo-text h1 {
font-size: 26px;
font-weight: 700;
background: var(--gradient-2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.logo-text p {
font-size: 13px;
color: var(--text-muted);
margin-top: 4px;
}
.status-badges {
display: flex;
gap: 12px;
}
.badge {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
font-size: 13px;
transition: all 0.3s;
}
.badge .dot {
width: 8px;
height: 8px;
border-radius: 50%;
animation: pulse 2s infinite;
}
.badge.connected .dot { background: var(--success); }
.badge.disconnected .dot { background: var(--danger); animation: none; }
.badge.warning .dot { background: var(--warning); }
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.2); }
}
.main-grid {
display: grid;
grid-template-columns: 420px 1fr;
gap: 24px;
}
.left-panel {
display: flex;
flex-direction: column;
gap: 20px;
}
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
padding: 24px;
transition: all 0.3s;
}
.card:hover {
border-color: rgba(0, 212, 255, 0.2);
box-shadow: 0 0 40px rgba(0, 212, 255, 0.05);
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.card-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 16px;
font-weight: 600;
}
.card-title .icon {
width: 36px;
height: 36px;
background: var(--gradient-2);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
}
.connection-card .form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
font-size: 12px;
color: var(--text-muted);
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.input-group {
display: flex;
gap: 8px;
}
input[type="text"] {
flex: 1;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 16px;
color: var(--text-primary);
font-size: 14px;
outline: none;
transition: all 0.3s;
}
input[type="text"]:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 20px;
border: none;
border-radius: 10px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
}
.btn-primary {
background: var(--gradient-2);
color: white;
box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-secondary {
background: var(--bg-secondary);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.btn-secondary:hover {
background: var(--bg-card-hover);
color: var(--text-primary);
}
.btn-success {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
}
.btn-danger {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
color: white;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none !important;
}
.upload-zone {
border: 2px dashed var(--border);
border-radius: 16px;
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.upload-zone::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
opacity: 0;
transition: opacity 0.3s;
}
.upload-zone:hover::before,
.upload-zone.dragover::before {
opacity: 1;
}
.upload-zone:hover {
border-color: var(--accent);
}
.upload-icon {
width: 64px;
height: 64px;
margin: 0 auto 16px;
background: var(--bg-secondary);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
}
.upload-zone h3 {
font-size: 16px;
margin-bottom: 8px;
}
.upload-zone p {
font-size: 13px;
color: var(--text-muted);
}
.file-input {
display: none;
}
.file-info {
background: var(--bg-secondary);
border-radius: 12px;
padding: 16px;
display: none;
}
.file-info.visible {
display: block;
}
.file-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.file-name {
display: flex;
align-items: center;
gap: 10px;
font-size: 14px;
font-weight: 500;
}
.file-name .icon {
font-size: 20px;
}
.file-size {
font-size: 12px;
color: var(--text-muted);
}
.file-meta {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.meta-item {
background: var(--bg-card);
padding: 8px 12px;
border-radius: 8px;
font-size: 12px;
}
.meta-item span {
color: var(--text-muted);
}
.progress-section {
margin-top: 20px;
display: none;
}
.progress-section.visible {
display: block;
}
.progress-bar-container {
background: var(--bg-secondary);
border-radius: 10px;
height: 12px;
overflow: hidden;
margin-bottom: 12px;
}
.progress-bar {
height: 100%;
background: var(--gradient-2);
border-radius: 10px;
width: 0%;
transition: width 0.3s ease;
position: relative;
}
.progress-bar::after {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.progress-info {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--text-muted);
}
.action-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-top: 20px;
}
.right-panel {
display: flex;
flex-direction: column;
gap: 20px;
}
.status-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
}
.status-item {
background: var(--bg-secondary);
border-radius: 12px;
padding: 16px;
text-align: center;
}
.status-item .value {
font-size: 24px;
font-weight: 700;
background: var(--gradient-2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.status-item .label {
font-size: 11px;
color: var(--text-muted);
margin-top: 4px;
text-transform: uppercase;
}
.log-panel {
flex: 1;
display: flex;
flex-direction: column;
min-height: 500px;
}
.log-panel .card-body {
flex: 1;
display: flex;
flex-direction: column;
}
.log-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--border);
}
.log-filters {
display: flex;
gap: 8px;
}
.filter-btn {
padding: 6px 12px;
border-radius: 20px;
border: 1px solid var(--border);
background: transparent;
color: var(--text-muted);
font-size: 12px;
cursor: pointer;
transition: all 0.3s;
}
.filter-btn:hover,
.filter-btn.active {
background: var(--accent);
color: white;
border-color: var(--accent);
}
.log-content {
flex: 1;
background: var(--bg-secondary);
border-radius: 12px;
margin: 16px;
padding: 16px;
overflow-y: auto;
max-height: 400px;
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
font-size: 12px;
line-height: 1.6;
}
.log-content::-webkit-scrollbar {
width: 6px;
}
.log-content::-webkit-scrollbar-track {
background: var(--bg-secondary);
border-radius: 3px;
}
.log-content::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.log-entry {
padding: 4px 0;
border-bottom: 1px solid rgba(255,255,255,0.03);
display: flex;
gap: 8px;
}
.log-time { color: var(--text-muted); }
.log-level {
font-weight: 600;
min-width: 24px;
}
.log-level.E { color: var(--danger); }
.log-level.W { color: var(--warning); }
.log-level.I { color: var(--accent); }
.log-level.D { color: var(--text-muted); }
.log-tag { color: var(--accent-secondary); }
.log-msg { color: var(--text-primary); }
.log-footer {
padding: 12px 20px;
border-top: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
}
.log-stats {
font-size: 12px;
color: var(--text-muted);
}
.stage-indicator {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 0;
}
.stage {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
position: relative;
flex: 1;
}
.stage:not(:last-child)::after {
content: '';
position: absolute;
top: 20px;
left: calc(50% + 24px);
width: calc(100% - 48px);
height: 2px;
background: var(--border);
}
.stage.active:not(:last-child)::after,
.stage.completed:not(:last-child)::after {
background: var(--accent);
}
.stage-icon {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--bg-secondary);
border: 2px solid var(--border);
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
transition: all 0.3s;
position: relative;
z-index: 1;
}
.stage.active .stage-icon {
background: var(--accent);
border-color: var(--accent);
color: white;
box-shadow: 0 0 20px var(--accent-glow);
}
.stage.completed .stage-icon {
background: var(--success);
border-color: var(--success);
color: white;
}
.stage-label {
font-size: 11px;
color: var(--text-muted);
text-align: center;
}
.stage.active .stage-label,
.stage.completed .stage-label {
color: var(--text-primary);
}
.toast {
position: fixed;
bottom: 30px;
right: 30px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px 24px;
display: flex;
align-items: center;
gap: 12px;
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
transform: translateY(100px);
opacity: 0;
transition: all 0.3s;
z-index: 1000;
}
.toast.show {
transform: translateY(0);
opacity: 1;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast-icon {
font-size: 24px;
}
.toast-message {
font-size: 14px;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.card {
animation: fadeIn 0.5s ease forwards;
}
.left-panel .card:nth-child(1) { animation-delay: 0.1s; }
.left-panel .card:nth-child(2) { animation-delay: 0.2s; }
.left-panel .card:nth-child(3) { animation-delay: 0.3s; }
.right-panel .card:nth-child(1) { animation-delay: 0.15s; }
.right-panel .card:nth-child(2) { animation-delay: 0.25s; }