mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-05 05:28:37 +01:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user