feat(mobile): tighter picture video notification entry item

This commit is contained in:
DIYgod 2025-04-04 00:04:23 +08:00
parent d5b579f4f4
commit da7bfef51a
No known key found for this signature in database
2 changed files with 18 additions and 12 deletions

View File

@ -49,18 +49,18 @@ export const EntryGridFooter = ({
if (!entry) return null
return (
<View className={cn("my-2 px-2", view === FeedViewType.Videos && "h-[64]")}>
<View className="flex-row gap-2">
<View className={cn("my-1 px-1", view === FeedViewType.Videos && "h-[52]")}>
<View className="flex-row gap-1">
<ReAnimated.View
className="bg-red mt-2 inline-block rounded-full"
className="bg-red mt-1.5 inline-block rounded-full"
style={unreadIndicatorStyle}
/>
{entry.title && (
<EntryTranslation
numberOfLines={2}
className={cn(
"text-label shrink text-base font-medium",
view === FeedViewType.Videos && "min-h-12",
"text-label shrink text-sm font-medium",
view === FeedViewType.Videos && "min-h-10",
descriptionClassName,
)}
source={entry.title}
@ -70,12 +70,12 @@ export const EntryGridFooter = ({
/>
)}
</View>
<View className="mt-1 flex-row items-center gap-1">
<FeedIcon fallback feed={feed} size={16} />
<Text numberOfLines={1} className="text-label shrink text-sm font-medium">
<View className="mt-1 flex-row items-center gap-1.5">
<FeedIcon fallback feed={feed} size={14} />
<Text numberOfLines={1} className="text-label shrink text-xs font-medium">
{feed?.title}
</Text>
<RelativeDateTime className="text-secondary-label" date={entry.publishedAt} />
<RelativeDateTime className="text-secondary-label text-xs" date={entry.publishedAt} />
</View>
</View>
)

View File

@ -100,7 +100,10 @@ export function EntryNormalItem({ entryId, extraData }: { entryId: string; extra
<ItemPressable
touchHighlight={false}
itemStyle={ItemPressableStyle.Plain}
className="flex flex-row items-center p-4 pl-6"
className={cn(
view === FeedViewType.Notifications ? "p-2" : "p-4",
"flex flex-row items-center pl-6",
)}
onPress={handlePress}
>
<ReAnimated.View
@ -110,7 +113,7 @@ export function EntryNormalItem({ entryId, extraData }: { entryId: string; extra
<View className="flex-1 space-y-2">
<View className="mb-1 flex-1 flex-row items-center gap-1.5 pr-2">
<FeedIcon fallback feed={feed} size={16} />
<FeedIcon fallback feed={feed} size={view === FeedViewType.Notifications ? 14 : 16} />
<Text numberOfLines={1} className="text-secondary-label shrink text-sm font-medium">
{feed?.title || from || "Unknown feed"}
</Text>
@ -131,7 +134,10 @@ export function EntryNormalItem({ entryId, extraData }: { entryId: string; extra
{!!entry.title && (
<EntryTranslation
numberOfLines={2}
className="text-label text-lg font-semibold"
className={cn(
view === FeedViewType.Notifications ? "text-base" : "text-lg",
"text-label font-semibold",
)}
source={entry.title}
target={translation?.title}
showTranslation={!!entry.settings?.translation}