11import { Component , Show , createMemo , createResource , onMount } from "solid-js"
22import { ButtonV2 } from "@opencode-ai/ui/v2/button-v2"
3- import { Icon } from "@opencode-ai/ui/icon"
43import { SelectV2 } from "@opencode-ai/ui/v2/select-v2"
54import { Switch } from "@opencode-ai/ui/v2/switch-v2"
65import { TextInputV2 } from "@opencode-ai/ui/v2/text-input-v2"
7- import { Tooltip } from "@opencode-ai/ui/tooltip"
86import { useTheme , type ColorScheme } from "@opencode-ai/ui/theme/context"
97import { useDialog } from "@opencode-ai/ui/context/dialog"
108import { useParams } from "@solidjs/router"
119import { useLanguage } from "@/context/language"
1210import { usePermission } from "@/context/permission"
13- import { usePlatform , type DisplayBackend } from "@/context/platform"
11+ import { usePlatform } from "@/context/platform"
1412import { useServerSync } from "@/context/server-sync"
1513import { useServerSDK } from "@/context/server-sdk"
1614import { useUpdaterAction } from "../updater-action"
@@ -94,7 +92,6 @@ export const SettingsGeneralV2: Component = () => {
9492
9593 const updater = useUpdaterAction ( )
9694
97- const linux = createMemo ( ( ) => platform . platform === "desktop" && platform . os === "linux" )
9895 const dir = createMemo ( ( ) => decode64 ( params . dir ) )
9996 const accepting = createMemo ( ( ) => {
10097 const value = dir ( )
@@ -136,12 +133,6 @@ export const SettingsGeneralV2: Component = () => {
136133 { initialValue : [ ] as ShellOption [ ] } ,
137134 )
138135
139- const [ displayBackend , { refetch : refetchDisplayBackend } ] = createResource (
140- ( ) => ( linux ( ) && platform . getDisplayBackend ? true : false ) ,
141- ( ) => Promise . resolve ( platform . getDisplayBackend ?.( ) ?? null ) . catch ( ( ) => null as DisplayBackend | null ) ,
142- { initialValue : null as DisplayBackend | null } ,
143- )
144-
145136 const [ pinchZoom , { mutate : setPinchZoom } ] = createResource (
146137 ( ) => ( desktop ( ) && platform . getPinchZoomEnabled ? true : false ) ,
147138 ( ) => Promise . resolve ( platform . getPinchZoomEnabled ?.( ) ?? false ) . catch ( ( ) => false ) ,
@@ -186,14 +177,6 @@ export const SettingsGeneralV2: Component = () => {
186177 return options
187178 } )
188179
189- const onDisplayBackendChange = ( checked : boolean ) => {
190- const update = platform . setDisplayBackend ?.( checked ? "wayland" : "auto" )
191- if ( ! update ) return
192- void update . finally ( ( ) => {
193- void refetchDisplayBackend ( )
194- } )
195- }
196-
197180 const onPinchZoomChange = ( checked : boolean ) => {
198181 setPinchZoom ( checked )
199182 const update = platform . setPinchZoomEnabled ?.( checked )
@@ -383,18 +366,6 @@ export const SettingsGeneralV2: Component = () => {
383366 </ div >
384367 </ SettingsRowV2 >
385368
386- < SettingsRowV2
387- title = { language . t ( "settings.general.row.showNavigation.title" ) }
388- description = { language . t ( "settings.general.row.showNavigation.description" ) }
389- >
390- < div data-action = "settings-show-navigation" >
391- < Switch
392- checked = { settings . general . showNavigation ( ) }
393- onChange = { ( checked ) => settings . general . setShowNavigation ( checked ) }
394- />
395- </ div >
396- </ SettingsRowV2 >
397-
398369 < SettingsRowV2
399370 title = { language . t ( "settings.general.row.showSearch.title" ) }
400371 description = { language . t ( "settings.general.row.showSearch.description" ) }
@@ -407,18 +378,6 @@ export const SettingsGeneralV2: Component = () => {
407378 </ div >
408379 </ SettingsRowV2 >
409380
410- < SettingsRowV2
411- title = { language . t ( "settings.general.row.showTerminal.title" ) }
412- description = { language . t ( "settings.general.row.showTerminal.description" ) }
413- >
414- < div data-action = "settings-show-terminal" >
415- < Switch
416- checked = { settings . general . showTerminal ( ) }
417- onChange = { ( checked ) => settings . general . setShowTerminal ( checked ) }
418- />
419- </ div >
420- </ SettingsRowV2 >
421-
422381 < SettingsRowV2
423382 title = { language . t ( "settings.general.row.showStatus.title" ) }
424383 description = { language . t ( "settings.general.row.showStatus.description" ) }
@@ -709,6 +668,7 @@ export const SettingsGeneralV2: Component = () => {
709668 </ div >
710669 )
711670
671+ // We can probably remove this, right?
712672 const DisplaySection = ( ) => (
713673 < Show when = { desktop ( ) } >
714674 < div class = "settings-v2-section" >
@@ -723,26 +683,6 @@ export const SettingsGeneralV2: Component = () => {
723683 < Switch checked = { pinchZoom . latest } onChange = { onPinchZoomChange } />
724684 </ div >
725685 </ SettingsRowV2 >
726-
727- < Show when = { linux ( ) } >
728- < SettingsRowV2
729- title = {
730- < div class = "flex items-center gap-2" >
731- < span > { language . t ( "settings.general.row.wayland.title" ) } </ span >
732- < Tooltip value = { language . t ( "settings.general.row.wayland.tooltip" ) } placement = "top" >
733- < span class = "text-text-weak" >
734- < Icon name = "help" size = "small" />
735- </ span >
736- </ Tooltip >
737- </ div >
738- }
739- description = { language . t ( "settings.general.row.wayland.description" ) }
740- >
741- < div data-action = "settings-wayland" >
742- < Switch checked = { displayBackend . latest === "wayland" } onChange = { onDisplayBackendChange } />
743- </ div >
744- </ SettingsRowV2 >
745- </ Show >
746686 </ SettingsListV2 >
747687 </ div >
748688 </ Show >
@@ -763,13 +703,13 @@ export const SettingsGeneralV2: Component = () => {
763703
764704 < SoundsSection />
765705
766- < UpdatesSection />
706+ < Show when = { desktop ( ) } >
707+ < UpdatesSection />
708+ </ Show >
767709
768710 < DisplaySection />
769711
770- < Show when = { desktop ( ) } >
771- < AdvancedSection />
772- </ Show >
712+ < AdvancedSection />
773713 </ div >
774714 </ >
775715 )
0 commit comments