Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload avatar #167

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3721586
add avatar upload component
Jan 23, 2020
11e4796
schema auto change
Jan 23, 2020
9d0bbbd
add axios
Jan 23, 2020
02135d3
add change avatar mutation
Jan 23, 2020
156e92e
add cors. This is bad...I think
Jan 23, 2020
3644031
add aws env vars
Jan 23, 2020
5190ff5
add s3 api route
Jan 23, 2020
acaffb7
use avatarPhoto if exists
Jan 23, 2020
40c4ffb
yarn lock change
Jan 23, 2020
02ffa19
add avatar upload to settings page
Jan 23, 2020
882ab58
add labels to error, success, and avatar form item
Jan 23, 2020
594364c
replace readme with instructions
makoncline Jan 23, 2020
84e304f
add @app/graphql
makoncline Jan 27, 2020
1bb7b59
Extend schema to allow for presigned URLs for uploading files
singingwolfboy Feb 12, 2020
e96c5e1
respond to review comments
singingwolfboy Apr 18, 2020
c9378b3
update schema.graphql
singingwolfboy Apr 18, 2020
0309090
use typescript enum
singingwolfboy Apr 18, 2020
f28ebc2
prettier
singingwolfboy Apr 18, 2020
76807dc
missed a backtick
singingwolfboy Apr 18, 2020
62c7e83
Add dependency on aws-sdk to server/package.json
singingwolfboy Apr 20, 2020
8626b2f
respond to review comments
singingwolfboy Apr 20, 2020
8442139
remove unneeded query field from payload
singingwolfboy Apr 20, 2020
8b73401
process.env.AWS_BUCKET_UPLOAD
singingwolfboy Apr 20, 2020
7d3ff8b
resolve conflict
singingwolfboy May 9, 2020
75475d4
uuid 8
singingwolfboy May 9, 2020
d08e934
match aws-sdk versions
singingwolfboy May 9, 2020
2617eb2
Merge remote-tracking branch 'singingwolfboy/upload-via-signed-url-ex…
benjie May 15, 2020
d8b0314
Merge remote-tracking branch 'makoncline/master' into makoncline-upload
benjie May 15, 2020
544cee6
Lint fix
benjie May 15, 2020
b4c984b
Use 'slugify'
benjie May 15, 2020
5ff02f3
Merge branch 'makoncline-upload' into upload-avatar
benjie May 15, 2020
5a17463
Use UpdateUser mutation instead of ChangeAvatar mutation
benjie May 15, 2020
c14278d
Schema export script
benjie May 15, 2020
0fdc0ff
Start refactoring
benjie May 15, 2020
65620dd
Split independent forms
benjie May 15, 2020
c521d3d
More refactoring
benjie May 15, 2020
ee48e4c
awsRegion restored to behaviour on master
benjie May 15, 2020
fa15355
Merge branch 'master' into upload-avatar
benjie May 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add labels to error, success, and avatar form item
Makon Cline committed Jan 23, 2020
commit 882ab585454e45b51c56005aa2549597ed77121e
12 changes: 9 additions & 3 deletions @app/client/src/pages/settings/index.tsx
Original file line number Diff line number Diff line change
@@ -113,8 +113,14 @@ function ProfileSettingsForm({
return (
<div>
<H3>Edit Profile</H3>
<AvatarUpload user={user} setError={setError} setSuccess={setSuccess} />
<Form {...formItemLayout} onSubmit={handleSubmit}>
<Form.Item label="Avatar">
<AvatarUpload
user={user}
setError={setError}
setSuccess={setSuccess}
/>
</Form.Item>
<Form.Item label="Name">
{getFieldDecorator("name", {
initialValue: user.name,
@@ -138,7 +144,7 @@ function ProfileSettingsForm({
})(<Input />)}
</Form.Item>
{error ? (
<Form.Item>
<Form.Item label="Error">
<Alert
type="error"
message={`Updating username`}
@@ -156,7 +162,7 @@ function ProfileSettingsForm({
/>
</Form.Item>
) : success ? (
<Form.Item>
<Form.Item label="success">
<Alert type="success" message={`Profile updated`} />
</Form.Item>
) : null}