Improve camera drawer UX: layout, device switching, default selection
- Grid layout for source controls: camera + switch on top row (equal width), upload full-width below; preview area uses aspect-ratio 4/3 - "使用摄像头" no longer changes label text; uses is-active highlight only - "切换摄像头" now actually cycles through real video devices via enumerateDevices(); falls back to facingMode flip on mobile/single-cam; button disabled until camera is active and ≥2 devices are detected - Default-selects first sample image when drawer opens so "拍摄完成" is immediately pressable without requiring a capture/upload first - Fix: camera prompt text is now locked to CAMERA_STATE_PROMPTS[state] and no longer overwritten by assistant replies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,11 +120,13 @@
|
||||
id="camera-flip-btn"
|
||||
class="btn btn--ghost camera-drawer__source"
|
||||
type="button"
|
||||
hidden
|
||||
disabled
|
||||
>
|
||||
切换摄像头
|
||||
</button>
|
||||
<label class="btn btn--ghost camera-drawer__source">
|
||||
<label
|
||||
class="btn btn--ghost camera-drawer__source camera-drawer__source--upload"
|
||||
>
|
||||
上传图片
|
||||
<input
|
||||
id="camera-upload"
|
||||
|
||||
Reference in New Issue
Block a user