mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Fix subtitle dropdown UI defacement by improving text handling
Co-authored-by: lostb1t <168401+lostb1t@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { MediaSourceInfo } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { useMemo } from "react";
|
||||
import { Platform, TouchableOpacity, View } from "react-native";
|
||||
import { tc } from "@/utils/textTools";
|
||||
|
||||
const DropdownMenu = !Platform.isTV ? require("zeego/dropdown-menu") : null;
|
||||
|
||||
@@ -37,7 +36,7 @@ export const SubtitleTrackSelector: React.FC<Props> = ({
|
||||
className='flex col shrink justify-start place-self-start items-start'
|
||||
style={{
|
||||
minWidth: 60,
|
||||
maxWidth: 200,
|
||||
maxWidth: 220,
|
||||
}}
|
||||
>
|
||||
<DropdownMenu.Root>
|
||||
@@ -47,10 +46,8 @@ export const SubtitleTrackSelector: React.FC<Props> = ({
|
||||
{t("item_card.subtitles")}
|
||||
</Text>
|
||||
<TouchableOpacity className='bg-neutral-900 h-10 rounded-xl border-neutral-800 border px-3 py-2 flex flex-row items-center justify-between'>
|
||||
<Text className=' '>
|
||||
{selectedSubtitleSteam
|
||||
? tc(selectedSubtitleSteam?.DisplayTitle, 7)
|
||||
: t("item_card.none")}
|
||||
<Text className=' ' numberOfLines={1}>
|
||||
{selectedSubtitleSteam?.DisplayTitle || t("item_card.none")}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user