|
@@ -2,7 +2,7 @@ import { Component, Show, createMemo, createResource, onMount } from "solid-js"
|
|
|
import { createStore } from "solid-js/store"
|
|
import { createStore } from "solid-js/store"
|
|
|
import { ButtonV2 } from "@opencode-ai/ui/v2/button-v2"
|
|
import { ButtonV2 } from "@opencode-ai/ui/v2/button-v2"
|
|
|
import { Icon } from "@opencode-ai/ui/icon"
|
|
import { Icon } from "@opencode-ai/ui/icon"
|
|
|
-import { SelectV2 } from "@opencode-ai/ui/select-v2"
|
|
|
|
|
|
|
+import { SelectV2 } from "@opencode-ai/ui/v2/select-v2"
|
|
|
import { Switch } from "@opencode-ai/ui/v2/switch-v2"
|
|
import { Switch } from "@opencode-ai/ui/v2/switch-v2"
|
|
|
import { TextInputV2 } from "@opencode-ai/ui/v2/text-input-v2"
|
|
import { TextInputV2 } from "@opencode-ai/ui/v2/text-input-v2"
|
|
|
import { Tooltip } from "@opencode-ai/ui/tooltip"
|
|
import { Tooltip } from "@opencode-ai/ui/tooltip"
|
|
@@ -289,7 +289,7 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
if (!option) return
|
|
if (!option) return
|
|
|
playDemoSound(option.id === "none" ? undefined : option.id)
|
|
playDemoSound(option.id === "none" ? undefined : option.id)
|
|
|
},
|
|
},
|
|
|
- onSelect: (option: (typeof soundOptions)[number] | undefined) => {
|
|
|
|
|
|
|
+ onSelect: (option: (typeof soundOptions)[number] | null) => {
|
|
|
if (!option) return
|
|
if (!option) return
|
|
|
if (option.id === "none") {
|
|
if (option.id === "none") {
|
|
|
setEnabled(false)
|
|
setEnabled(false)
|
|
@@ -310,8 +310,11 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.row.language.description")}
|
|
description={language.t("settings.general.row.language.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-language"
|
|
data-action="settings-language"
|
|
|
options={languageOptions()}
|
|
options={languageOptions()}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
current={languageOptions().find((o) => o.value === language.locale())}
|
|
current={languageOptions().find((o) => o.value === language.locale())}
|
|
|
value={(o) => o.value}
|
|
value={(o) => o.value}
|
|
|
label={(o) => o.label}
|
|
label={(o) => o.label}
|
|
@@ -333,9 +336,12 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.row.shell.description")}
|
|
description={language.t("settings.general.row.shell.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-shell"
|
|
data-action="settings-shell"
|
|
|
options={shellOptions()}
|
|
options={shellOptions()}
|
|
|
current={shellOptions().find((o) => o.value === currentShell()) ?? autoOption}
|
|
current={shellOptions().find((o) => o.value === currentShell()) ?? autoOption}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
value={(o) => o.id}
|
|
value={(o) => o.id}
|
|
|
label={(o) => o.label}
|
|
label={(o) => o.label}
|
|
|
onSelect={(option) => {
|
|
onSelect={(option) => {
|
|
@@ -505,9 +511,12 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.row.colorScheme.description")}
|
|
description={language.t("settings.general.row.colorScheme.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-color-scheme"
|
|
data-action="settings-color-scheme"
|
|
|
options={colorSchemeOptions()}
|
|
options={colorSchemeOptions()}
|
|
|
current={colorSchemeOptions().find((o) => o.value === theme.colorScheme())}
|
|
current={colorSchemeOptions().find((o) => o.value === theme.colorScheme())}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
value={(o) => o.value}
|
|
value={(o) => o.value}
|
|
|
label={(o) => o.label}
|
|
label={(o) => o.label}
|
|
|
onSelect={(option) => option && theme.setColorScheme(option.value)}
|
|
onSelect={(option) => option && theme.setColorScheme(option.value)}
|
|
@@ -531,9 +540,12 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
}
|
|
}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-theme"
|
|
data-action="settings-theme"
|
|
|
options={themeOptions()}
|
|
options={themeOptions()}
|
|
|
current={themeOptions().find((o) => o.id === theme.themeId())}
|
|
current={themeOptions().find((o) => o.id === theme.themeId())}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
value={(o) => o.id}
|
|
value={(o) => o.id}
|
|
|
label={(o) => o.name}
|
|
label={(o) => o.name}
|
|
|
onSelect={(option) => {
|
|
onSelect={(option) => {
|
|
@@ -671,6 +683,7 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.sounds.agent.description")}
|
|
description={language.t("settings.general.sounds.agent.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-sounds-agent"
|
|
data-action="settings-sounds-agent"
|
|
|
{...soundSelectProps(
|
|
{...soundSelectProps(
|
|
|
() => settings.sounds.agentEnabled(),
|
|
() => settings.sounds.agentEnabled(),
|
|
@@ -678,6 +691,8 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
(value) => settings.sounds.setAgentEnabled(value),
|
|
(value) => settings.sounds.setAgentEnabled(value),
|
|
|
(id) => settings.sounds.setAgent(id),
|
|
(id) => settings.sounds.setAgent(id),
|
|
|
)}
|
|
)}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
/>
|
|
/>
|
|
|
</SettingsRowV2>
|
|
</SettingsRowV2>
|
|
|
|
|
|
|
@@ -686,6 +701,7 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.sounds.permissions.description")}
|
|
description={language.t("settings.general.sounds.permissions.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-sounds-permissions"
|
|
data-action="settings-sounds-permissions"
|
|
|
{...soundSelectProps(
|
|
{...soundSelectProps(
|
|
|
() => settings.sounds.permissionsEnabled(),
|
|
() => settings.sounds.permissionsEnabled(),
|
|
@@ -693,6 +709,8 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
(value) => settings.sounds.setPermissionsEnabled(value),
|
|
(value) => settings.sounds.setPermissionsEnabled(value),
|
|
|
(id) => settings.sounds.setPermissions(id),
|
|
(id) => settings.sounds.setPermissions(id),
|
|
|
)}
|
|
)}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
/>
|
|
/>
|
|
|
</SettingsRowV2>
|
|
</SettingsRowV2>
|
|
|
|
|
|
|
@@ -701,6 +719,7 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
description={language.t("settings.general.sounds.errors.description")}
|
|
description={language.t("settings.general.sounds.errors.description")}
|
|
|
>
|
|
>
|
|
|
<SelectV2
|
|
<SelectV2
|
|
|
|
|
+ appearance="inline"
|
|
|
data-action="settings-sounds-errors"
|
|
data-action="settings-sounds-errors"
|
|
|
{...soundSelectProps(
|
|
{...soundSelectProps(
|
|
|
() => settings.sounds.errorsEnabled(),
|
|
() => settings.sounds.errorsEnabled(),
|
|
@@ -708,6 +727,8 @@ export const SettingsGeneralV2: Component = () => {
|
|
|
(value) => settings.sounds.setErrorsEnabled(value),
|
|
(value) => settings.sounds.setErrorsEnabled(value),
|
|
|
(id) => settings.sounds.setErrors(id),
|
|
(id) => settings.sounds.setErrors(id),
|
|
|
)}
|
|
)}
|
|
|
|
|
+ placement="bottom-end"
|
|
|
|
|
+ gutter={6}
|
|
|
/>
|
|
/>
|
|
|
</SettingsRowV2>
|
|
</SettingsRowV2>
|
|
|
</SettingsListV2>
|
|
</SettingsListV2>
|