diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fe34a70e5..11be2c541d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ * Fixed mobile bugs - joining by QR code and not showing username taken screen for user who has unique name +* Use context menu for information about unregistered username instead screen + * Shorter dots-placeholder for invite link * Removed registration attempts selector and corresponding usage. diff --git a/packages/mobile/src/App.tsx b/packages/mobile/src/App.tsx index 49b1e7019d..3b777d1164 100644 --- a/packages/mobile/src/App.tsx +++ b/packages/mobile/src/App.tsx @@ -45,10 +45,11 @@ import StoreProvider from './Provider' import { RootStackParamList } from './route.params' import ConnectionProcessScreen from './screens/ConnectionProcess/ConnectionProcess.screen' import { DuplicatedUsernameScreen } from './screens/DuplicatedUsername/DuplicatedUsername.screen' -import { UnregisteredUsernameScreen } from './screens/UnregisteredUsername/UnregisteredUsername.screen' + import UsernameTakenScreen from './screens/UsernameTaken/UsernameTaken.screen' import NewUsernameRequestedScreen from './screens/NewUsernameRequested/NewUsernameRequested.screen' import { PossibleImpersonationAttackScreen } from './screens/PossibleImpersonationAttack/PossibleImpersonationAttack.screen' +import { UnregisteredUsernameContextMenu } from './components/ContextMenu/menus/UnregisteredUsernameContextMenu.container' LogBox.ignoreAllLogs() @@ -105,7 +106,6 @@ function App(): JSX.Element { - + diff --git a/packages/mobile/src/components/ContextMenu/ContextMenu.component.tsx b/packages/mobile/src/components/ContextMenu/ContextMenu.component.tsx index a62feec289..f90abdfc10 100644 --- a/packages/mobile/src/components/ContextMenu/ContextMenu.component.tsx +++ b/packages/mobile/src/components/ContextMenu/ContextMenu.component.tsx @@ -2,9 +2,9 @@ import React, { FC } from 'react' import { View, Image, FlatList, TouchableWithoutFeedback, TouchableOpacity, Animated } from 'react-native' import { Typography } from '../Typography/Typography.component' import { ContextMenuItemProps, ContextMenuProps } from './ContextMenu.types' - import { defaultPalette } from '../../styles/palettes/default.palette' import { appImages } from '../../assets' +import { Button } from '../Button/Button.component' export const ContextMenu: FC = ({ visible, @@ -16,6 +16,8 @@ export const ContextMenu: FC = ({ linkAction = () => { console.log('No action attached for link tap gesture.') }, + unregisteredUsername, + username, }) => { const [show, setShow] = React.useState(false) const slidingAnimation = React.useRef(new Animated.Value(0)).current @@ -140,24 +142,45 @@ export const ContextMenu: FC = ({ )} - - item.title} - renderItem={({ item, index }) => ( - - - - )} - style={{ backgroundColor: defaultPalette.background.white }} - showsVerticalScrollIndicator={false} - /> - + + {items.length !== 0 && ( + + item.title} + renderItem={({ item, index }) => ( + + + + )} + style={{ backgroundColor: defaultPalette.background.white }} + showsVerticalScrollIndicator={false} + /> + + )} + + {unregisteredUsername && username && ( + + + The username{' '} + + @{username} + {' '} + has not been registered yet with the community owner, so it’s still possible for someone else to + register the same username. When the community owner is online,{' '} + + @{username} + {' '} + will be registered automatically and this alert will go away. + +