Swap in approved stuff
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 162 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 118 KiB |
+65
-42
@@ -6,6 +6,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {useNavigation} from '@react-navigation/native'
|
import {useNavigation} from '@react-navigation/native'
|
||||||
|
|
||||||
import {type NavigationProp} from '#/lib/routes/types'
|
import {type NavigationProp} from '#/lib/routes/types'
|
||||||
|
import {isWeb} from '#/platform/detection'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
@@ -13,7 +14,7 @@ import {useNuxDialogContext} from '#/components/dialogs/nuxs'
|
|||||||
import {Sparkle_Stroke2_Corner0_Rounded as SparkleIcon} from '#/components/icons/Sparkle'
|
import {Sparkle_Stroke2_Corner0_Rounded as SparkleIcon} from '#/components/icons/Sparkle'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function ActivityNotificationsAnnouncement() {
|
export function GranularNotificationsSettings() {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
@@ -32,7 +33,7 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
<Dialog.Handle />
|
<Dialog.Handle />
|
||||||
|
|
||||||
<Dialog.ScrollableInner
|
<Dialog.ScrollableInner
|
||||||
label={_(msg`You're now able to be notified when someone posts`)}
|
label={_(msg`Introducing fine-grained notification settings.`)}
|
||||||
style={[
|
style={[
|
||||||
gtMobile ? {width: 'auto', maxWidth: 400, minWidth: 200} : a.w_full,
|
gtMobile ? {width: 'auto', maxWidth: 400, minWidth: 200} : a.w_full,
|
||||||
]}
|
]}
|
||||||
@@ -49,8 +50,10 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
a.overflow_hidden,
|
a.overflow_hidden,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_25,
|
||||||
{
|
{
|
||||||
gap: 24,
|
gap: isWeb ? 16 : 24,
|
||||||
paddingTop: 48,
|
paddingTop: isWeb ? 24 : 48,
|
||||||
|
borderTopLeftRadius: a.rounded_md.borderRadius,
|
||||||
|
borderTopRightRadius: a.rounded_md.borderRadius,
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<View
|
<View
|
||||||
@@ -78,7 +81,15 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.relative]}>
|
<View
|
||||||
|
style={[
|
||||||
|
a.relative,
|
||||||
|
a.w_full,
|
||||||
|
a.overflow_hidden,
|
||||||
|
{
|
||||||
|
height: isWeb ? 240 : 400,
|
||||||
|
},
|
||||||
|
]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.absolute,
|
a.absolute,
|
||||||
@@ -87,9 +98,9 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
{
|
{
|
||||||
top: 5,
|
top: 5,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: '15%',
|
left: '20%',
|
||||||
right: '15%',
|
right: '20%',
|
||||||
width: '70%',
|
width: '60%',
|
||||||
borderTopLeftRadius: 40,
|
borderTopLeftRadius: 40,
|
||||||
borderTopRightRadius: 40,
|
borderTopRightRadius: 40,
|
||||||
},
|
},
|
||||||
@@ -97,58 +108,70 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
/>
|
/>
|
||||||
<Image
|
<Image
|
||||||
accessibilityIgnoresInvertColors
|
accessibilityIgnoresInvertColors
|
||||||
source={require('../../../../assets/images/activity_notifications_announcement.png')}
|
source={require('../../../../assets/images/notification_settings_announcement.png')}
|
||||||
style={[
|
style={[
|
||||||
a.w_full,
|
a.w_full,
|
||||||
{
|
{
|
||||||
aspectRatio: 380 / 231,
|
aspectRatio: 380 / 421,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
alt={_(
|
alt={_(
|
||||||
msg`A screenshot of the Bluesky app showing a profile screen with a button with a bell icon inside. This button is used to subscribe to notifications for new posts from that user.`,
|
msg`A screenshot of the new notification settings screen, showing many options to configure the notifications you care about.`,
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={[a.pt_4xl, a.p_xl, a.gap_5xl]}>
|
<View
|
||||||
<View style={[a.gap_sm]}>
|
style={[
|
||||||
<Text style={[a.text_3xl, a.leading_tight, a.font_bold]}>
|
a.px_xl,
|
||||||
<Trans>Get notified when someone posts</Trans>
|
isWeb ? [a.pt_xl, a.gap_xl, a.pb_sm] : [a.pt_4xl, a.gap_3xl],
|
||||||
|
]}>
|
||||||
|
<View style={[a.gap_sm, a.align_center]}>
|
||||||
|
<Text
|
||||||
|
style={[
|
||||||
|
a.text_3xl,
|
||||||
|
a.leading_tight,
|
||||||
|
a.font_heavy,
|
||||||
|
a.text_center,
|
||||||
|
]}>
|
||||||
|
<Trans>More control over your notifications</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[a.text_md, a.leading_snug]}>
|
<Text
|
||||||
|
style={[
|
||||||
|
a.text_md,
|
||||||
|
a.leading_snug,
|
||||||
|
a.text_center,
|
||||||
|
{
|
||||||
|
maxWidth: 340,
|
||||||
|
},
|
||||||
|
]}>
|
||||||
<Trans>
|
<Trans>
|
||||||
You can now choose to receive notifications for when specific
|
Now you can choose exactly what you want to be notified about.
|
||||||
people make new posts. If there’s someone you want timely
|
Visit your notification settings to fine-tune your preferences.
|
||||||
updates from, go to their profile and find the new bell icon
|
|
||||||
near the follow button.
|
|
||||||
</Trans>
|
|
||||||
</Text>
|
|
||||||
<Text style={[a.text_md, a.leading_snug]}>
|
|
||||||
<Trans>
|
|
||||||
By default, only people you follow can subscribe to you. You can
|
|
||||||
change this in Settings.
|
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md, isWeb && a.align_center]}>
|
||||||
|
{!isWeb && (
|
||||||
|
<Button
|
||||||
|
label={_(msg`Close`)}
|
||||||
|
size="large"
|
||||||
|
variant="solid"
|
||||||
|
color="primary"
|
||||||
|
onPress={() => {
|
||||||
|
control.close()
|
||||||
|
}}>
|
||||||
|
<ButtonText>
|
||||||
|
<Trans>Close</Trans>
|
||||||
|
</ButtonText>
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
label={_(msg`Close`)}
|
label={_(msg`Open settings`)}
|
||||||
size="large"
|
size="large"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
color="primary"
|
color={isWeb ? 'primary' : 'secondary'}
|
||||||
onPress={() => {
|
|
||||||
control.close()
|
|
||||||
}}>
|
|
||||||
<ButtonText>
|
|
||||||
<Trans>Close</Trans>
|
|
||||||
</ButtonText>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
label={_(msg`Edit who can subscribe to your posts`)}
|
|
||||||
size="large"
|
|
||||||
variant="solid"
|
|
||||||
color="secondary"
|
|
||||||
style={[a.justify_center]}
|
style={[a.justify_center]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
control.close(() => {
|
control.close(() => {
|
||||||
@@ -156,7 +179,7 @@ export function ActivityNotificationsAnnouncement() {
|
|||||||
})
|
})
|
||||||
}}>
|
}}>
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Edit who can subscribe</Trans>
|
<Trans>Open settings</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
@@ -11,8 +11,7 @@ import {
|
|||||||
import {useProfileQuery} from '#/state/queries/profile'
|
import {useProfileQuery} from '#/state/queries/profile'
|
||||||
import {type SessionAccount, useSession} from '#/state/session'
|
import {type SessionAccount, useSession} from '#/state/session'
|
||||||
import {useOnboardingState} from '#/state/shell'
|
import {useOnboardingState} from '#/state/shell'
|
||||||
import {ActivityNotificationsAnnouncement} from '#/components/dialogs/nuxs/ActivityNotificationsAnnouncement'
|
import {GranularNotificationsSettings} from '#/components/dialogs/nuxs/GranularNotificationsSettings'
|
||||||
import {InitialVerificationAnnouncement} from '#/components/dialogs/nuxs/InitialVerificationAnnouncement'
|
|
||||||
/*
|
/*
|
||||||
* NUXs
|
* NUXs
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +33,7 @@ const queuedNuxs: {
|
|||||||
}) => boolean
|
}) => boolean
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
id: Nux.ActivityNotificationsAnnouncement,
|
id: Nux.GranularNotificationsSettings,
|
||||||
enabled: ({currentProfile}) => {
|
enabled: ({currentProfile}) => {
|
||||||
// TODO just filler rn
|
// TODO just filler rn
|
||||||
return isExistingUserAsOf(
|
return isExistingUserAsOf(
|
||||||
@@ -116,7 +115,7 @@ function Inner({
|
|||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (snoozed) return
|
// if (snoozed) return
|
||||||
if (!nuxs) return
|
if (!nuxs) return
|
||||||
|
|
||||||
for (const {id, enabled} of queuedNuxs) {
|
for (const {id, enabled} of queuedNuxs) {
|
||||||
@@ -124,7 +123,7 @@ function Inner({
|
|||||||
|
|
||||||
// check if completed first
|
// check if completed first
|
||||||
if (nux && nux.completed) {
|
if (nux && nux.completed) {
|
||||||
continue
|
// continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// then check gate (track exposure)
|
// then check gate (track exposure)
|
||||||
@@ -177,11 +176,8 @@ function Inner({
|
|||||||
return (
|
return (
|
||||||
<Context.Provider value={ctx}>
|
<Context.Provider value={ctx}>
|
||||||
{/*For example, activeNux === Nux.NeueTypography && <NeueTypography />*/}
|
{/*For example, activeNux === Nux.NeueTypography && <NeueTypography />*/}
|
||||||
{activeNux === Nux.InitialVerificationAnnouncement && (
|
{activeNux === Nux.GranularNotificationsSettings && (
|
||||||
<InitialVerificationAnnouncement />
|
<GranularNotificationsSettings />
|
||||||
)}
|
|
||||||
{activeNux === Nux.ActivityNotificationsAnnouncement && (
|
|
||||||
<ActivityNotificationsAnnouncement />
|
|
||||||
)}
|
)}
|
||||||
</Context.Provider>
|
</Context.Provider>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export enum Nux {
|
|||||||
NeueTypography = 'NeueTypography',
|
NeueTypography = 'NeueTypography',
|
||||||
ExploreInterestsCard = 'ExploreInterestsCard',
|
ExploreInterestsCard = 'ExploreInterestsCard',
|
||||||
InitialVerificationAnnouncement = 'InitialVerificationAnnouncement',
|
InitialVerificationAnnouncement = 'InitialVerificationAnnouncement',
|
||||||
ActivityNotificationsAnnouncement = 'ActivityNotificationsAnnouncement',
|
GranularNotificationsSettings = 'GranularNotificationsSettings',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const nuxNames = new Set(Object.values(Nux))
|
export const nuxNames = new Set(Object.values(Nux))
|
||||||
@@ -25,7 +25,7 @@ export type AppNux = BaseNux<
|
|||||||
data: undefined
|
data: undefined
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
id: Nux.ActivityNotificationsAnnouncement
|
id: Nux.GranularNotificationsSettings
|
||||||
data: undefined
|
data: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -34,5 +34,5 @@ export const NuxSchemas: Record<Nux, zod.ZodObject<any> | undefined> = {
|
|||||||
[Nux.NeueTypography]: undefined,
|
[Nux.NeueTypography]: undefined,
|
||||||
[Nux.ExploreInterestsCard]: undefined,
|
[Nux.ExploreInterestsCard]: undefined,
|
||||||
[Nux.InitialVerificationAnnouncement]: undefined,
|
[Nux.InitialVerificationAnnouncement]: undefined,
|
||||||
[Nux.ActivityNotificationsAnnouncement]: undefined,
|
[Nux.GranularNotificationsSettings]: undefined,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user