feat(settings): unify Local network + Companion server URLs via the resolver

- Local network LAN URL -> ServerUrlField + jellyfinProbe (picks http on LAN, confirms it's the Jellyfin server).

- Companion pairing: resolve the server field on blur (jellyfinProbe) + status line, keeping the existing form styling (hook, not the block field).
This commit is contained in:
Gauvain
2026-06-04 20:47:24 +02:00
parent b54b0c670b
commit fb3a994351
2 changed files with 19 additions and 6 deletions

View File

@@ -12,8 +12,9 @@ import {
type LocalNetworkConfig,
updateServerLocalConfig,
} from "@/utils/secureCredentials";
import { jellyfinProbe } from "@/utils/serverUrl/probes/jellyfin";
import { Button } from "../Button";
import { Input } from "../common/Input";
import { ServerUrlField } from "../common/ServerUrlField";
import { Text } from "../common/Text";
import { ListGroup } from "../list/ListGroup";
import { ListItem } from "../list/ListItem";
@@ -162,13 +163,12 @@ export function LocalNetworkSettings(): React.ReactElement | null {
}
>
<View className=''>
<Input
placeholder={t("home.settings.network.local_url_placeholder")}
<ServerUrlField
value={config.localUrl}
onChangeText={handleLocalUrlChange}
keyboardType='url'
autoCapitalize='none'
autoCorrect={false}
onResolved={(url) => saveConfig({ ...config, localUrl: url })}
probe={jellyfinProbe}
placeholder={t("home.settings.network.local_url_placeholder")}
/>
</View>
</ListGroup>