mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-28 22:18:43 -06:00
okokokokokok
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user