rename feature

This commit is contained in:
Samuel Newman
2025-06-04 19:58:09 +03:00
parent 6a423fbb61
commit a446bdd2fe
3 changed files with 26 additions and 10 deletions
@@ -29,8 +29,8 @@ export function SubscribeProfileButton({
const wrappedOnPress = requireEmailVerification(onPress, {
instructions: [
<Trans key="message">
Before you can subscribe to {name}'s posts, you must first verify your
email.
Before you can get notifications for {name}'s posts, you must first
verify your email.
</Trans>,
],
})
@@ -44,7 +44,7 @@ export function SubscribeProfileButton({
color="secondary"
variant="solid"
shape="round"
label={_(msg`Subscribe to ${name}'s posts`)}
label={_(msg`Get notified when ${name} posts`)}
style={[a.justify_center]}
onPress={wrappedOnPress}>
<ButtonIcon icon={NotificationIcon} size="md" />
@@ -29,13 +29,18 @@ export function SubscribeProfileDialog({
function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
const {_} = useLingui()
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 {posts, replies} = state
const {posts, replies, corn} = state
const res = []
if (posts) res.push('posts')
if (replies) res.push('replies')
if (corn) res.push('corn')
return res
}, [state])
@@ -43,6 +48,7 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
setState({
posts: newValues.includes('posts'),
replies: newValues.includes('replies'),
corn: newValues.includes('corn'),
})
const name = createSanitizedDisplayName(profile, false)
@@ -50,19 +56,19 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
return (
<Dialog.ScrollableInner
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_xs]}>
<Text style={[a.font_heavy, a.text_2xl]}>
<Trans>Subscribe to {name}</Trans>
<Trans>Get notified!</Trans>
</Text>
<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>
</View>
<Toggle.Group
label={_(msg`Subscribe to account`)}
label={_(msg`Subscribe to account activity`)}
values={values}
onChange={onChange}>
<View style={[a.gap_sm]}>
@@ -86,6 +92,16 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) {
</Toggle.LabelText>
<Toggle.Platform />
</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>
</Toggle.Group>
</View>
@@ -24,6 +24,7 @@ import {useRequireAuth, useSession} from '#/state/session'
import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf'
import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import {useDialogControl} from '#/components/Dialog'
import {MessageProfileButton} from '#/components/dms/MessageProfileButton'
@@ -32,7 +33,6 @@ import {
KnownFollowers,
shouldShowKnownFollowers,
} from '#/components/KnownFollowers'
import {SubscribeProfileButton} from '#/components/post-subscriptions/SubscribeProfileButton'
import * as Prompt from '#/components/Prompt'
import {RichText} from '#/components/RichText'
import {Text} from '#/components/Typography'