okokokokokok

This commit is contained in:
Violet Caulfield
2024-10-18 18:44:18 -05:00
parent 9587d3e802
commit 9f020a2ead
2 changed files with 23 additions and 23 deletions

View File

@@ -53,26 +53,24 @@ export default function ServerAddress(): React.JSX.Element {
});
return (
<View>
<YStack flex={4} alignContent='center'>
<SizableText flex={1} style={{ fontSize: 25, fontWeight: '800' }}>Connect to Jellyfin</SizableText>
<XStack flex={2}>
<SwitchWithLabel checked={useHttps} onCheckedChange={(checked) => setUseHttps(checked)} label="HTTPS" size="$2" />
<Input
flex={4}
placeholder="jellyfin.org"
onChangeText={setServerAddress}
>
</Input>
</XStack>
<Button
flex={1}
onPress={() => {
useServerMutation.mutate(`${useHttps ? "https" : "http"}://${serverAddress}`);
}}>
Connect
</Button>
</YStack>
</View>
<YStack flex={4} alignContent='center'>
<SizableText flex={1} style={{ fontSize: 25, fontWeight: '800' }}>Connect to Jellyfin</SizableText>
<XStack flex={2}>
<SwitchWithLabel checked={useHttps} onCheckedChange={(checked) => setUseHttps(checked)} label="HTTPS" size="$2" />
<Input
flex={4}
placeholder="jellyfin.org"
onChangeText={setServerAddress}
>
</Input>
</XStack>
<Button
flex={1}
onPress={() => {
useServerMutation.mutate(`${useHttps ? "https" : "http"}://${serverAddress}`);
}}>
Connect
</Button>
</YStack>
)
}

View File

@@ -4,7 +4,7 @@ import { setupPlayer } from "react-native-track-player/lib/src/trackPlayer";
import _ from "lodash";
import { JellyfinApiClientProvider, useApiClientContext } from "./jellyfin-api-provider";
import React, { } from "react";
import { NavigationContainer, useTheme } from "@react-navigation/native";
import { DarkTheme, DefaultTheme, NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Navigation from "./navigation";
import Login from "./Login/component";
@@ -30,6 +30,8 @@ export default function Jellify(): React.JSX.Element {
function conditionalHomeRender(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
const { libraryId } = useApiClientContext();
const Stack = createNativeStackNavigator()
@@ -37,7 +39,7 @@ function conditionalHomeRender(): React.JSX.Element {
const Tab = createBottomTabNavigator();
return (
<NavigationContainer theme={useTheme()}>
<NavigationContainer theme={isDarkMode ? DarkTheme : DefaultTheme}>
{ !_.isUndefined(libraryId) ? (
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Tab.Screen name="Navigation" options={{ headerShown: false }} component={Navigation} />