feat(icon)+fix(audio): 앱 아이콘 적용 + 트레이 아이콘 + 마이크 테스트 조기 종료 수정
- 앱 아이콘: icon.svg 마스터(d3ro 브랜드 — 메탈 섀시+오렌지 웨이브) → png/ico 생성 스크립트(generate-icons.mjs, sharp) + electron-builder win/mac 연결 - 트레이: createEmpty() 빈 아이콘 → 실제 앱 아이콘 (getAppIconPath) - 마이크 테스트: 초기 무음 level:0을 종료로 오인하던 조기 종료 버그 — AUDIO.TEST_LEVEL에 done 플래그 신설(SSOT), STOP 버튼이 실제 캡처 중지, testDevice 실패 시 상태 롤백
This commit is contained in:
parent
26b3fd1f63
commit
cbed451209
12 changed files with 184 additions and 11 deletions
|
|
@ -547,19 +547,28 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
|
|||
size="small"
|
||||
onClick={async () => {
|
||||
if (micTesting) {
|
||||
// 메인 프로세스 캡처까지 실제로 중지 — done 이벤트가 구독 해제를 마무리
|
||||
await window.electronAPI.audio.stopTest()
|
||||
setMicTesting(false)
|
||||
setMicLevel(0)
|
||||
} else {
|
||||
setMicTesting(true)
|
||||
setMicLevel(0)
|
||||
// level 0은 무음/초기화 중일 뿐 — 종료 판정은 done 플래그로만
|
||||
const unsub = window.electronAPI.audio.onTestLevel((e) => {
|
||||
setMicLevel(e.level)
|
||||
if (e.level === 0) {
|
||||
if (e.done) {
|
||||
setMicTesting(false)
|
||||
setMicLevel(0)
|
||||
unsub()
|
||||
}
|
||||
})
|
||||
await window.electronAPI.audio.testDevice({ deviceId: 'default' })
|
||||
const result = await window.electronAPI.audio.testDevice({ deviceId: 'default' })
|
||||
if (!result.success) {
|
||||
setMicTesting(false)
|
||||
setMicLevel(0)
|
||||
unsub()
|
||||
}
|
||||
}
|
||||
}}
|
||||
sx={{ fontFamily: d3roFontMono, fontSize: '11px', minWidth: 80 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue