mirror of
https://github.com/smittix/intercept.git
synced 2026-04-29 09:09:59 -07:00
Disable listen button when any agent is selected
This commit is contained in:
@@ -339,6 +339,10 @@ function selectAgent(agentId) {
|
||||
if (typeof BluetoothMode !== 'undefined' && BluetoothMode.handleAgentChange) {
|
||||
BluetoothMode.handleAgentChange();
|
||||
}
|
||||
// Re-enable listen button for local mode
|
||||
if (typeof updateListenButtonState === 'function') {
|
||||
updateListenButtonState(false);
|
||||
}
|
||||
console.log('Agent selected: Local');
|
||||
} else {
|
||||
// Fetch devices from remote agent
|
||||
@@ -357,6 +361,10 @@ function selectAgent(agentId) {
|
||||
if (typeof BluetoothMode !== 'undefined' && BluetoothMode.handleAgentChange) {
|
||||
BluetoothMode.handleAgentChange();
|
||||
}
|
||||
// Disable listen button for agent mode (audio can't stream over HTTP)
|
||||
if (typeof updateListenButtonState === 'function') {
|
||||
updateListenButtonState(true);
|
||||
}
|
||||
const agentName = agents.find(a => a.id == agentId)?.name || 'Unknown';
|
||||
console.log(`Agent selected: ${agentName}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user