diff --git a/app/definitions/rest/v1/users.ts b/app/definitions/rest/v1/users.ts index 898799102..4f4d8703c 100644 --- a/app/definitions/rest/v1/users.ts +++ b/app/definitions/rest/v1/users.ts @@ -1,4 +1,4 @@ -import { IParams } from '../../IProfileViewInterfaces'; +import { IParams } from '../../../views/ProfileView/interfaces'; import type { ITeam } from '../../ITeam'; import type { IUser } from '../../IUser'; import { INotificationPreferences, IUserPreferences, IUserRegistered } from '../../IUser'; diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index a89c45e31..b4a74d5b2 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -114,6 +114,7 @@ "Auto_Translate": "Auto-Translate", "Avatar_changed_successfully": "Avatar changed successfully!", "Avatar_Url": "Avatar URL", + "Avatar_Url_Insert_Image": "Insert image URL here", "Away": "Away", "Back": "Back", "Black": "Black", diff --git a/app/lib/services/restApi.ts b/app/lib/services/restApi.ts index 44e361589..e74edfb1f 100644 --- a/app/lib/services/restApi.ts +++ b/app/lib/services/restApi.ts @@ -7,7 +7,7 @@ import { SubscriptionType, IUser } from '../../definitions'; -import { IAvatarSuggestion, IParams } from '../../definitions/IProfileViewInterfaces'; +import { IAvatarSuggestion, IParams } from '../../views/ProfileView/interfaces'; import { ISpotlight } from '../../definitions/ISpotlight'; import { TEAM_TYPE } from '../../definitions/ITeam'; import { Encryption } from '../encryption'; diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx index aef07c76f..1d37b5a47 100644 --- a/app/stacks/InsideStack.tsx +++ b/app/stacks/InsideStack.tsx @@ -33,6 +33,7 @@ import CannedResponseDetail from '../views/CannedResponseDetail'; import { themes } from '../lib/constants'; // Profile Stack import ProfileView from '../views/ProfileView'; +import AvatarEditView from '../views/AvatarEditView'; import UserPreferencesView from '../views/UserPreferencesView'; import UserNotificationPrefView from '../views/UserNotificationPreferencesView'; // Display Preferences View @@ -148,6 +149,7 @@ const ProfileStackNavigator = () => { + { component={ProfileView} options={props => ProfileView.navigationOptions!({ ...props, isMasterDetail: true })} /> + ): React.ReactElement => { + const [avatarUrl, setAvatarUrl] = useState(''); + const [saving] = useState(false); + + // const username = useSelector((state: IApplicationState) => getUserSelector(state).username); + // const url = useSelector((state: IApplicationState) => getUserSelector(state).username); + + const { theme } = useTheme(); + + useLayoutEffect(() => { + navigation.setOptions({ + title: 'Avatar' + }); + }, []); + return ( + + {/* */} + setAvatarUrl(value)} + // onSubmitEditing={this.submit} + testID='profile-view-avatar-url' + theme={theme} + /> +