@@ -306,39 +306,66 @@ export const SettingsGeneral: Component = () => {
306306 title = { language . t ( "settings.general.sounds.agent.title" ) }
307307 description = { language . t ( "settings.general.sounds.agent.description" ) }
308308 >
309- < Select
310- data-action = "settings-sounds-agent"
311- { ...soundSelectProps (
312- ( ) => settings . sounds . agent ( ) ,
313- ( id ) => settings . sounds . setAgent ( id ) ,
314- ) }
315- />
309+ < div class = "flex items-center gap-2" >
310+ < div data-action = "settings-sounds-agent-enabled" >
311+ < Switch
312+ checked = { settings . sounds . agentEnabled ( ) }
313+ onChange = { ( checked ) => settings . sounds . setAgentEnabled ( checked ) }
314+ />
315+ </ div >
316+ < Select
317+ disabled = { ! settings . sounds . agentEnabled ( ) }
318+ data-action = "settings-sounds-agent"
319+ { ...soundSelectProps (
320+ ( ) => settings . sounds . agent ( ) ,
321+ ( id ) => settings . sounds . setAgent ( id ) ,
322+ ) }
323+ />
324+ </ div >
316325 </ SettingsRow >
317326
318327 < SettingsRow
319328 title = { language . t ( "settings.general.sounds.permissions.title" ) }
320329 description = { language . t ( "settings.general.sounds.permissions.description" ) }
321330 >
322- < Select
323- data-action = "settings-sounds-permissions"
324- { ...soundSelectProps (
325- ( ) => settings . sounds . permissions ( ) ,
326- ( id ) => settings . sounds . setPermissions ( id ) ,
327- ) }
328- />
331+ < div class = "flex items-center gap-2" >
332+ < div data-action = "settings-sounds-permissions-enabled" >
333+ < Switch
334+ checked = { settings . sounds . permissionsEnabled ( ) }
335+ onChange = { ( checked ) => settings . sounds . setPermissionsEnabled ( checked ) }
336+ />
337+ </ div >
338+ < Select
339+ disabled = { ! settings . sounds . permissionsEnabled ( ) }
340+ data-action = "settings-sounds-permissions"
341+ { ...soundSelectProps (
342+ ( ) => settings . sounds . permissions ( ) ,
343+ ( id ) => settings . sounds . setPermissions ( id ) ,
344+ ) }
345+ />
346+ </ div >
329347 </ SettingsRow >
330348
331349 < SettingsRow
332350 title = { language . t ( "settings.general.sounds.errors.title" ) }
333351 description = { language . t ( "settings.general.sounds.errors.description" ) }
334352 >
335- < Select
336- data-action = "settings-sounds-errors"
337- { ...soundSelectProps (
338- ( ) => settings . sounds . errors ( ) ,
339- ( id ) => settings . sounds . setErrors ( id ) ,
340- ) }
341- />
353+ < div class = "flex items-center gap-2" >
354+ < div data-action = "settings-sounds-errors-enabled" >
355+ < Switch
356+ checked = { settings . sounds . errorsEnabled ( ) }
357+ onChange = { ( checked ) => settings . sounds . setErrorsEnabled ( checked ) }
358+ />
359+ </ div >
360+ < Select
361+ disabled = { ! settings . sounds . errorsEnabled ( ) }
362+ data-action = "settings-sounds-errors"
363+ { ...soundSelectProps (
364+ ( ) => settings . sounds . errors ( ) ,
365+ ( id ) => settings . sounds . setErrors ( id ) ,
366+ ) }
367+ />
368+ </ div >
342369 </ SettingsRow >
343370 </ div >
344371 </ div >
0 commit comments