clean up some login stuff

This commit is contained in:
Violet Caulfield
2025-01-26 09:12:44 -06:00
parent 9b32f0195d
commit 295aa95df8
3 changed files with 19 additions and 14 deletions
+13 -13
View File
@@ -14,8 +14,7 @@ interface SwitchWithLabelProps {
export function SwitchWithLabel(props: SwitchWithLabelProps) {
const id = `switch-${props.size.toString().slice(1)}-${props.checked ?? ''}}`
return (
<Theme name={"inverted_purple"}>
<XStack alignItems="center" gap="$3">
<XStack alignItems="center" gap="$3">
<Label
size={props.size}
@@ -23,18 +22,19 @@ export function SwitchWithLabel(props: SwitchWithLabelProps) {
>
{props.label}
</Label>
<Separator minHeight={20} vertical />
<Switch
id={id}
size={props.size}
checked={props.checked}
onCheckedChange={(checked: boolean) => props.onCheckedChange(checked)}
backgroundColor={props.backgroundColor ?? Colors.Primary}
>
<Switch.Thumb animation="quicker" />
</Switch>
<Theme name={"inverted_purple"}>
<Separator minHeight={20} vertical />
<Switch
id={id}
size={props.size}
checked={props.checked}
onCheckedChange={(checked: boolean) => props.onCheckedChange(checked)}
backgroundColor={props.backgroundColor ?? Colors.Primary}
>
<Switch.Thumb animation="quicker" />
</Switch>
</Theme>
</XStack>
</Theme>
)
}
+2 -1
View File
@@ -79,7 +79,8 @@ export default function ServerAddress(): React.JSX.Element {
value={serverAddress}
placeholder="jellyfin.org"
onChangeText={setServerAddress}
flexGrow
autoCapitalize="none"
autoCorrect={false}
/>
</XStack>
@@ -68,11 +68,15 @@ export default function ServerAuthentication(): React.JSX.Element {
placeholder="Username"
value={username}
onChangeText={(value) => setUsername(value)}
autoCapitalize="none"
autoCorrect={false}
/>
<Input
placeholder="Password"
value={password}
onChangeText={(value) => setPassword(value)}
autoCapitalize="none"
autoCorrect={false}
secureTextEntry
/>
</YStack>