Update voice demo camera drawer

This commit is contained in:
Xin Wang
2026-06-02 13:22:08 +08:00
parent aae751f3f3
commit 89d0777830
3 changed files with 42 additions and 67 deletions

View File

@@ -270,36 +270,29 @@ body {
cursor: not-allowed;
}
/* 上传图片 + 使用摄像头 share one row. */
.camera-drawer__sources {
display: flex;
flex-direction: column;
gap: 8px;
}
/* Mirror the mic controls: labeled device select + an action pill button. */
.camera-drawer__camera-row {
display: flex;
align-items: flex-end;
gap: 8px;
}
.camera-drawer__camera-row .device-picker {
flex: 1 1 auto;
/* The camera device dropdown only appears after "使用摄像头" is selected. */
.camera-drawer__device-row {
max-width: none;
}
.cam-btn {
flex-shrink: 0;
.camera-drawer__device-row[hidden] {
display: none;
}
.cam-btn.is-active {
background: var(--success);
/* Active state for the "使用摄像头" button once the camera is live. */
.camera-drawer__source.is-active {
border-color: var(--success);
color: #fff;
box-shadow: 0 0 0 6px rgba(45, 210, 139, 0.18);
color: var(--success);
}
.camera-drawer__source {
flex: 1 1 0;
display: inline-flex;
align-items: center;
justify-content: center;