refactor: 优化配置管理和异常处理

- 添加YAML配置文件支持
- 改进camera_manager异常处理
- 添加类型提示和URL验证
- 完善依赖注入支持测试
- 新增健康检查API端点
This commit is contained in:
qichi.liang
2026-01-02 06:25:36 +08:00
parent 3e9a840576
commit 6903ee6f0b
9 changed files with 503 additions and 132 deletions

View File

@@ -64,6 +64,67 @@ body {
border-color: #4CAF50;
z-index: 10;
}
/* 全屏模式下的样式 */
.camera-item:fullscreen {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
background: #000;
border: none;
}
.camera-item:fullscreen .camera-frame-container {
flex: 1;
height: auto;
}
.camera-item:fullscreen .camera-controls-combined {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.7);
padding: 10px 20px;
border-radius: 25px;
z-index: 9999;
}
.camera-item:fullscreen .camera-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
}
/* WebKit浏览器全屏支持 */
.camera-item:-webkit-full-screen {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
background: #000;
border: none;
}
.camera-item:-webkit-full-screen .camera-frame-container {
flex: 1;
height: auto;
}
.camera-item:-webkit-full-screen .camera-controls-combined {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.7);
padding: 10px 20px;
border-radius: 25px;
z-index: 9999;
}
.camera-item:-webkit-full-screen .camera-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
}
.camera-header {
background: #3a3a3a;
padding: 8px 12px;
@@ -124,6 +185,12 @@ body {
.cam-btn-fullscreen:hover {
background: #F57C00;
}
.cam-btn-exit-fullscreen {
background: #f44336;
}
.cam-btn-exit-fullscreen:hover {
background: #d32f2f;
}
.camera-controls-combined {
background: #3a3a3a;
padding: 6px;