mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-06 02:50:30 -06:00
more global components, adding server details
This commit is contained in:
13
components/Global/icon.tsx
Normal file
13
components/Global/icon.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from "react"
|
||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"
|
||||
import { Colors } from "react-native/Libraries/NewAppScreen"
|
||||
|
||||
const iconDimensions = {
|
||||
width: 25,
|
||||
height: 25
|
||||
}
|
||||
|
||||
export default function Icon({ name }: { name: string }) : React.JSX.Element {
|
||||
return <MaterialCommunityIcons color={Colors.Primary} name={name} {...iconDimensions} />
|
||||
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
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 { H5, Text, XStack, YStack } from "tamagui";
|
||||
import { Colors } from "../../../enums/colors";
|
||||
import Icon from "../../Global/icon";
|
||||
|
||||
export default function ServerDetails() : React.JSX.Element {
|
||||
|
||||
@@ -11,13 +11,20 @@ export default function ServerDetails() : React.JSX.Element {
|
||||
|
||||
return (
|
||||
<YStack>
|
||||
<XStack>
|
||||
<MaterialCommunityIcons color={Colors.Primary} name="hand-coin-outline" />
|
||||
</XStack>
|
||||
<XStack>
|
||||
<MaterialCommunityIcons color={Colors.Primary} name="server-network" />
|
||||
<Text>{server!.url}</Text>
|
||||
</XStack>
|
||||
<YStack>
|
||||
<H5>Access Token</H5>
|
||||
<XStack>
|
||||
<Icon name="hand-coin-outline" />
|
||||
<Text>{apiClient!.accessToken}</Text>
|
||||
</XStack>
|
||||
</YStack>
|
||||
<YStack>
|
||||
<H5>Jellyfin Server</H5>
|
||||
<XStack>
|
||||
<Icon name="server-network" />
|
||||
<Text>{server!.url}</Text>
|
||||
</XStack>
|
||||
</YStack>
|
||||
</YStack>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user