|
@@ -1,5 +1,6 @@
|
|
|
import { Component, Show, createMemo, createResource, onMount } from "solid-js"
|
|
import { Component, Show, createMemo, createResource, onMount } from "solid-js"
|
|
|
import { createMediaQuery } from "@solid-primitives/media"
|
|
import { createMediaQuery } from "@solid-primitives/media"
|
|
|
|
|
+import { Tag } from "@opencode-ai/ui/v2/badge-v2"
|
|
|
import { ButtonV2 } from "@opencode-ai/ui/v2/button-v2"
|
|
import { ButtonV2 } from "@opencode-ai/ui/v2/button-v2"
|
|
|
import { SelectV2 } from "@opencode-ai/ui/v2/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"
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
sansInput,
|
|
sansInput,
|
|
|
terminalDefault,
|
|
terminalDefault,
|
|
|
terminalFontFamily,
|
|
terminalFontFamily,
|
|
|
|
|
+ oldInterfaceSunset,
|
|
|
terminalInput,
|
|
terminalInput,
|
|
|
useSettings,
|
|
useSettings,
|
|
|
} from "@/context/settings"
|
|
} from "@/context/settings"
|
|
@@ -226,6 +228,39 @@ export const SettingsGeneralV2: Component<{
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ const InterfaceSection = () => (
|
|
|
|
|
+ <div class="settings-v2-section">
|
|
|
|
|
+ <SettingsListV2>
|
|
|
|
|
+ <SettingsRowV2
|
|
|
|
|
+ title={
|
|
|
|
|
+ <span class="flex items-center gap-2">
|
|
|
|
|
+ {language.t("settings.general.row.newInterface.title")}
|
|
|
|
|
+ <Tag variant="accent">{language.t("settings.general.row.newInterface.badge")}</Tag>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ }
|
|
|
|
|
+ description={language.t("settings.general.row.newInterface.description", {
|
|
|
|
|
+ date: new Intl.DateTimeFormat(language.intl(), { month: "long", day: "numeric" }).format(
|
|
|
|
|
+ oldInterfaceSunset,
|
|
|
|
|
+ ),
|
|
|
|
|
+ })}
|
|
|
|
|
+ >
|
|
|
|
|
+ <div data-action="settings-new-layout-designs">
|
|
|
|
|
+ <Switch
|
|
|
|
|
+ checked={settings.general.newLayoutDesigns()}
|
|
|
|
|
+ onChange={(checked) => {
|
|
|
|
|
+ settings.general.setNewLayoutDesigns(checked)
|
|
|
|
|
+ if (checked) return
|
|
|
|
|
+ void import("@/components/dialog-settings").then((module) => {
|
|
|
|
|
+ void dialog.show(() => <module.DialogSettings />)
|
|
|
|
|
+ })
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </SettingsRowV2>
|
|
|
|
|
+ </SettingsListV2>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
const GeneralSection = () => (
|
|
const GeneralSection = () => (
|
|
|
<div class="settings-v2-section">
|
|
<div class="settings-v2-section">
|
|
|
<SettingsListV2>
|
|
<SettingsListV2>
|
|
@@ -312,24 +347,6 @@ export const SettingsGeneralV2: Component<{
|
|
|
</div>
|
|
</div>
|
|
|
</SettingsRowV2>
|
|
</SettingsRowV2>
|
|
|
|
|
|
|
|
- <SettingsRowV2
|
|
|
|
|
- title={language.t("settings.general.row.newLayoutDesigns.title")}
|
|
|
|
|
- description={language.t("settings.general.row.newLayoutDesigns.description")}
|
|
|
|
|
- >
|
|
|
|
|
- <div data-action="settings-new-layout-designs">
|
|
|
|
|
- <Switch
|
|
|
|
|
- checked={settings.general.newLayoutDesigns()}
|
|
|
|
|
- onChange={(checked) => {
|
|
|
|
|
- settings.general.setNewLayoutDesigns(checked)
|
|
|
|
|
- if (checked) return
|
|
|
|
|
- void import("@/components/dialog-settings").then((module) => {
|
|
|
|
|
- dialog.show(() => <module.DialogSettings />)
|
|
|
|
|
- })
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </SettingsRowV2>
|
|
|
|
|
-
|
|
|
|
|
<Show when={mobile() && import.meta.env.VITE_OPENCODE_CHANNEL !== "prod"}>
|
|
<Show when={mobile() && import.meta.env.VITE_OPENCODE_CHANNEL !== "prod"}>
|
|
|
<SettingsRowV2
|
|
<SettingsRowV2
|
|
|
title={language.t("settings.general.row.mobileTitlebarBottom.title")}
|
|
title={language.t("settings.general.row.mobileTitlebarBottom.title")}
|
|
@@ -683,6 +700,10 @@ export const SettingsGeneralV2: Component<{
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-v2-tab-body">
|
|
<div class="settings-v2-tab-body">
|
|
|
|
|
+ <Show when={Date.now() < oldInterfaceSunset.getTime()}>
|
|
|
|
|
+ <InterfaceSection />
|
|
|
|
|
+ </Show>
|
|
|
|
|
+
|
|
|
<GeneralSection />
|
|
<GeneralSection />
|
|
|
|
|
|
|
|
<AppearanceSection />
|
|
<AppearanceSection />
|