From 3e2b9666ca0a4334a11ba866d7d3302d523b9a68 Mon Sep 17 00:00:00 2001 From: Dominic Motuka Date: Thu, 9 May 2019 16:27:27 +0300 Subject: [PATCH 01/47] More descriptive minikube setup instructions --- deployment/human-connection/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/human-connection/README.md b/deployment/human-connection/README.md index d6a2dd989..56e8c8860 100644 --- a/deployment/human-connection/README.md +++ b/deployment/human-connection/README.md @@ -6,21 +6,21 @@ just apply our provided configuration files to your cluster. ## Configuration -Copy our provided templates: +Change into the `./deployment` directory and copy our provided templates: ```bash $ cp secrets.template.yaml human-connection/secrets.yaml $ cp configmap.template.yaml human-connection/configmap.yaml ``` -Change the `configmap.yaml` as needed, all variables will be available as +Change the `configmap.yaml` in the `./deployment/human-connection` directory as needed, all variables will be available as environment variables in your deployed kubernetes pods. If you want to edit secrets, you have to `base64` encode them. See [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually). ```bash # example how to base64 a string: -$ echo -n 'admin' | base64 --wrap 0 +$ echo -n 'admin' | base64 YWRtaW4= ``` From 24a6ec88ad297bb7f2244a703d156de13f63bbfc Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Tue, 14 May 2019 17:19:00 -0300 Subject: [PATCH 02/47] Add nuxt-dropzone, Upload component --- webapp/components/Upload.vue | 45 ++++++++++++++++++++++++++++++ webapp/package.json | 4 ++- webapp/pages/profile/_id/_slug.vue | 11 +++++--- webapp/yarn.lock | 26 +++++++++++++++++ 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 webapp/components/Upload.vue diff --git a/webapp/components/Upload.vue b/webapp/components/Upload.vue new file mode 100644 index 000000000..332ea4557 --- /dev/null +++ b/webapp/components/Upload.vue @@ -0,0 +1,45 @@ + + + diff --git a/webapp/package.json b/webapp/package.json index 27ed779b6..8fd6767ec 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -66,6 +66,7 @@ "jsonwebtoken": "~8.5.1", "linkify-it": "~2.1.0", "nuxt": "~2.6.3", + "nuxt-dropzone": "^1.0.2", "nuxt-env": "~0.1.0", "stack-utils": "^1.0.2", "string-hash": "^1.1.3", @@ -75,6 +76,7 @@ "vue-count-to": "~1.0.13", "vue-izitoast": "1.1.2", "vue-sweetalert-icons": "~3.2.0", + "vue2-dropzone": "^3.5.9", "vuex-i18n": "~1.11.0", "zxcvbn": "^4.4.2" }, @@ -104,4 +106,4 @@ "vue-jest": "~3.0.4", "vue-svg-loader": "~0.12.0" } -} \ No newline at end of file +} diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index ecb0baa9d..11dd3278f 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -14,12 +14,13 @@ :class="{'disabled-content': user.disabled}" style="position: relative; height: auto;" > - + Date: Tue, 14 May 2019 20:57:49 -0300 Subject: [PATCH 03/47] Fix lint - still not automated --- webapp/components/Upload.vue | 6 +++--- webapp/pages/profile/_id/_slug.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/components/Upload.vue b/webapp/components/Upload.vue index 332ea4557..5c491d49c 100644 --- a/webapp/components/Upload.vue +++ b/webapp/components/Upload.vue @@ -1,8 +1,8 @@ diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index 64addaa25..5f7df20ac 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -14,13 +14,14 @@ :class="{'disabled-content': user.disabled}" style="position: relative; height: auto;" > - - + + + Date: Fri, 17 May 2019 00:06:44 -0300 Subject: [PATCH 05/47] Add negative margin --- webapp/components/Upload.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/components/Upload.vue b/webapp/components/Upload.vue index 722cb4b8a..3b2c84683 100644 --- a/webapp/components/Upload.vue +++ b/webapp/components/Upload.vue @@ -107,6 +107,7 @@ export default { position: relative; width: 122px; height: 122px; + margin-left: -35px; display: flex; align-items: center; justify-content: center; From b7632ed1fae26f404738695c44bacbed0ba66ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 18 May 2019 13:46:32 +0200 Subject: [PATCH 06/47] Follow "folder with spec and component" convention --- .../components/{Upload.vue => Upload/index.vue} | 9 ++++++--- webapp/components/Upload/spec.js | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) rename webapp/components/{Upload.vue => Upload/index.vue} (95%) create mode 100644 webapp/components/Upload/spec.js diff --git a/webapp/components/Upload.vue b/webapp/components/Upload/index.vue similarity index 95% rename from webapp/components/Upload.vue rename to webapp/components/Upload/index.vue index 722cb4b8a..5a4da775d 100644 --- a/webapp/components/Upload.vue +++ b/webapp/components/Upload/index.vue @@ -5,7 +5,7 @@ ref="el" :options="dropzoneOptions" :include-styling="false" - :style="{ backgroundImage: backgroundImage(`${user.avatar}`)}" + :style="backgroundImage" @vdropzone-thumbnail="thumbnail" > @@ -35,8 +35,11 @@ export default { } }, computed: { - backgroundImage: () => avatar => { - return `url(${avatar})` + backgroundImage() { + const { avatar } = this.user || {} + return { + backgroundImage: `url(${avatar})` + } } }, methods: { diff --git a/webapp/components/Upload/spec.js b/webapp/components/Upload/spec.js new file mode 100644 index 000000000..f69211bea --- /dev/null +++ b/webapp/components/Upload/spec.js @@ -0,0 +1,16 @@ +import { shallowMount } from '@vue/test-utils' +import Upload from '.' + +describe('Upload', () => { + let wrapper + + beforeEach(() => { + wrapper = shallowMount(Upload, {}) + }) + + it('renders', () => { + expect(wrapper.is('div')).toBe(true) + }) + + // TODO: add more test cases in this file +}) From 1c072b97b5aea4004790832d659ed0c99de8b5ec Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Mon, 20 May 2019 13:20:24 -0300 Subject: [PATCH 07/47] Add apollo-upload-client --- webapp/components/Upload.vue | 11 +++++------ webapp/package.json | 1 + webapp/plugins/apollo-config.js | 13 +++++++++++++ webapp/yarn.lock | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/webapp/components/Upload.vue b/webapp/components/Upload.vue index 3b2c84683..0b15dc2ad 100644 --- a/webapp/components/Upload.vue +++ b/webapp/components/Upload.vue @@ -7,6 +7,7 @@ :include-styling="false" :style="{ backgroundImage: backgroundImage(`${user.avatar}`)}" @vdropzone-thumbnail="thumbnail" + @vdropzone-success="vsuccess" > @@ -27,7 +28,6 @@ export default { return { dropzoneOptions: { url: 'https://httpbin.org/post', - thumbnailWidth: 150, maxFilesize: 0.5, previewTemplate: this.template(), dictDefaultMessage: "" @@ -61,7 +61,6 @@ export default { var j, len, ref, thumbnailElement; this.$refs.el.dropzone.element.style['background-image'] = '' if (file.previewElement) { - console.log(file) file.previewElement.classList.remove("dz-file-preview"); ref = file.previewElement.querySelectorAll("[data-dz-thumbnail-bg]"); for (j = 0, len = ref.length; j < len; j++) { @@ -75,6 +74,9 @@ export default { }; })(this)), 1); } + }, + vsuccess(file, response) { + console.log('file', file.upload.filename, 'response', response) } }, mounted() { @@ -108,15 +110,12 @@ export default { width: 122px; height: 122px; margin-left: -35px; - display: flex; - align-items: center; - justify-content: center; } #customdropzone .dz-preview .dz-image > div { width: inherit; height: inherit; border-radius: 50%; - background-size: contain; + background-size: cover; } #customdropzone .dz-preview .dz-image > img { width: 100%; diff --git a/webapp/package.json b/webapp/package.json index 217bb4037..d4e3f20ad 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -58,6 +58,7 @@ "accounting": "~0.4.1", "apollo-cache-inmemory": "~1.5.1", "apollo-client": "~2.5.1", + "apollo-upload-client": "^10.0.1", "cookie-universal-nuxt": "~2.0.14", "cross-env": "~5.2.0", "date-fns": "2.0.0-alpha.27", diff --git a/webapp/plugins/apollo-config.js b/webapp/plugins/apollo-config.js index f65700ab4..a005063e1 100644 --- a/webapp/plugins/apollo-config.js +++ b/webapp/plugins/apollo-config.js @@ -1,6 +1,19 @@ +import { createUploadLink } from 'apollo-upload-client' +import { ApolloClient } from 'apollo-client' +import { InMemoryCache } from 'apollo-cache-inmemory' + export default ({ app }) => { const backendUrl = process.env.GRAPHQL_URI || 'http://localhost:4000' + const link = createUploadLink({ uri: 'http://localhost:4000' }) + + const client = new ApolloClient({ + link, + cache: new InMemoryCache(), + }) + + console.log(client) return { + client, httpEndpoint: process.server ? backendUrl : '/api', httpLinkOptions: { credentials: 'same-origin' diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 804c1518f..863b3428b 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -2055,7 +2055,7 @@ apollo-tracing@0.6.0: apollo-server-env "2.3.0" graphql-extensions "0.6.0" -apollo-upload-client@^10.0.0: +apollo-upload-client@^10.0.0, apollo-upload-client@^10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-10.0.1.tgz#e8446288d03edb1c582c91c26a18b27533f85013" integrity sha512-K6WnuYQi0RRTNO+aSPVjoUWXp4QSr+eoKU4fE0OKQp25XRF2oXl2cTLs+Q4Nk0wOIHM76YGdo/IHtzuNR7jO+A== From 4dbf1b2a2ca81dd1335f87258d91fde80e26e484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 20 May 2019 19:32:53 +0200 Subject: [PATCH 08/47] UpdateUser with avatarUpload This is a curl request from a folder where I have a file `avatar.jpg`: ``` curl localhost:4000/ \ -F operations='{ "query": "mutation($id: ID!, $file: Upload) { UpdateUser(id: $id, avatarUpload: $file) { id name avatar } }", "variables": { "id": "u3", "file": null } }' \ -F map='{ "0": ["variables.file"] }' \ -F 0=@avatar.jpg ``` It uploads the avatar to the public folder. We should * Write tests * Change the `user.avatar` url and send it to `/api` in the frontend --- backend/package.json | 2 +- backend/src/graphql-schema.js | 4 ++- backend/src/middleware/validation/index.js | 2 +- backend/src/resolvers/users.js | 29 ++++++++++++++++++++++ backend/src/schema.graphql | 4 +++ 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 backend/src/resolvers/users.js diff --git a/backend/package.json b/backend/package.json index d940937a8..be20a4a6d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -106,4 +106,4 @@ "nodemon": "~1.19.0", "supertest": "~4.0.2" } -} \ No newline at end of file +} diff --git a/backend/src/graphql-schema.js b/backend/src/graphql-schema.js index bad277721..bae4b7833 100644 --- a/backend/src/graphql-schema.js +++ b/backend/src/graphql-schema.js @@ -12,6 +12,7 @@ import rewards from './resolvers/rewards.js' import socialMedia from './resolvers/socialMedia.js' import notifications from './resolvers/notifications' import comments from './resolvers/comments' +import users from './resolvers/users' export const typeDefs = fs .readFileSync( @@ -36,6 +37,7 @@ export const resolvers = { ...rewards.Mutation, ...socialMedia.Mutation, ...notifications.Mutation, - ...comments.Mutation + ...comments.Mutation, + ...users.Mutation } } diff --git a/backend/src/middleware/validation/index.js b/backend/src/middleware/validation/index.js index de9be72e9..ded509b44 100644 --- a/backend/src/middleware/validation/index.js +++ b/backend/src/middleware/validation/index.js @@ -3,7 +3,7 @@ import { UserInputError } from 'apollo-server' const USERNAME_MIN_LENGTH = 3 const validateUsername = async (resolve, root, args, context, info) => { - if (args.name && args.name.length >= USERNAME_MIN_LENGTH) { + if (!('name' in args) || args.name && args.name.length >= USERNAME_MIN_LENGTH) { /* eslint-disable-next-line no-return-await */ return await resolve(root, args, context, info) } else { diff --git a/backend/src/resolvers/users.js b/backend/src/resolvers/users.js new file mode 100644 index 000000000..33ba8c36b --- /dev/null +++ b/backend/src/resolvers/users.js @@ -0,0 +1,29 @@ +import { neo4jgraphql } from 'neo4j-graphql-js' +import { createWriteStream } from 'fs' + + +const storeUpload = ({ stream, fileLocation}) => + new Promise((resolve, reject) => + stream + .pipe(createWriteStream(`public${fileLocation}`)) + .on("finish", () => resolve()) + .on("error", reject) + ); + +export default { + Mutation: { + UpdateUser: async (object, params, context, resolveInfo) => { + const { avatarUpload } = params + + if (avatarUpload) { + const { stream, filename } = await avatarUpload ; + const fileLocation = `/uploads/${filename}` + await storeUpload({ stream, fileLocation }); + delete params.avatarUpload + + params.avatar = fileLocation + } + return await neo4jgraphql(object, params, context, resolveInfo, false) + } + }, +}; diff --git a/backend/src/schema.graphql b/backend/src/schema.graphql index 902a7abf9..d364ba4b3 100644 --- a/backend/src/schema.graphql +++ b/backend/src/schema.graphql @@ -1,3 +1,5 @@ +scalar Upload + type Query { isLoggedIn: Boolean! # Get the currently logged in User based on the given JWT Token @@ -18,6 +20,7 @@ type Query { ) CommentByPost(postId: ID!): [Comment]! } + type Mutation { # Get a JWT Token for the given Email and password login(email: String!, password: String!): String! @@ -99,6 +102,7 @@ type User { slug: String password: String! avatar: String + avatarUpload: Upload deleted: Boolean disabled: Boolean disabledBy: User @relation(name: "DISABLED", direction: "IN") From 1bb523a9ef9e29463f8d24d9437ee8dc5f28f3e6 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Mon, 20 May 2019 15:37:08 -0300 Subject: [PATCH 09/47] Set up to work with vddrop - on vdropzone-drop call vddrop function, which sends the mutation to the backend --- webapp/components/Upload.vue | 78 +++++++++++++++++++++------------ webapp/plugins/apollo-config.js | 12 ----- 2 files changed, 51 insertions(+), 39 deletions(-) diff --git a/webapp/components/Upload.vue b/webapp/components/Upload.vue index 0b15dc2ad..f6740e7ca 100644 --- a/webapp/components/Upload.vue +++ b/webapp/components/Upload.vue @@ -6,16 +6,16 @@ :options="dropzoneOptions" :include-styling="false" :style="{ backgroundImage: backgroundImage(`${user.avatar}`)}" + @vdropzone-error="verror" @vdropzone-thumbnail="thumbnail" + @vdropzone-drop="vddrop" @vdropzone-success="vsuccess" - > - - + /> @@ -97,7 +119,7 @@ export default { font-family: 'Arial', sans-serif; letter-spacing: 0.2px; color: #777; - transition: background-color .2s linear; + transition: background-color 0.2s linear; padding: 40px; } @@ -121,12 +143,14 @@ export default { width: 100%; } - #customdropzone .dz-preview .dz-details { +#customdropzone .dz-preview .dz-details { color: white; - transition: opacity .2s linear; + transition: opacity 0.2s linear; text-align: center; } -#customdropzone .dz-success-mark, .dz-error-mark, .dz-remove { +#customdropzone .dz-success-mark, +.dz-error-mark, +.dz-remove { display: none; } diff --git a/webapp/plugins/apollo-config.js b/webapp/plugins/apollo-config.js index a005063e1..bbbcfee19 100644 --- a/webapp/plugins/apollo-config.js +++ b/webapp/plugins/apollo-config.js @@ -1,19 +1,7 @@ -import { createUploadLink } from 'apollo-upload-client' -import { ApolloClient } from 'apollo-client' -import { InMemoryCache } from 'apollo-cache-inmemory' - export default ({ app }) => { const backendUrl = process.env.GRAPHQL_URI || 'http://localhost:4000' - const link = createUploadLink({ uri: 'http://localhost:4000' }) - - const client = new ApolloClient({ - link, - cache: new InMemoryCache(), - }) - console.log(client) return { - client, httpEndpoint: process.server ? backendUrl : '/api', httpLinkOptions: { credentials: 'same-origin' From d463312397704404835c10db86fc7c3c3a3cccc1 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Mon, 20 May 2019 16:37:02 -0300 Subject: [PATCH 10/47] Get avatar upload working from frontend to backend - there are several things to work on still - the upload sets the avatar as the background image of the previewElement, which means that you must refresh the page to upload a different avatar - the CSS is slightly different before and after successful upload - the CSS is slightly broken in that the avatar is not in the "ideal" place, it is entirely inside the card, instead of half in, half out on the top --- backend/src/middleware/validation/index.js | 2 +- backend/src/resolvers/users.js | 21 +++++++------ webapp/components/Empty.vue | 2 +- webapp/components/Upload/index.vue | 35 ++++++++++------------ webapp/locales/en.json | 5 ++++ webapp/pages/profile/_id/_slug.vue | 9 +----- 6 files changed, 34 insertions(+), 40 deletions(-) diff --git a/backend/src/middleware/validation/index.js b/backend/src/middleware/validation/index.js index ded509b44..5bc8fd02d 100644 --- a/backend/src/middleware/validation/index.js +++ b/backend/src/middleware/validation/index.js @@ -3,7 +3,7 @@ import { UserInputError } from 'apollo-server' const USERNAME_MIN_LENGTH = 3 const validateUsername = async (resolve, root, args, context, info) => { - if (!('name' in args) || args.name && args.name.length >= USERNAME_MIN_LENGTH) { + if (!('name' in args) || (args.name && args.name.length >= USERNAME_MIN_LENGTH)) { /* eslint-disable-next-line no-return-await */ return await resolve(root, args, context, info) } else { diff --git a/backend/src/resolvers/users.js b/backend/src/resolvers/users.js index 33ba8c36b..646a2f48c 100644 --- a/backend/src/resolvers/users.js +++ b/backend/src/resolvers/users.js @@ -1,14 +1,13 @@ import { neo4jgraphql } from 'neo4j-graphql-js' import { createWriteStream } from 'fs' - -const storeUpload = ({ stream, fileLocation}) => +const storeUpload = ({ stream, fileLocation }) => new Promise((resolve, reject) => stream - .pipe(createWriteStream(`public${fileLocation}`)) - .on("finish", () => resolve()) - .on("error", reject) - ); + .pipe(createWriteStream(`public${fileLocation}`)) + .on('finish', resolve) + .on('error', reject) + ) export default { Mutation: { @@ -16,14 +15,14 @@ export default { const { avatarUpload } = params if (avatarUpload) { - const { stream, filename } = await avatarUpload ; + const { stream, filename } = await avatarUpload const fileLocation = `/uploads/${filename}` - await storeUpload({ stream, fileLocation }); + await storeUpload({ stream, fileLocation }) delete params.avatarUpload params.avatar = fileLocation } - return await neo4jgraphql(object, params, context, resolveInfo, false) + return neo4jgraphql(object, params, context, resolveInfo, false) } - }, -}; + } +} diff --git a/webapp/components/Empty.vue b/webapp/components/Empty.vue index 082d18f83..8755a11bd 100644 --- a/webapp/components/Empty.vue +++ b/webapp/components/Empty.vue @@ -11,7 +11,7 @@ class="hc-empty-icon" style="margin-bottom: 5px" alt="Empty" - />
+ >
@@ -37,7 +36,7 @@ export default { backgroundImage() { const { avatar } = this.user || {} return { - backgroundImage: `url(${avatar})` + backgroundImage: `url(/api/${avatar})` } } }, @@ -84,27 +83,25 @@ export default { ) } }, - vsuccess(file, response) { - console.log('file', file.upload.filename, 'response', response) - }, vddrop([file]) { - this.dDrop = true - console.log('this is a file', file) - const uploadFileMutation = gql` - mutation($file: Upload!) { - uploadFile(file: $file) - } - ` this.$apollo - .mutate({ mutation: uploadFileMutation, variables: { file } }) - .then(reponse => { - console.log(response) - this.$toast.success('Upload successful') + .mutate({ + mutation: gql` + mutation($id: ID!, $avatarUpload: Upload) { + UpdateUser(id: $id, avatarUpload: $avatarUpload) { + id + } + } + `, + variables: { + avatarUpload: file, + id: this.user.id + } + }) + .then(response => { + this.$toast.success(this.$t('user.avatar.submitted')) }) .catch(error => this.$toast.error(error.message)) - }, - verror(file) { - console.log(file) } } } diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 186b31d41..c4d21b6e4 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -247,5 +247,10 @@ }, "shoutButton": { "shouted": "shouted" + }, + "user": { + "avatar": { + "submitted": "Upload successful" + } } } \ No newline at end of file diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index 5f7df20ac..6887eece2 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -14,14 +14,7 @@ :class="{'disabled-content': user.disabled}" style="position: relative; height: auto;" > - - - + Date: Mon, 20 May 2019 16:42:13 -0300 Subject: [PATCH 11/47] Remove apollo-upload-client - we are using graphql-client, which under the hood uses apollo-upload-client --- webapp/package.json | 1 - webapp/yarn.lock | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 78a2b37a5..0faf2a768 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -58,7 +58,6 @@ "accounting": "~0.4.1", "apollo-cache-inmemory": "~1.5.1", "apollo-client": "~2.5.1", - "apollo-upload-client": "^10.0.1", "cookie-universal-nuxt": "~2.0.14", "cross-env": "~5.2.0", "date-fns": "2.0.0-alpha.27", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index a857c26d3..9424251c3 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -2055,7 +2055,7 @@ apollo-tracing@0.6.0: apollo-server-env "2.3.0" graphql-extensions "0.6.0" -apollo-upload-client@^10.0.0, apollo-upload-client@^10.0.1: +apollo-upload-client@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-10.0.1.tgz#e8446288d03edb1c582c91c26a18b27533f85013" integrity sha512-K6WnuYQi0RRTNO+aSPVjoUWXp4QSr+eoKU4fE0OKQp25XRF2oXl2cTLs+Q4Nk0wOIHM76YGdo/IHtzuNR7jO+A== @@ -3273,7 +3273,7 @@ cookie-universal@^2.0.14: "@types/cookie" "^0.3.1" cookie "^0.3.1" -cookie@0.4.0: +cookie@0.4.0, cookie@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== @@ -3283,11 +3283,6 @@ cookie@^0.3.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= -cookie@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" From 73fc0a420c7be4e22eb222c36550f6b2e7bae18a Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Mon, 20 May 2019 17:30:51 -0300 Subject: [PATCH 12/47] Improve CSS, add key to rerender Upload - re-renders when avatar is successful updated --- webapp/components/Upload/index.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/webapp/components/Upload/index.vue b/webapp/components/Upload/index.vue index 971ccb6b8..ed1e96c32 100644 --- a/webapp/components/Upload/index.vue +++ b/webapp/components/Upload/index.vue @@ -2,6 +2,7 @@
-
-
+
+
` @@ -90,6 +91,7 @@ export default { mutation($id: ID!, $avatarUpload: Upload) { UpdateUser(id: $id, avatarUpload: $avatarUpload) { id + avatar } } `, @@ -108,8 +110,7 @@ export default {