@@ -14,7 +14,7 @@ import { createEffect, createMemo, createResource, createSignal, onCleanup, Show
1414import { createStore , reconcile } from "solid-js/store"
1515import { ServerHealthIndicator , ServerRow } from "@/components/server/server-row"
1616import { useLanguage } from "@/context/language"
17- import { type InboundServerConfig , usePlatform } from "@/context/platform"
17+ import { type LocalServerConfig , usePlatform } from "@/context/platform"
1818import { normalizeServerUrl , ServerConnection , useServer } from "@/context/server"
1919import { type ServerHealth , useCheckServerHealth } from "@/utils/server-health"
2020
@@ -275,8 +275,8 @@ export function DialogSelectServer() {
275275 const { defaultKey, canDefault, setDefault } = useDefaultServer ( )
276276 const { previewStatus } = useServerPreview ( )
277277 const checkServerHealth = useCheckServerHealth ( )
278- const [ inboundConfig ] = createResource ( ( ) => platform . getInboundServerConfig ?.( ) )
279- const [ savedInboundConfig , setSavedInboundConfig ] = createSignal < InboundServerConfig > ( )
278+ const [ localServerConfig ] = createResource ( ( ) => platform . getLocalServerConfig ?.( ) )
279+ const [ savedLocalServerConfig , setSavedLocalServerConfig ] = createSignal < LocalServerConfig > ( )
280280 const [ store , setStore ] = createStore ( {
281281 status : { } as Record < ServerConnection . Key , ServerHealth | undefined > ,
282282 addServer : {
@@ -432,10 +432,10 @@ export function DialogSelectServer() {
432432
433433 const current = createMemo ( ( ) => items ( ) . find ( ( x ) => ServerConnection . key ( x ) === server . key ) ?? items ( ) [ 0 ] )
434434 const canEditInbound = createMemo (
435- ( ) => ! ! platform . getInboundServerConfig && ! ! platform . setInboundServerConfig && server . list . some ( ( item ) => item . type === "sidecar" ) ,
435+ ( ) => ! ! platform . getLocalServerConfig && ! ! platform . setLocalServerConfig && server . list . some ( ( item ) => item . type === "sidecar" ) ,
436436 )
437437 const localServerDetails = createMemo ( ( ) => {
438- const config = platform . inboundRuntimeServerConfig ?.( )
438+ const config = platform . localServerRuntimeConfig ?.( )
439439 if ( ! config ?. enabled || config . port === null ) return
440440 return {
441441 name : "Local Server" ,
@@ -598,7 +598,7 @@ export function DialogSelectServer() {
598598 status : store . status [ ServerConnection . key ( conn ) ] ?. healthy ,
599599 } )
600600 }
601- const syncInboundForm = ( config : InboundServerConfig ) => {
601+ const syncInboundForm = ( config : LocalServerConfig ) => {
602602 setStore ( "inboundServer" , {
603603 open : true ,
604604 enabled : config . enabled ,
@@ -613,7 +613,7 @@ export function DialogSelectServer() {
613613 const startInboundEdit = ( ) => {
614614 resetAdd ( )
615615 resetEdit ( )
616- const config = savedInboundConfig ( ) ?? inboundConfig . latest
616+ const config = savedLocalServerConfig ( ) ?? localServerConfig . latest
617617 if ( config ) {
618618 syncInboundForm ( config )
619619 return
@@ -644,7 +644,7 @@ export function DialogSelectServer() {
644644 } )
645645 }
646646 const saveInboundConfig = async ( ) => {
647- if ( ! platform . setInboundServerConfig ) return
647+ if ( ! platform . setLocalServerConfig ) return
648648
649649 const port = parseInboundPort ( store . inboundServer . port )
650650 if ( store . inboundServer . enabled && port === null ) {
@@ -664,7 +664,7 @@ export function DialogSelectServer() {
664664 password : store . inboundServer . password . trim ( ) ,
665665 port : port ?? null ,
666666 }
667- const current = savedInboundConfig ( ) ?? inboundConfig . latest
667+ const current = savedLocalServerConfig ( ) ?? localServerConfig . latest
668668 const changed =
669669 ! current ||
670670 current . enabled !== next . enabled ||
@@ -679,8 +679,8 @@ export function DialogSelectServer() {
679679
680680 setStore ( "inboundServer" , "saving" , true )
681681 try {
682- await platform . setInboundServerConfig ( next )
683- setSavedInboundConfig ( next )
682+ await platform . setLocalServerConfig ( next )
683+ setSavedLocalServerConfig ( next )
684684 showToast ( {
685685 variant : "success" ,
686686 icon : "circle-check" ,
@@ -745,7 +745,7 @@ export function DialogSelectServer() {
745745 } )
746746 createEffect ( ( ) => {
747747 if ( ! store . inboundServer . open || store . inboundServer . hydrated ) return
748- const config = savedInboundConfig ( ) ?? inboundConfig ( )
748+ const config = savedLocalServerConfig ( ) ?? localServerConfig ( )
749749 if ( ! config ) return
750750 syncInboundForm ( config )
751751 } )
@@ -791,7 +791,7 @@ export function DialogSelectServer() {
791791 port = { store . inboundServer . port }
792792 portError = { store . inboundServer . portError }
793793 busy = { store . inboundServer . saving }
794- loading = { inboundConfig . state === "pending" }
794+ loading = { localServerConfig . state === "pending" }
795795 onEnabledChange = { setInboundEnabled }
796796 onUsernameChange = { ( value ) => setStore ( "inboundServer" , "username" , value ) }
797797 onPasswordChange = { ( value ) => setStore ( "inboundServer" , "password" , value ) }
0 commit comments