From 97a374fd8453213a71b56f211d09b3d389c304a5 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Tue, 28 May 2019 12:46:52 -0300 Subject: [PATCH 1/4] Fix placeholder text not translating bug - tiptap-extensions are not reactive - we must call a method to change them dynamically - emit changeLanguage event, which is listened for by the Editor component, which then calls a method to set the emptyNodeText of tiptap --- webapp/components/Editor/index.vue | 8 ++++++++ webapp/components/LocaleSwitch.vue | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/webapp/components/Editor/index.vue b/webapp/components/Editor/index.vue index ac1391a42..ca6ee4779 100644 --- a/webapp/components/Editor/index.vue +++ b/webapp/components/Editor/index.vue @@ -327,10 +327,18 @@ export default { }, }, }, + mounted() { + this.$root.$on('changeLanguage', () => { + this.changePlaceHolderText() + }) + }, beforeDestroy() { this.editor.destroy() }, methods: { + changePlaceHolderText() { + this.editor.extensions.options.placeholder.emptyNodeText = this.$t('editor.placeholder') + }, // navigate to the previous item // if it's the first item, navigate to the last one upHandler() { diff --git a/webapp/components/LocaleSwitch.vue b/webapp/components/LocaleSwitch.vue index a00f38109..840990c19 100644 --- a/webapp/components/LocaleSwitch.vue +++ b/webapp/components/LocaleSwitch.vue @@ -14,7 +14,8 @@ {{ current.code.toUpperCase() }} + /> + {{ current.code.toUpperCase() }} Date: Tue, 28 May 2019 20:35:47 -0300 Subject: [PATCH 2/4] Fix user avatar jumping on upload --- webapp/components/Upload/index.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/webapp/components/Upload/index.vue b/webapp/components/Upload/index.vue index 831edd2f8..f43ede7e6 100644 --- a/webapp/components/Upload/index.vue +++ b/webapp/components/Upload/index.vue @@ -48,13 +48,6 @@ export default {
-
-
-
-
-
-
- ` }, @@ -117,15 +110,16 @@ export default { } #customdropzone .dz-preview { + transition: all 0.2s ease-out; width: 160px; display: flex; } #customdropzone .dz-preview .dz-image { - position: relative; - width: 122px; - height: 122px; - margin: -35px; + width: 100%; + height: 100%; + object-fit: contain; + overflow: hidden; } #customdropzone .dz-preview .dz-image > div { From 0003a98fd2456d6c6db50a719b5147b90693570c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" Date: Mon, 27 May 2019 22:19:59 +0000 Subject: [PATCH 3/4] Bump prettier from 1.14.3 to 1.17.1 in /backend Bumps [prettier](https://github.com/prettier/prettier) from 1.14.3 to 1.17.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.14.3...1.17.1) Signed-off-by: dependabot[bot] --- backend/package.json | 2 +- backend/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/package.json b/backend/package.json index 9f2bbe7ab..71c050461 100644 --- a/backend/package.json +++ b/backend/package.json @@ -105,7 +105,7 @@ "graphql-request": "~1.8.2", "jest": "~24.8.0", "nodemon": "~1.19.1", - "prettier": "~1.14.3", + "prettier": "~1.17.1", "supertest": "~4.0.2" } } diff --git a/backend/yarn.lock b/backend/yarn.lock index 176af3893..50415cf09 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -6233,10 +6233,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@~1.14.3: - version "1.14.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" - integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg== +prettier@~1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" + integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg== pretty-format@^24.8.0: version "24.8.0" From ffd584ded1ddc863b0c5a692ce5fc4bd0538f404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Wed, 29 May 2019 12:36:26 +0200 Subject: [PATCH 4/4] Fix prettier --- backend/src/middleware/permissionsMiddleware.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/middleware/permissionsMiddleware.js b/backend/src/middleware/permissionsMiddleware.js index 2e7a2cd1a..b1a08a14d 100644 --- a/backend/src/middleware/permissionsMiddleware.js +++ b/backend/src/middleware/permissionsMiddleware.js @@ -1,9 +1,9 @@ import { rule, shield, allow, or } from 'graphql-shield' /* -* TODO: implement -* See: https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363 -*/ + * TODO: implement + * See: https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363 + */ const isAuthenticated = rule()(async (parent, args, ctx, info) => { return ctx.user !== null })