mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-17 09:53:02 +01:00
fix: hide tags dropdown when no tags are available
Prevents the tags selection UI from rendering when the service has no tags configured. Wraps the tags dropdown component in a conditional check to only display when tags exist in the default service details, avoiding empty or broken UI states.
This commit is contained in:
@@ -372,32 +372,35 @@ const RequestModal = forwardRef<
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View className='flex flex-col'>
|
{defaultServiceDetails?.tags &&
|
||||||
<Text className='opacity-50 mb-1 text-xs'>
|
defaultServiceDetails.tags.length > 0 && (
|
||||||
{t("seerr.tags")}
|
<View className='flex flex-col'>
|
||||||
</Text>
|
<Text className='opacity-50 mb-1 text-xs'>
|
||||||
<PlatformDropdown
|
{t("seerr.tags")}
|
||||||
groups={tagsOptions}
|
</Text>
|
||||||
trigger={
|
<PlatformDropdown
|
||||||
<View className='bg-neutral-900 h-10 rounded-xl border-neutral-800 border px-3 py-2 flex flex-row items-center justify-between'>
|
groups={tagsOptions}
|
||||||
<Text numberOfLines={1}>
|
trigger={
|
||||||
{requestOverrides.tags
|
<View className='bg-neutral-900 h-10 rounded-xl border-neutral-800 border px-3 py-2 flex flex-row items-center justify-between'>
|
||||||
? defaultServiceDetails.tags
|
<Text numberOfLines={1}>
|
||||||
.filter((t) =>
|
{requestOverrides.tags
|
||||||
requestOverrides.tags!.includes(t.id),
|
? defaultServiceDetails.tags
|
||||||
)
|
.filter((t) =>
|
||||||
.map((t) => t.label)
|
requestOverrides.tags!.includes(t.id),
|
||||||
.join(", ") ||
|
)
|
||||||
defaultTags.map((t) => t.label).join(", ")
|
.map((t) => t.label)
|
||||||
: defaultTags.map((t) => t.label).join(", ")}
|
.join(", ") ||
|
||||||
</Text>
|
defaultTags.map((t) => t.label).join(", ")
|
||||||
</View>
|
: defaultTags.map((t) => t.label).join(", ")}
|
||||||
}
|
</Text>
|
||||||
title={t("seerr.tags")}
|
</View>
|
||||||
open={tagsOpen}
|
}
|
||||||
onOpenChange={setTagsOpen}
|
title={t("seerr.tags")}
|
||||||
/>
|
open={tagsOpen}
|
||||||
</View>
|
onOpenChange={setTagsOpen}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
<View className='flex flex-col'>
|
<View className='flex flex-col'>
|
||||||
<Text className='opacity-50 mb-1 text-xs'>
|
<Text className='opacity-50 mb-1 text-xs'>
|
||||||
|
|||||||
Reference in New Issue
Block a user