diff --git a/api/queries/functions/images.ts b/api/queries/functions/images.ts index dd9b4ba1..fccfba00 100644 --- a/api/queries/functions/images.ts +++ b/api/queries/functions/images.ts @@ -23,7 +23,7 @@ function convertFileToBase64(file: File): Promise { reader.onloadend = () => { if (!_.isEmpty(reader.result)) - resolve(reader.result.toString()) + resolve(Buffer.from(reader.result as ArrayBuffer).toString()) else reject(new Error("Unable to convert file to base64")); } diff --git a/components/Settings/helpers/account-details.tsx b/components/Settings/helpers/account-details.tsx index d641046c..40b93ad8 100644 --- a/components/Settings/helpers/account-details.tsx +++ b/components/Settings/helpers/account-details.tsx @@ -11,7 +11,7 @@ export default function AccountDetails(): React.JSX.Element { return ( - + {user!.name} diff --git a/components/Settings/helpers/server-details.tsx b/components/Settings/helpers/server-details.tsx new file mode 100644 index 00000000..8f7ae307 --- /dev/null +++ b/components/Settings/helpers/server-details.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import { useApiClientContext } from "../../jellyfin-api-provider"; +import { Text } from "react-native"; +import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; +import { XStack, YStack } from "tamagui"; +import { Colors } from "../../../enums/colors"; + +export default function ServerDetails() : React.JSX.Element { + + const { server, apiClient } = useApiClientContext(); + + return ( + + + + + + + {server!.url} + + + ) +} \ No newline at end of file diff --git a/components/Settings/screens/root.tsx b/components/Settings/screens/root.tsx index 86715c3d..e746872b 100644 --- a/components/Settings/screens/root.tsx +++ b/components/Settings/screens/root.tsx @@ -3,6 +3,7 @@ import { SafeAreaView } from "react-native"; import { ScrollView, Separator } from "tamagui"; import AccountDetails from "../helpers/account-details"; import SignOut from "../helpers/sign-out"; +import ServerDetails from "../helpers/server-details"; export default function Root() : React.JSX.Element { return ( @@ -10,6 +11,8 @@ export default function Root() : React.JSX.Element { + + diff --git a/components/tabs.tsx b/components/tabs.tsx index 1f694f22..01a2a16c 100644 --- a/components/tabs.tsx +++ b/components/tabs.tsx @@ -25,10 +25,10 @@ export function Tabs() { name="Home" component={Home} options={{ + headerShown: false, tabBarIcon: ({ color, size }) => ( ), - headerShown: false }} /> @@ -36,6 +36,7 @@ export function Tabs() { name="Library" component={Library} options={{ + headerShown: false, tabBarIcon: ({color, size }) => ( ) @@ -56,6 +57,7 @@ export function Tabs() { name="Discover" component={Discover} options={{ + headerShown: false, tabBarIcon: ({ color, size }) => ( ) @@ -66,6 +68,7 @@ export function Tabs() { name="Settings" component={Settings} options={{ + headerShown: false, tabBarIcon: ({ color, size }) => ( )