diff options
| author | Adam <[email protected]> | 2026-02-12 15:03:02 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-02-12 15:03:05 -0600 |
| commit | 4e0f509e7b7d84395a541bdfa658f6c98f588221 (patch) | |
| tree | 45912ad3c9b0d9cc532fa4d72fe20938a1273090 /packages/app/src/components | |
| parent | ff3b174c423d89b39ee8154863840e48c8aac371 (diff) | |
| download | opencode-4e0f509e7b7d84395a541bdfa658f6c98f588221.tar.gz opencode-4e0f509e7b7d84395a541bdfa658f6c98f588221.zip | |
feat(app): option to turn off sound effects
Diffstat (limited to 'packages/app/src/components')
| -rw-r--r-- | packages/app/src/components/settings-general.tsx | 69 |
1 files changed, 48 insertions, 21 deletions
diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx index c673cab80..439f542bb 100644 --- a/packages/app/src/components/settings-general.tsx +++ b/packages/app/src/components/settings-general.tsx @@ -306,39 +306,66 @@ export const SettingsGeneral: Component = () => { title={language.t("settings.general.sounds.agent.title")} description={language.t("settings.general.sounds.agent.description")} > - <Select - data-action="settings-sounds-agent" - {...soundSelectProps( - () => settings.sounds.agent(), - (id) => settings.sounds.setAgent(id), - )} - /> + <div class="flex items-center gap-2"> + <div data-action="settings-sounds-agent-enabled"> + <Switch + checked={settings.sounds.agentEnabled()} + onChange={(checked) => settings.sounds.setAgentEnabled(checked)} + /> + </div> + <Select + disabled={!settings.sounds.agentEnabled()} + data-action="settings-sounds-agent" + {...soundSelectProps( + () => settings.sounds.agent(), + (id) => settings.sounds.setAgent(id), + )} + /> + </div> </SettingsRow> <SettingsRow title={language.t("settings.general.sounds.permissions.title")} description={language.t("settings.general.sounds.permissions.description")} > - <Select - data-action="settings-sounds-permissions" - {...soundSelectProps( - () => settings.sounds.permissions(), - (id) => settings.sounds.setPermissions(id), - )} - /> + <div class="flex items-center gap-2"> + <div data-action="settings-sounds-permissions-enabled"> + <Switch + checked={settings.sounds.permissionsEnabled()} + onChange={(checked) => settings.sounds.setPermissionsEnabled(checked)} + /> + </div> + <Select + disabled={!settings.sounds.permissionsEnabled()} + data-action="settings-sounds-permissions" + {...soundSelectProps( + () => settings.sounds.permissions(), + (id) => settings.sounds.setPermissions(id), + )} + /> + </div> </SettingsRow> <SettingsRow title={language.t("settings.general.sounds.errors.title")} description={language.t("settings.general.sounds.errors.description")} > - <Select - data-action="settings-sounds-errors" - {...soundSelectProps( - () => settings.sounds.errors(), - (id) => settings.sounds.setErrors(id), - )} - /> + <div class="flex items-center gap-2"> + <div data-action="settings-sounds-errors-enabled"> + <Switch + checked={settings.sounds.errorsEnabled()} + onChange={(checked) => settings.sounds.setErrorsEnabled(checked)} + /> + </div> + <Select + disabled={!settings.sounds.errorsEnabled()} + data-action="settings-sounds-errors" + {...soundSelectProps( + () => settings.sounds.errors(), + (id) => settings.sounds.setErrors(id), + )} + /> + </div> </SettingsRow> </div> </div> |
