diff options
author | Kuwa Lee <kuwalee1069@gmail.com> | 2024-06-20 16:26:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 16:26:22 +0800 |
commit | a33e370d229ef406363e389b8cdfd05c1785d573 (patch) | |
tree | 599a1ef4a71e1cd5ebfe4007eec4b4c737a42bbb /src/view/com/post-thread/PostThreadItem.tsx | |
parent | 7deea7ddd450071f702f3aaf52a7763012e4e370 (diff) | |
parent | 80197556f176723b619349dc060d1b7001472d47 (diff) | |
download | voidsky-a33e370d229ef406363e389b8cdfd05c1785d573.tar.zst |
Merge branch 'bluesky-social:main' into zh
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 6d03029d7..92b529db7 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -25,7 +25,7 @@ import {sanitizeHandle} from 'lib/strings/handles' import {countLines} from 'lib/strings/helpers' import {niceDate} from 'lib/strings/time' import {s} from 'lib/styles' -import {isNative, isWeb} from 'platform/detection' +import {isWeb} from 'platform/detection' import {useSession} from 'state/session' import {PostThreadFollowBtn} from 'view/com/post-thread/PostThreadFollowBtn' import {atoms as a} from '#/alf' @@ -35,7 +35,7 @@ import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe' import {PostAlerts} from '../../../components/moderation/PostAlerts' import {PostHider} from '../../../components/moderation/PostHider' import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers' -import {WhoCanReply} from '../threadgate/WhoCanReply' +import {WhoCanReplyBlock, WhoCanReplyInline} from '../threadgate/WhoCanReply' import {ErrorMessage} from '../util/error/ErrorMessage' import {Link, TextLink} from '../util/Link' import {formatCount} from '../util/numeric/format' @@ -340,6 +340,7 @@ let PostThreadItemLoaded = ({ </ContentHider> <ExpandedPostDetails post={post} + isThreadAuthor={isThreadAuthor} translatorUrl={translatorUrl} needsTranslation={needsTranslation} /> @@ -396,11 +397,6 @@ let PostThreadItemLoaded = ({ </View> </View> </View> - <WhoCanReply - post={post} - isThreadAuthor={isThreadAuthor} - style={{borderBottomWidth: isNative ? 1 : 0}} - /> </> ) } else { @@ -579,14 +575,7 @@ let PostThreadItemLoaded = ({ ) : undefined} </PostHider> </PostOuterWrapper> - <WhoCanReply - post={post} - style={{ - marginTop: 4, - borderBottomWidth: 1, - }} - isThreadAuthor={isThreadAuthor} - /> + <WhoCanReplyBlock post={post} isThreadAuthor={isThreadAuthor} /> </> ) } @@ -654,10 +643,12 @@ function PostOuterWrapper({ function ExpandedPostDetails({ post, + isThreadAuthor, needsTranslation, translatorUrl, }: { post: AppBskyFeedDefs.PostView + isThreadAuthor: boolean needsTranslation: boolean translatorUrl: string }) { @@ -670,14 +661,23 @@ function ExpandedPostDetails({ }, [openLink, translatorUrl]) return ( - <View style={[s.flexRow, s.mt2, s.mb10]}> - <Text style={pal.textLight}>{niceDate(post.indexedAt)}</Text> + <View + style={[ + a.flex_row, + a.align_center, + a.flex_wrap, + a.gap_sm, + s.mt2, + s.mb10, + ]}> + <Text style={[a.text_sm, pal.textLight]}>{niceDate(post.indexedAt)}</Text> + <WhoCanReplyInline post={post} isThreadAuthor={isThreadAuthor} /> {needsTranslation && ( <> - <Text style={pal.textLight}> · </Text> + <Text style={[a.text_sm, pal.textLight]}>·</Text> <Text - style={pal.link} + style={[a.text_sm, pal.link]} title={_(msg`Translate`)} onPress={onTranslatePress}> <Trans>Translate</Trans> |