Moar Standard Site Tweaks (#10641)
(cherry picked from commit af04e8b496)
This commit is contained in:
@@ -6,6 +6,7 @@ import {Trans, useLingui} from '@lingui/react/macro'
|
||||
import {makeProfileLink} from '#/lib/routes/links'
|
||||
import {toNiceDomain} from '#/lib/strings/url-helpers'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {StandardSite} from '#/components/icons/community/StandardSite'
|
||||
import {InlineLinkText} from '#/components/Link'
|
||||
import {
|
||||
matchStandardSitePublisher,
|
||||
@@ -46,10 +47,10 @@ export function StandardSiteMetaRow({
|
||||
: undefined
|
||||
const articleDomain = toNiceDomain(view.uri)
|
||||
const articlePublisher = matchStandardSitePublisherByUri(view.uri)
|
||||
const DomainIcon = articlePublisher?.Icon
|
||||
const DomainIcon = articlePublisher?.Icon || StandardSite
|
||||
const metaTextStyle = [
|
||||
a.text_xs,
|
||||
a.leading_snug,
|
||||
a.leading_tight,
|
||||
t.atoms.text_contrast_medium,
|
||||
]
|
||||
|
||||
@@ -59,11 +60,11 @@ export function StandardSiteMetaRow({
|
||||
items.push({
|
||||
key: 'domain',
|
||||
node: (
|
||||
<View style={[a.flex_row, a.align_center]}>
|
||||
<View style={[a.flex_shrink, a.flex_row, a.align_center, a.gap_2xs]}>
|
||||
{DomainIcon && (
|
||||
<DomainIcon size="sm" fill={t.atoms.text_contrast_medium.color} />
|
||||
<DomainIcon size="xs" fill={t.atoms.text_contrast_medium.color} />
|
||||
)}
|
||||
<Text numberOfLines={1} style={metaTextStyle}>
|
||||
<Text numberOfLines={1} style={[metaTextStyle, a.flex_shrink]}>
|
||||
{articleDomain}
|
||||
</Text>
|
||||
</View>
|
||||
@@ -75,7 +76,7 @@ export function StandardSiteMetaRow({
|
||||
items.push({
|
||||
key: 'author',
|
||||
node: (
|
||||
<Text numberOfLines={1} style={metaTextStyle}>
|
||||
<Text numberOfLines={1} style={[metaTextStyle]}>
|
||||
<Trans>
|
||||
by{' '}
|
||||
<InlineLinkText
|
||||
@@ -85,7 +86,9 @@ export function StandardSiteMetaRow({
|
||||
metaTextStyle,
|
||||
preview ? a.pointer_events_none : a.pointer_events_auto,
|
||||
]}
|
||||
onPress={() => {
|
||||
onPress={e => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
ax.metric('embed:standardSite:authorHandle:press', {
|
||||
handle: authorProfile.handle,
|
||||
})
|
||||
|
||||
@@ -356,7 +356,12 @@ export function PublicationCard({
|
||||
<View style={[a.flex_1, a.gap_2xs]}>
|
||||
<Text
|
||||
numberOfLines={1}
|
||||
style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
||||
style={[
|
||||
a.text_md,
|
||||
a.font_semi_bold,
|
||||
t.atoms.text,
|
||||
a.leading_snug,
|
||||
]}>
|
||||
{view.source?.title}
|
||||
</Text>
|
||||
<StandardSiteMetaRow
|
||||
@@ -615,6 +620,7 @@ export function PublicationFooter({
|
||||
style={[
|
||||
a.text_sm,
|
||||
a.font_medium,
|
||||
a.leading_tight,
|
||||
t.atoms.text,
|
||||
interacted && a.underline,
|
||||
]}>
|
||||
|
||||
Reference in New Issue
Block a user