diff options
Diffstat (limited to 'packages/app/src/components')
| -rw-r--r-- | packages/app/src/components/settings-general.tsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/app/src/components/settings-general.tsx b/packages/app/src/components/settings-general.tsx index db057a4c4..72135c342 100644 --- a/packages/app/src/components/settings-general.tsx +++ b/packages/app/src/components/settings-general.tsx @@ -367,6 +367,34 @@ export const SettingsGeneral: Component = () => { </div> </div> + <Show when={platform.platform === "desktop" && platform.os === "windows" && platform.getWslEnabled}> + {(_) => { + const [enabledResource, actions] = createResource(() => platform.getWslEnabled?.()) + const enabled = () => (enabledResource.state === "pending" ? undefined : enabledResource.latest) + + return ( + <div class="flex flex-col gap-1"> + <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.desktop.section.wsl")}</h3> + + <div class="bg-surface-raised-base px-4 rounded-lg"> + <SettingsRow + title={language.t("settings.desktop.wsl.title")} + description={language.t("settings.desktop.wsl.description")} + > + <div data-action="settings-wsl"> + <Switch + checked={enabled() ?? false} + disabled={enabledResource.state === "pending"} + onChange={(checked) => platform.setWslEnabled?.(checked)?.finally(() => actions.refetch())} + /> + </div> + </SettingsRow> + </div> + </div> + ) + }} + </Show> + {/* Updates Section */} <div class="flex flex-col gap-1"> <h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.updates")}</h3> |
