move newskie to handle
(cherry picked from commit 150f2635b2)
(cherry picked from commit 1efaaf835380f4e76d2e4b7fe8b727a92731a794)
This commit is contained in:
@@ -33,7 +33,7 @@ export function NewskieDialog({
|
|||||||
)}
|
)}
|
||||||
hitSlop={HITSLOP_10}
|
hitSlop={HITSLOP_10}
|
||||||
onPress={control.open}>
|
onPress={control.open}>
|
||||||
<Newskie size={32} />
|
<Newskie size={22} />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|
||||||
<Dialog.Outer control={control}>
|
<Dialog.Outer control={control}>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {View} from 'react-native'
|
|||||||
import Svg, {Path} from 'react-native-svg'
|
import Svg, {Path} from 'react-native-svg'
|
||||||
export function Newskie({size}: {size: number}) {
|
export function Newskie({size}: {size: number}) {
|
||||||
return (
|
return (
|
||||||
<View style={{height: size / 0.6, width: size}}>
|
<View style={{height: size, width: size}}>
|
||||||
<Svg fill="none" viewBox="0 0 21 11">
|
<Svg fill="none" viewBox="0 0 21 11">
|
||||||
<Path
|
<Path
|
||||||
fill="#FFC404"
|
fill="#FFC404"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {Shadow} from '#/state/cache/types'
|
|||||||
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
||||||
import {sanitizeHandle} from 'lib/strings/handles'
|
import {sanitizeHandle} from 'lib/strings/handles'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {NewskieDialog} from '#/components/StarterPack/NewskieDialog'
|
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function ProfileHeaderDisplayName({
|
export function ProfileHeaderDisplayName({
|
||||||
@@ -18,7 +17,7 @@ export function ProfileHeaderDisplayName({
|
|||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
return (
|
return (
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_md]}>
|
<View>
|
||||||
<Text
|
<Text
|
||||||
testID="profileHeaderDisplayName"
|
testID="profileHeaderDisplayName"
|
||||||
style={[t.atoms.text, a.text_4xl, {fontWeight: '500'}]}>
|
style={[t.atoms.text, a.text_4xl, {fontWeight: '500'}]}>
|
||||||
@@ -27,9 +26,6 @@ export function ProfileHeaderDisplayName({
|
|||||||
moderation.ui('displayName'),
|
moderation.ui('displayName'),
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<View style={[a.h_full]}>
|
|
||||||
<NewskieDialog profile={profile} />
|
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import {Trans} from '@lingui/macro'
|
|||||||
|
|
||||||
import {Shadow} from '#/state/cache/types'
|
import {Shadow} from '#/state/cache/types'
|
||||||
import {isInvalidHandle} from 'lib/strings/handles'
|
import {isInvalidHandle} from 'lib/strings/handles'
|
||||||
|
import {isAndroid} from 'platform/detection'
|
||||||
import {atoms as a, useTheme, web} from '#/alf'
|
import {atoms as a, useTheme, web} from '#/alf'
|
||||||
|
import {NewskieDialog} from '#/components/StarterPack/NewskieDialog'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function ProfileHeaderHandle({
|
export function ProfileHeaderHandle({
|
||||||
@@ -17,7 +19,12 @@ export function ProfileHeaderHandle({
|
|||||||
const invalidHandle = isInvalidHandle(profile.handle)
|
const invalidHandle = isInvalidHandle(profile.handle)
|
||||||
const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy
|
const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy
|
||||||
return (
|
return (
|
||||||
<View style={[a.flex_row, a.gap_xs, a.align_center]} pointerEvents="none">
|
<View
|
||||||
|
style={[a.flex_row, a.gap_xs, a.align_center]}
|
||||||
|
pointerEvents={isAndroid ? 'box-only' : 'auto'}>
|
||||||
|
<View style={[a.mr_xs]}>
|
||||||
|
<NewskieDialog profile={profile} />
|
||||||
|
</View>
|
||||||
{profile.viewer?.followedBy && !blockHide ? (
|
{profile.viewer?.followedBy && !blockHide ? (
|
||||||
<View style={[t.atoms.bg_contrast_25, a.rounded_xs, a.px_sm, a.py_xs]}>
|
<View style={[t.atoms.bg_contrast_25, a.rounded_xs, a.px_sm, a.py_xs]}>
|
||||||
<Text style={[t.atoms.text, a.text_sm]}>
|
<Text style={[t.atoms.text, a.text_sm]}>
|
||||||
|
|||||||
Reference in New Issue
Block a user