From 6fe57ca055a7f1d2c2f41809f3adb581df575532 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 22 Apr 2020 16:26:44 -0500 Subject: [PATCH] Boilerplate avatar/header selector --- .../components/profile_preview.js | 31 ++++++++++++++++ app/gabsocial/features/edit_profile/index.js | 29 +++++++++++++++ app/gabsocial/features/forms/index.js | 37 +++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 app/gabsocial/features/edit_profile/components/profile_preview.js diff --git a/app/gabsocial/features/edit_profile/components/profile_preview.js b/app/gabsocial/features/edit_profile/components/profile_preview.js new file mode 100644 index 000000000..3179f4193 --- /dev/null +++ b/app/gabsocial/features/edit_profile/components/profile_preview.js @@ -0,0 +1,31 @@ +import React from 'react'; +import ImmutablePropTypes from 'react-immutable-proptypes'; +import { acctFull } from 'gabsocial/utils/accounts'; + +const ProfilePreview = ({ account }) => ( +
+ +
+ +
+
+
+ +
+
+ {account.get('username')} + + {account.get('display_name')} + + {acctFull(account)} +
+
+
+
+); + +ProfilePreview.propTypes = { + account: ImmutablePropTypes.map, +}; + +export default ProfilePreview; diff --git a/app/gabsocial/features/edit_profile/index.js b/app/gabsocial/features/edit_profile/index.js index 50eae9f9f..0725f9b31 100644 --- a/app/gabsocial/features/edit_profile/index.js +++ b/app/gabsocial/features/edit_profile/index.js @@ -10,7 +10,10 @@ import { FieldsGroup, TextInput, Checkbox, + FileChooser, } from 'gabsocial/features/forms'; +import ProfilePreview from './components/profile_preview'; +import { Map as ImmutableMap } from 'immutable'; import { patchMe } from 'gabsocial/actions/me'; const messages = defineMessages({ @@ -97,6 +100,32 @@ class EditProfile extends ImmutablePureComponent { value={this.state.note} onChange={this.handleTextChange} /> +
+
+ +
+
+ + +
+
+
+ +
+ +
+
+ {hint} + + ); + } + +}