Move to new Post components dir
This commit is contained in:
@@ -4,11 +4,11 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {HITSLOP_10} from '#/lib/constants'
|
import {HITSLOP_10} from '#/lib/constants'
|
||||||
import {atoms as a, flatten, type TextStyleProp,useTheme} from '#/alf'
|
import {atoms as a, flatten, type TextStyleProp, useTheme} from '#/alf'
|
||||||
import {Button} from '#/components/Button'
|
import {Button} from '#/components/Button'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function ShowMore({
|
export function ShowMoreTextButton({
|
||||||
onPress: onPressProp,
|
onPress: onPressProp,
|
||||||
style,
|
style,
|
||||||
}: TextStyleProp & {onPress: () => void}) {
|
}: TextStyleProp & {onPress: () => void}) {
|
||||||
@@ -44,7 +44,8 @@ export function ShowMore({
|
|||||||
textStyle,
|
textStyle,
|
||||||
{
|
{
|
||||||
color: t.palette.primary_500,
|
color: t.palette.primary_500,
|
||||||
opacity: pressed || hovered ? 0.6 : 1,
|
opacity: pressed ? 0.6 : 1,
|
||||||
|
textDecorationLine: hovered ? 'underline' : undefined,
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<Trans>Show More</Trans>
|
<Trans>Show More</Trans>
|
||||||
@@ -37,9 +37,9 @@ import {PostAlerts} from '#/components/moderation/PostAlerts'
|
|||||||
import {PostHider} from '#/components/moderation/PostHider'
|
import {PostHider} from '#/components/moderation/PostHider'
|
||||||
import {type AppModerationCause} from '#/components/Pills'
|
import {type AppModerationCause} from '#/components/Pills'
|
||||||
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
||||||
|
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||||
import {PostControls} from '#/components/PostControls'
|
import {PostControls} from '#/components/PostControls'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ShowMore} from '#/components/ShowMore'
|
|
||||||
import * as Skele from '#/components/Skeleton'
|
import * as Skele from '#/components/Skeleton'
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -310,7 +310,10 @@ const ThreadItemPostInner = memo(function ThreadItemPostInner({
|
|||||||
shouldProxyLinks={true}
|
shouldProxyLinks={true}
|
||||||
/>
|
/>
|
||||||
{limitLines && (
|
{limitLines && (
|
||||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
<ShowMoreTextButton
|
||||||
|
style={[a.text_md]}
|
||||||
|
onPress={onPressShowMore}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ import {PostAlerts} from '#/components/moderation/PostAlerts'
|
|||||||
import {PostHider} from '#/components/moderation/PostHider'
|
import {PostHider} from '#/components/moderation/PostHider'
|
||||||
import {type AppModerationCause} from '#/components/Pills'
|
import {type AppModerationCause} from '#/components/Pills'
|
||||||
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
||||||
|
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||||
import {PostControls} from '#/components/PostControls'
|
import {PostControls} from '#/components/PostControls'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ShowMore} from '#/components/ShowMore'
|
|
||||||
import * as Skele from '#/components/Skeleton'
|
import * as Skele from '#/components/Skeleton'
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
@@ -354,7 +354,7 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
|
|||||||
shouldProxyLinks={true}
|
shouldProxyLinks={true}
|
||||||
/>
|
/>
|
||||||
{limitLines && (
|
{limitLines && (
|
||||||
<ShowMore
|
<ShowMoreTextButton
|
||||||
style={[a.text_md]}
|
style={[a.text_md]}
|
||||||
onPress={onPressShowMore}
|
onPress={onPressShowMore}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ import {PostAlerts} from '#/components/moderation/PostAlerts'
|
|||||||
import {PostHider} from '#/components/moderation/PostHider'
|
import {PostHider} from '#/components/moderation/PostHider'
|
||||||
import {type AppModerationCause} from '#/components/Pills'
|
import {type AppModerationCause} from '#/components/Pills'
|
||||||
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
||||||
|
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||||
import {PostControls} from '#/components/PostControls'
|
import {PostControls} from '#/components/PostControls'
|
||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ShowMore} from '#/components/ShowMore'
|
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {VerificationCheckButton} from '#/components/verification/VerificationCheckButton'
|
import {VerificationCheckButton} from '#/components/verification/VerificationCheckButton'
|
||||||
@@ -687,7 +687,10 @@ let PostThreadItemLoaded = ({
|
|||||||
shouldProxyLinks={true}
|
shouldProxyLinks={true}
|
||||||
/>
|
/>
|
||||||
{limitLines && (
|
{limitLines && (
|
||||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
<ShowMoreTextButton
|
||||||
|
style={[a.text_md]}
|
||||||
|
onPress={onPressShowMore}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ import {ContentHider} from '#/components/moderation/ContentHider'
|
|||||||
import {LabelsOnMyPost} from '#/components/moderation/LabelsOnMe'
|
import {LabelsOnMyPost} from '#/components/moderation/LabelsOnMe'
|
||||||
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
||||||
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
import {Embed, PostEmbedViewContext} from '#/components/Post/Embed'
|
||||||
|
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||||
import {PostControls} from '#/components/PostControls'
|
import {PostControls} from '#/components/PostControls'
|
||||||
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ShowMore} from '#/components/ShowMore'
|
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||||
import * as bsky from '#/types/bsky'
|
import * as bsky from '#/types/bsky'
|
||||||
|
|
||||||
@@ -237,7 +237,10 @@ function PostInner({
|
|||||||
shouldProxyLinks={true}
|
shouldProxyLinks={true}
|
||||||
/>
|
/>
|
||||||
{limitLines && (
|
{limitLines && (
|
||||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
<ShowMoreTextButton
|
||||||
|
style={[a.text_md]}
|
||||||
|
onPress={onPressShowMore}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|||||||
@@ -54,11 +54,11 @@ import {PostAlerts} from '#/components/moderation/PostAlerts'
|
|||||||
import {type AppModerationCause} from '#/components/Pills'
|
import {type AppModerationCause} from '#/components/Pills'
|
||||||
import {Embed} from '#/components/Post/Embed'
|
import {Embed} from '#/components/Post/Embed'
|
||||||
import {PostEmbedViewContext} from '#/components/Post/Embed/types'
|
import {PostEmbedViewContext} from '#/components/Post/Embed/types'
|
||||||
|
import {ShowMoreTextButton} from '#/components/Post/ShowMoreTextButton'
|
||||||
import {PostControls} from '#/components/PostControls'
|
import {PostControls} from '#/components/PostControls'
|
||||||
import {DiscoverDebug} from '#/components/PostControls/DiscoverDebug'
|
import {DiscoverDebug} from '#/components/PostControls/DiscoverDebug'
|
||||||
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ShowMore} from '#/components/ShowMore'
|
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
||||||
import * as bsky from '#/types/bsky'
|
import * as bsky from '#/types/bsky'
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ let PostContent = ({
|
|||||||
shouldProxyLinks={true}
|
shouldProxyLinks={true}
|
||||||
/>
|
/>
|
||||||
{limitLines && (
|
{limitLines && (
|
||||||
<ShowMore style={[a.text_md]} onPress={onPressShowMore} />
|
<ShowMoreTextButton style={[a.text_md]} onPress={onPressShowMore} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|||||||
Reference in New Issue
Block a user