| | |
| | | let status: IndicatorStatus = $state('hidden') |
| | | let statusText = $state('') |
| | | let barColor = $state('#007AFF') |
| | | let key = $state('Ctrl') |
| | | let key = $state('') |
| | | |
| | | const unsubVisible = indicatorVisible.subscribe(() => {}) |
| | | const unsubStatus = indicatorStatus.subscribe(s => { |
| | |
| | | for (let i = 0; i < 4; i++) realVolumes[i] = realVolumes[i + 1] |
| | | realVolumes[4] = vol |
| | | }) |
| | | const unsubHotkey = hotkeyName.subscribe(k => { key = k }) |
| | | const unsubHotkey = hotkeyName.subscribe(k => { |
| | | key = k |
| | | updateVisuals(status) |
| | | }) |
| | | |
| | | const AppleBlue = '#007AFF' |
| | | const AppleGreen = '#34C759' |
| | |
| | | case 'loading': |
| | | barColor = AppleBlue; statusText = '加载中'; break |
| | | case 'ready': |
| | | barColor = AppleGreen; statusText = `按住${key}说话`; break |
| | | barColor = AppleGreen; statusText = key ? `按住${key}说话` : '触发键未设置'; break |
| | | case 'recording': |
| | | barColor = AppleRed; statusText = ''; break |
| | | case 'processing': |