rename sync to find
FCF (Find Contacts Flow)
This commit is contained in:
+8
-8
@@ -75,6 +75,7 @@ import {BottomBar} from '#/view/shell/bottom-bar/BottomBar'
|
|||||||
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
|
||||||
import {BookmarksScreen} from '#/screens/Bookmarks'
|
import {BookmarksScreen} from '#/screens/Bookmarks'
|
||||||
import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen'
|
import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen'
|
||||||
|
import {FindContactsFlowScreen} from '#/screens/FindContactsFlowScreen'
|
||||||
import HashtagScreen from '#/screens/Hashtag'
|
import HashtagScreen from '#/screens/Hashtag'
|
||||||
import {LogScreen} from '#/screens/Log'
|
import {LogScreen} from '#/screens/Log'
|
||||||
import {MessagesScreen} from '#/screens/Messages/ChatList'
|
import {MessagesScreen} from '#/screens/Messages/ChatList'
|
||||||
@@ -106,6 +107,7 @@ import {AppIconSettingsScreen} from '#/screens/Settings/AppIconSettings'
|
|||||||
import {AppPasswordsScreen} from '#/screens/Settings/AppPasswords'
|
import {AppPasswordsScreen} from '#/screens/Settings/AppPasswords'
|
||||||
import {ContentAndMediaSettingsScreen} from '#/screens/Settings/ContentAndMediaSettings'
|
import {ContentAndMediaSettingsScreen} from '#/screens/Settings/ContentAndMediaSettings'
|
||||||
import {ExternalMediaPreferencesScreen} from '#/screens/Settings/ExternalMediaPreferences'
|
import {ExternalMediaPreferencesScreen} from '#/screens/Settings/ExternalMediaPreferences'
|
||||||
|
import {FindContactsSettingsScreen} from '#/screens/Settings/FindContactsSettings'
|
||||||
import {FollowingFeedPreferencesScreen} from '#/screens/Settings/FollowingFeedPreferences'
|
import {FollowingFeedPreferencesScreen} from '#/screens/Settings/FollowingFeedPreferences'
|
||||||
import {InterestsSettingsScreen} from '#/screens/Settings/InterestsSettings'
|
import {InterestsSettingsScreen} from '#/screens/Settings/InterestsSettings'
|
||||||
import {LanguageSettingsScreen} from '#/screens/Settings/LanguageSettings'
|
import {LanguageSettingsScreen} from '#/screens/Settings/LanguageSettings'
|
||||||
@@ -123,14 +125,12 @@ import {RepostNotificationSettingsScreen} from '#/screens/Settings/NotificationS
|
|||||||
import {RepostsOnRepostsNotificationSettingsScreen} from '#/screens/Settings/NotificationSettings/RepostsOnRepostsNotificationSettings'
|
import {RepostsOnRepostsNotificationSettingsScreen} from '#/screens/Settings/NotificationSettings/RepostsOnRepostsNotificationSettings'
|
||||||
import {PrivacyAndSecuritySettingsScreen} from '#/screens/Settings/PrivacyAndSecuritySettings'
|
import {PrivacyAndSecuritySettingsScreen} from '#/screens/Settings/PrivacyAndSecuritySettings'
|
||||||
import {SettingsScreen} from '#/screens/Settings/Settings'
|
import {SettingsScreen} from '#/screens/Settings/Settings'
|
||||||
import {SyncContactsSettingsScreen} from '#/screens/Settings/SyncContactsSettings'
|
|
||||||
import {ThreadPreferencesScreen} from '#/screens/Settings/ThreadPreferences'
|
import {ThreadPreferencesScreen} from '#/screens/Settings/ThreadPreferences'
|
||||||
import {
|
import {
|
||||||
StarterPackScreen,
|
StarterPackScreen,
|
||||||
StarterPackScreenShort,
|
StarterPackScreenShort,
|
||||||
} from '#/screens/StarterPack/StarterPackScreen'
|
} from '#/screens/StarterPack/StarterPackScreen'
|
||||||
import {Wizard} from '#/screens/StarterPack/Wizard'
|
import {Wizard} from '#/screens/StarterPack/Wizard'
|
||||||
import {SyncContactsFlowScreen} from '#/screens/SyncContactsFlowScreen'
|
|
||||||
import TopicScreen from '#/screens/Topic'
|
import TopicScreen from '#/screens/Topic'
|
||||||
import {VideoFeed} from '#/screens/VideoFeed'
|
import {VideoFeed} from '#/screens/VideoFeed'
|
||||||
import {type Theme, useTheme} from '#/alf'
|
import {type Theme, useTheme} from '#/alf'
|
||||||
@@ -419,10 +419,10 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="SyncContactsSettings"
|
name="FindContactsSettings"
|
||||||
getComponent={() => SyncContactsSettingsScreen}
|
getComponent={() => FindContactsSettingsScreen}
|
||||||
options={{
|
options={{
|
||||||
title: title(msg`Sync contacts`),
|
title: title(msg`Find contacts`),
|
||||||
requireAuth: true,
|
requireAuth: true,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -620,10 +620,10 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="SyncContactsFlow"
|
name="FindContactsFlow"
|
||||||
getComponent={() => SyncContactsFlowScreen}
|
getComponent={() => FindContactsFlowScreen}
|
||||||
options={{
|
options={{
|
||||||
title: title(msg`Sync Contacts`),
|
title: title(msg`Find Contacts`),
|
||||||
requireAuth: true,
|
requireAuth: true,
|
||||||
gestureEnabled: false,
|
gestureEnabled: false,
|
||||||
}}
|
}}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import {VerifyNumber} from './screens/VerifyNumber'
|
|||||||
import {ViewMatches} from './screens/ViewMatches'
|
import {ViewMatches} from './screens/ViewMatches'
|
||||||
import {type Action, type State} from './state'
|
import {type Action, type State} from './state'
|
||||||
|
|
||||||
export function SyncContactsFlow({
|
export function FindContactsFlow({
|
||||||
state,
|
state,
|
||||||
dispatch,
|
dispatch,
|
||||||
onCancel,
|
onCancel,
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function FindContactsFlow() {
|
||||||
|
throw new Error('FindContactsFlow is not available on web')
|
||||||
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export function SyncContactsFlow() {
|
|
||||||
throw new Error('SyncContactsFlow is not available on web')
|
|
||||||
}
|
|
||||||
@@ -363,7 +363,7 @@ function MatchItem({
|
|||||||
<ProfileCard.FollowButton
|
<ProfileCard.FollowButton
|
||||||
profile={profile}
|
profile={profile}
|
||||||
moderationOpts={moderationOpts}
|
moderationOpts={moderationOpts}
|
||||||
logContext="SyncContacts"
|
logContext="FindContacts"
|
||||||
/>
|
/>
|
||||||
{!shadow.viewer?.following && (
|
{!shadow.viewer?.following && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ function assertCurrentStep<S extends State['step']>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useSyncContactsFlowState(
|
export function useFindContactsFlowState(
|
||||||
initialState: State = {step: '1: phone input'},
|
initialState: State = {step: '1: phone input'},
|
||||||
) {
|
) {
|
||||||
return useReducer(reducer, initialState)
|
return useReducer(reducer, initialState)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export type CommonNavigatorParams = {
|
|||||||
InterestsSettings: undefined
|
InterestsSettings: undefined
|
||||||
AboutSettings: undefined
|
AboutSettings: undefined
|
||||||
AppIconSettings: undefined
|
AppIconSettings: undefined
|
||||||
SyncContactsSettings: undefined
|
FindContactsSettings: undefined
|
||||||
Search: {q?: string; tab?: 'user' | 'profile' | 'feed'}
|
Search: {q?: string; tab?: 'user' | 'profile' | 'feed'}
|
||||||
Hashtag: {tag: string; author?: string}
|
Hashtag: {tag: string; author?: string}
|
||||||
Topic: {topic: string}
|
Topic: {topic: string}
|
||||||
@@ -88,7 +88,7 @@ export type CommonNavigatorParams = {
|
|||||||
StarterPackEdit: {rkey?: string}
|
StarterPackEdit: {rkey?: string}
|
||||||
VideoFeed: VideoFeedSourceContext
|
VideoFeed: VideoFeedSourceContext
|
||||||
Bookmarks: undefined
|
Bookmarks: undefined
|
||||||
SyncContactsFlow: undefined
|
FindContactsFlow: undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BottomTabNavigatorParams = CommonNavigatorParams & {
|
export type BottomTabNavigatorParams = CommonNavigatorParams & {
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ export type MetricEvents = {
|
|||||||
| 'ImmersiveVideo'
|
| 'ImmersiveVideo'
|
||||||
| 'ExploreSuggestedAccounts'
|
| 'ExploreSuggestedAccounts'
|
||||||
| 'OnboardingSuggestedAccounts'
|
| 'OnboardingSuggestedAccounts'
|
||||||
| 'SyncContacts'
|
| 'FindContacts'
|
||||||
}
|
}
|
||||||
'profile:followers:view': {
|
'profile:followers:view': {
|
||||||
contextProfileDid: string
|
contextProfileDid: string
|
||||||
@@ -397,7 +397,7 @@ export type MetricEvents = {
|
|||||||
| 'ImmersiveVideo'
|
| 'ImmersiveVideo'
|
||||||
| 'ExploreSuggestedAccounts'
|
| 'ExploreSuggestedAccounts'
|
||||||
| 'OnboardingSuggestedAccounts'
|
| 'OnboardingSuggestedAccounts'
|
||||||
| 'SyncContacts'
|
| 'FindContacts'
|
||||||
}
|
}
|
||||||
'chat:create': {
|
'chat:create': {
|
||||||
logContext: 'ProfileHeader' | 'NewChatDialog' | 'SendViaChatDialog'
|
logContext: 'ProfileHeader' | 'NewChatDialog' | 'SendViaChatDialog'
|
||||||
|
|||||||
+2
-2
@@ -69,7 +69,7 @@ export const router = new Router<AllNavigatableRoutes>({
|
|||||||
'/settings/notifications/reposts-on-reposts',
|
'/settings/notifications/reposts-on-reposts',
|
||||||
ActivityNotificationSettings: '/settings/notifications/activity',
|
ActivityNotificationSettings: '/settings/notifications/activity',
|
||||||
MiscellaneousNotificationSettings: '/settings/notifications/miscellaneous',
|
MiscellaneousNotificationSettings: '/settings/notifications/miscellaneous',
|
||||||
SyncContactsSettings: '/settings/sync-contacts',
|
FindContactsSettings: '/settings/find-contacts',
|
||||||
// support
|
// support
|
||||||
Support: '/support',
|
Support: '/support',
|
||||||
PrivacyPolicy: '/support/privacy',
|
PrivacyPolicy: '/support/privacy',
|
||||||
@@ -92,5 +92,5 @@ export const router = new Router<AllNavigatableRoutes>({
|
|||||||
StarterPackWizard: '/starter-pack/create',
|
StarterPackWizard: '/starter-pack/create',
|
||||||
VideoFeed: '/video-feed',
|
VideoFeed: '/video-feed',
|
||||||
Bookmarks: '/saved',
|
Bookmarks: '/saved',
|
||||||
SyncContactsFlow: '/sync-contacts',
|
FindContactsFlow: '/find-contacts',
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ import {
|
|||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useSetMinimalShellMode} from '#/state/shell'
|
import {useSetMinimalShellMode} from '#/state/shell'
|
||||||
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
||||||
import {useSyncContactsFlowState} from '#/components/contacts/state'
|
import {FindContactsFlow} from '#/components/contacts/FindContactsFlow'
|
||||||
import {SyncContactsFlow} from '#/components/contacts/SyncContactsFlow'
|
import {useFindContactsFlowState} from '#/components/contacts/state'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
import {ScreenTransition} from '#/components/ScreenTransition'
|
import {ScreenTransition} from '#/components/ScreenTransition'
|
||||||
|
|
||||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'SyncContactsFlow'>
|
type Props = NativeStackScreenProps<AllNavigatorParams, 'FindContactsFlow'>
|
||||||
export function SyncContactsFlowScreen({navigation}: Props) {
|
export function FindContactsFlowScreen({navigation}: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
|
||||||
const [state, dispatch] = useSyncContactsFlowState()
|
const [state, dispatch] = useFindContactsFlowState()
|
||||||
|
|
||||||
const [transitionDirection, setTransitionDirection] = useState<
|
const [transitionDirection, setTransitionDirection] = useState<
|
||||||
'Forward' | 'Backward'
|
'Forward' | 'Backward'
|
||||||
@@ -51,13 +51,13 @@ export function SyncContactsFlowScreen({navigation}: Props) {
|
|||||||
{isNative ? (
|
{isNative ? (
|
||||||
<LayoutAnimationConfig skipEntering skipExiting>
|
<LayoutAnimationConfig skipEntering skipExiting>
|
||||||
<ScreenTransition key={state.step} direction={transitionDirection}>
|
<ScreenTransition key={state.step} direction={transitionDirection}>
|
||||||
<SyncContactsFlow
|
<FindContactsFlow
|
||||||
state={state}
|
state={state}
|
||||||
dispatch={dispatch}
|
dispatch={dispatch}
|
||||||
onCancel={() =>
|
onCancel={() =>
|
||||||
navigation.canGoBack()
|
navigation.canGoBack()
|
||||||
? navigation.goBack()
|
? navigation.goBack()
|
||||||
: navigation.navigate('SyncContactsFlow', undefined, {
|
: navigation.navigate('FindContactsFlow', undefined, {
|
||||||
pop: true,
|
pop: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
+7
-7
@@ -11,14 +11,14 @@ import {isNative} from '#/platform/detection'
|
|||||||
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {ButtonText} from '#/components/Button'
|
import {ButtonText} from '#/components/Button'
|
||||||
import {Contacts_Stroke2_Corner2_Rounded as SyncContactsIcon} from '#/components/icons/Contacts'
|
import {Contacts_Stroke2_Corner2_Rounded as FindContactsIcon} from '#/components/icons/Contacts'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
import {InlineLinkText, Link} from '#/components/Link'
|
import {InlineLinkText, Link} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import * as SettingsList from './components/SettingsList'
|
import * as SettingsList from './components/SettingsList'
|
||||||
|
|
||||||
type Props = NativeStackScreenProps<AllNavigatorParams, 'SyncContactsSettings'>
|
type Props = NativeStackScreenProps<AllNavigatorParams, 'FindContactsSettings'>
|
||||||
export function SyncContactsSettingsScreen({}: Props) {
|
export function FindContactsSettingsScreen({}: Props) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export function SyncContactsSettingsScreen({}: Props) {
|
|||||||
<Layout.Header.BackButton />
|
<Layout.Header.BackButton />
|
||||||
<Layout.Header.Content>
|
<Layout.Header.Content>
|
||||||
<Layout.Header.TitleText>
|
<Layout.Header.TitleText>
|
||||||
<Trans>Sync contacts</Trans>
|
<Trans>Find contacts</Trans>
|
||||||
</Layout.Header.TitleText>
|
</Layout.Header.TitleText>
|
||||||
</Layout.Header.Content>
|
</Layout.Header.Content>
|
||||||
<Layout.Header.Slot />
|
<Layout.Header.Slot />
|
||||||
@@ -42,9 +42,9 @@ export function SyncContactsSettingsScreen({}: Props) {
|
|||||||
<Layout.Content>
|
<Layout.Content>
|
||||||
<SettingsList.Container>
|
<SettingsList.Container>
|
||||||
<SettingsList.Item>
|
<SettingsList.Item>
|
||||||
<SettingsList.ItemIcon icon={SyncContactsIcon} />
|
<SettingsList.ItemIcon icon={FindContactsIcon} />
|
||||||
<SettingsList.ItemText>
|
<SettingsList.ItemText>
|
||||||
<Trans>Sync Contacts</Trans>
|
<Trans>Find Contacts</Trans>
|
||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.Item>
|
</SettingsList.Item>
|
||||||
<SettingsList.Item style={[a.pt_0]}>
|
<SettingsList.Item style={[a.pt_0]}>
|
||||||
@@ -69,7 +69,7 @@ export function SyncContactsSettingsScreen({}: Props) {
|
|||||||
{isAvailable && (
|
{isAvailable && (
|
||||||
<SettingsList.Item>
|
<SettingsList.Item>
|
||||||
<Link
|
<Link
|
||||||
to={{screen: 'SyncContactsFlow'}}
|
to={{screen: 'FindContactsFlow'}}
|
||||||
label={_(msg`Upload contacts`)}
|
label={_(msg`Upload contacts`)}
|
||||||
size="large"
|
size="large"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -210,11 +210,11 @@ export function SettingsScreen({}: Props) {
|
|||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
{isNative && (
|
{isNative && (
|
||||||
<SettingsList.LinkItem
|
<SettingsList.LinkItem
|
||||||
to="/settings/sync-contacts"
|
to="/settings/find-contacts"
|
||||||
label={_(msg`Sync contacts`)}>
|
label={_(msg`Find contacts`)}>
|
||||||
<SettingsList.ItemIcon icon={ContactsIcon} />
|
<SettingsList.ItemIcon icon={ContactsIcon} />
|
||||||
<SettingsList.ItemText>
|
<SettingsList.ItemText>
|
||||||
<Trans>Sync contacts</Trans>
|
<Trans>Find contacts</Trans>
|
||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user