rename feature
This commit is contained in:
+3
-3
@@ -29,8 +29,8 @@ export function SubscribeProfileButton({
|
|||||||
const wrappedOnPress = requireEmailVerification(onPress, {
|
const wrappedOnPress = requireEmailVerification(onPress, {
|
||||||
instructions: [
|
instructions: [
|
||||||
<Trans key="message">
|
<Trans key="message">
|
||||||
Before you can subscribe to {name}'s posts, you must first verify your
|
Before you can get notifications for {name}'s posts, you must first
|
||||||
email.
|
verify your email.
|
||||||
</Trans>,
|
</Trans>,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@@ -44,7 +44,7 @@ export function SubscribeProfileButton({
|
|||||||
color="secondary"
|
color="secondary"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
shape="round"
|
shape="round"
|
||||||
label={_(msg`Subscribe to ${name}'s posts`)}
|
label={_(msg`Get notified when ${name} posts`)}
|
||||||
style={[a.justify_center]}
|
style={[a.justify_center]}
|
||||||
onPress={wrappedOnPress}>
|
onPress={wrappedOnPress}>
|
||||||
<ButtonIcon icon={NotificationIcon} size="md" />
|
<ButtonIcon icon={NotificationIcon} size="md" />
|
||||||
+22
-6
@@ -29,13 +29,18 @@ export function SubscribeProfileDialog({
|
|||||||
function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
|
function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const [state, setState] = useState({posts: false, replies: false})
|
const [state, setState] = useState({
|
||||||
|
posts: false,
|
||||||
|
replies: false,
|
||||||
|
corn: false,
|
||||||
|
})
|
||||||
|
|
||||||
const values = useMemo(() => {
|
const values = useMemo(() => {
|
||||||
const {posts, replies} = state
|
const {posts, replies, corn} = state
|
||||||
const res = []
|
const res = []
|
||||||
if (posts) res.push('posts')
|
if (posts) res.push('posts')
|
||||||
if (replies) res.push('replies')
|
if (replies) res.push('replies')
|
||||||
|
if (corn) res.push('corn')
|
||||||
return res
|
return res
|
||||||
}, [state])
|
}, [state])
|
||||||
|
|
||||||
@@ -43,6 +48,7 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
|
|||||||
setState({
|
setState({
|
||||||
posts: newValues.includes('posts'),
|
posts: newValues.includes('posts'),
|
||||||
replies: newValues.includes('replies'),
|
replies: newValues.includes('replies'),
|
||||||
|
corn: newValues.includes('corn'),
|
||||||
})
|
})
|
||||||
|
|
||||||
const name = createSanitizedDisplayName(profile, false)
|
const name = createSanitizedDisplayName(profile, false)
|
||||||
@@ -50,19 +56,19 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
|
|||||||
return (
|
return (
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
style={web({maxWidth: 400})}
|
style={web({maxWidth: 400})}
|
||||||
label={_(msg`Subscribe to posts`)}>
|
label={_(msg`Get notified of new posts from ${name}`)}>
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
<View style={[a.gap_xs]}>
|
<View style={[a.gap_xs]}>
|
||||||
<Text style={[a.font_heavy, a.text_2xl]}>
|
<Text style={[a.font_heavy, a.text_2xl]}>
|
||||||
<Trans>Subscribe to {name}</Trans>
|
<Trans>Get notified!</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
|
||||||
<Trans>Get notifications for account activity</Trans>
|
<Trans>Receive notifications when {name} posts</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Toggle.Group
|
<Toggle.Group
|
||||||
label={_(msg`Subscribe to account`)}
|
label={_(msg`Subscribe to account activity`)}
|
||||||
values={values}
|
values={values}
|
||||||
onChange={onChange}>
|
onChange={onChange}>
|
||||||
<View style={[a.gap_sm]}>
|
<View style={[a.gap_sm]}>
|
||||||
@@ -86,6 +92,16 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
|
|||||||
</Toggle.LabelText>
|
</Toggle.LabelText>
|
||||||
<Toggle.Platform />
|
<Toggle.Platform />
|
||||||
</Toggle.Item>
|
</Toggle.Item>
|
||||||
|
<Toggle.Item
|
||||||
|
label={_(msg`Corn facts`)}
|
||||||
|
name="corn"
|
||||||
|
style={[a.justify_between, a.py_xs]}>
|
||||||
|
<Toggle.LabelText
|
||||||
|
style={[t.atoms.text, a.font_normal, a.text_md]}>
|
||||||
|
<Trans>Corn facts</Trans>
|
||||||
|
</Toggle.LabelText>
|
||||||
|
<Toggle.Platform />
|
||||||
|
</Toggle.Item>
|
||||||
</View>
|
</View>
|
||||||
</Toggle.Group>
|
</Toggle.Group>
|
||||||
</View>
|
</View>
|
||||||
@@ -24,6 +24,7 @@ import {useRequireAuth, useSession} from '#/state/session'
|
|||||||
import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
|
import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf'
|
||||||
|
import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {MessageProfileButton} from '#/components/dms/MessageProfileButton'
|
import {MessageProfileButton} from '#/components/dms/MessageProfileButton'
|
||||||
@@ -32,7 +33,6 @@ import {
|
|||||||
KnownFollowers,
|
KnownFollowers,
|
||||||
shouldShowKnownFollowers,
|
shouldShowKnownFollowers,
|
||||||
} from '#/components/KnownFollowers'
|
} from '#/components/KnownFollowers'
|
||||||
import {SubscribeProfileButton} from '#/components/post-subscriptions/SubscribeProfileButton'
|
|
||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|||||||
Reference in New Issue
Block a user