diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx index 5943bfe28..c1b53fd3f 100644 --- a/packages/app/src/components/settings-general.tsx +++ b/packages/app/src/components/settings-general.tsx @@ -48,153 +48,159 @@ export const SettingsGeneral: Component = () => {

Appearance

- - o.value === theme.colorScheme())} + value={(o) => o.value} + label={(o) => o.label} + onSelect={(option) => option && theme.setColorScheme(option.value)} + variant="secondary" + size="small" + /> + - - Customise how OpenCode is themed.{" "} - - Learn more - - - } - > - o.id === theme.themeId())} + value={(o) => o.id} + label={(o) => o.name} + onSelect={(option) => { + if (!option) return + theme.setTheme(option.id) + }} + onHighlight={(option) => { + if (!option) return + theme.previewTheme(option.id) + return () => theme.cancelPreview() + }} + variant="secondary" + size="small" + /> + - - o.value === settings.appearance.font())} + value={(o) => o.value} + label={(o) => o.label} + onSelect={(option) => option && settings.appearance.setFont(option.value)} + variant="secondary" + size="small" + /> + +
{/* System notifications Section */}

System notifications

- - settings.notifications.setAgent(checked)} - /> - +
+ + settings.notifications.setAgent(checked)} + /> + - - settings.notifications.setPermissions(checked)} - /> - + + settings.notifications.setPermissions(checked)} + /> + - - settings.notifications.setErrors(checked)} - /> - + + settings.notifications.setErrors(checked)} + /> + +
{/* Sound effects Section */}

Sound effects

- - o.id === settings.sounds.agent())} + value={(o) => o.id} + label={(o) => o.label} + onHighlight={(option) => { + if (!option) return + playSound(option.src) + }} + onSelect={(option) => { + if (!option) return + settings.sounds.setAgent(option.id) + playSound(option.src) + }} + variant="secondary" + size="small" + /> + - - o.id === settings.sounds.permissions())} + value={(o) => o.id} + label={(o) => o.label} + onHighlight={(option) => { + if (!option) return + playSound(option.src) + }} + onSelect={(option) => { + if (!option) return + settings.sounds.setPermissions(option.id) + playSound(option.src) + }} + variant="secondary" + size="small" + /> + - - o.id === settings.sounds.errors())} + value={(o) => o.id} + label={(o) => o.label} + onHighlight={(option) => { + if (!option) return + playSound(option.src) + }} + onSelect={(option) => { + if (!option) return + settings.sounds.setErrors(option.id) + playSound(option.src) + }} + variant="secondary" + size="small" + /> + +