From 413a03fa6db1cd9cec5db5a589f7d14e44ba9fa6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 19 Jan 2021 02:32:09 +0000 Subject: [PATCH 001/462] Bump stack-utils from 2.0.1 to 2.0.3 in /webapp Bumps [stack-utils](https://github.com/tapjs/stack-utils) from 2.0.1 to 2.0.3. - [Release notes](https://github.com/tapjs/stack-utils/releases) - [Commits](https://github.com/tapjs/stack-utils/compare/v2.0.1...v2.0.3) Signed-off-by: dependabot-preview[bot] --- webapp/package.json | 2 +- webapp/yarn.lock | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 58d855809..23134c19a 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -78,7 +78,7 @@ "nuxt-dropzone": "^1.0.4", "nuxt-env": "~0.1.0", "sass": "^1.30.0", - "stack-utils": "^2.0.1", + "stack-utils": "^2.0.3", "tippy.js": "^4.3.5", "tiptap": "~1.26.6", "tiptap-extensions": "~1.28.8", diff --git a/webapp/yarn.lock b/webapp/yarn.lock index dce6b5f25..967acf453 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -16099,14 +16099,7 @@ stack-trace@0.0.10: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= -stack-utils@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.1.tgz#3df48345a3b92adc06038f0e95782df61beff742" - integrity sha512-BvBTnHGm8boe+HiJFqP19ywEsGlfQAKqW78pbfvUuzCbUuxPPUyLrH5dYFY+Xn9IpLY3b5ZmMcl8jAqXB4wddg== - dependencies: - escape-string-regexp "^2.0.0" - -stack-utils@^2.0.2: +stack-utils@^2.0.2, stack-utils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== From d9810202326b4636d222c8ca43c04aa8c29c9ee1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 20:35:15 +0000 Subject: [PATCH 002/462] Bump merge-graphql-schemas from 1.7.7 to 1.7.8 in /backend Bumps [merge-graphql-schemas](https://github.com/Urigo/merge-graphql-schemas) from 1.7.7 to 1.7.8. - [Release notes](https://github.com/Urigo/merge-graphql-schemas/releases) - [Commits](https://github.com/Urigo/merge-graphql-schemas/compare/1.7.7...v1.7.8) Signed-off-by: dependabot-preview[bot] --- backend/package.json | 2 +- backend/yarn.lock | 99 ++++++++++++++++++++++++++------------------ 2 files changed, 59 insertions(+), 42 deletions(-) diff --git a/backend/package.json b/backend/package.json index 786fe6641..7d9e12ace 100644 --- a/backend/package.json +++ b/backend/package.json @@ -72,7 +72,7 @@ "languagedetect": "^2.0.0", "linkifyjs": "~2.1.8", "lodash": "~4.17.14", - "merge-graphql-schemas": "^1.7.7", + "merge-graphql-schemas": "^1.7.8", "metascraper": "^5.11.8", "metascraper-audio": "^5.14.26", "metascraper-author": "^5.14.22", diff --git a/backend/yarn.lock b/backend/yarn.lock index 7d6558da0..44f4d2dcc 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -910,6 +910,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.9.2": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" @@ -956,32 +963,32 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@graphql-toolkit/common@0.9.12": - version "0.9.12" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/common/-/common-0.9.12.tgz#a3bf91d00130100cfa0a72be718b16cc1011ab45" - integrity sha512-NjBVxeM1GB0bldiBm4UQoxKtbu/hjRfcqDEt1JPia+uXgFde3qTxtF5IZkworRFNCp+8KPSVrwcreQHSfFW63w== +"@graphql-toolkit/common@0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@graphql-toolkit/common/-/common-0.10.4.tgz#7785f2a3f14559d0778859c49f4442078c196695" + integrity sha512-HQ3HaxCqX+UE8y/0h7LMDBBGSIKJxY/gaQesaksvE2Y+N4NpSWdiW6HpOcgXfC2HGf9yM0hEdsERzzL8z3mbHQ== dependencies: aggregate-error "3.0.1" camel-case "4.1.1" - graphql-tools-fork "9.0.1" + graphql-tools "5.0.0" lodash "4.17.15" -"@graphql-toolkit/file-loading@0.9.12": - version "0.9.12" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/file-loading/-/file-loading-0.9.12.tgz#f7d5d7e042df59c4e6c8fe3417c67dd1cddf9043" - integrity sha512-xEmKkbWI5FXQARTN3dbPzshwcmduOJUvx1QGsfcuryVDdQJZynUEaPF7IxYaFpvQF7vwxGIRdff/jC/a5ypDrA== +"@graphql-toolkit/file-loading@0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@graphql-toolkit/file-loading/-/file-loading-0.10.4.tgz#50e8933e44b17853544c1fe63350df93f33a5e80" + integrity sha512-oUmy/sO3BJfax85pVKI7FZ6TWrViNuWXoJkRM293YV9bKGuYU9TgqZoHyM+oEqWO5ruXCL/nCdw3cIBau+rSNA== dependencies: globby "11.0.0" unixify "1.0.0" -"@graphql-toolkit/schema-merging@0.9.12": - version "0.9.12" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/schema-merging/-/schema-merging-0.9.12.tgz#f058a7d256a4ed0e61e9874f90ae03326b81668e" - integrity sha512-ciqxLeMw7KPbJcq/xgnPbGyJGRO6bO1zQcdWCUSssyw8VDRHj5PFqEOAzT88eZQkEtg3qLN/wQEypeyFyNTHzw== +"@graphql-toolkit/schema-merging@0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@graphql-toolkit/schema-merging/-/schema-merging-0.10.4.tgz#2428590a531a33e9fe03be27cce9030f1c4c044b" + integrity sha512-naL6reYBuILLMrkMfKz0lOLL0kl6gGYnaaywnO/Dgp9F4NeAxDdAs5CV6Fy9NO5OzePFP58Dnc4sh2RyYrrFJg== dependencies: - "@graphql-toolkit/common" "0.9.12" + "@graphql-toolkit/common" "0.10.4" deepmerge "4.2.2" - graphql-tools-fork "9.0.1" + graphql-tools "5.0.0" tslib "1.11.1" "@hapi/address@2.x.x": @@ -2036,7 +2043,7 @@ apollo-link-context@~1.0.20: apollo-link "^1.2.14" tslib "^1.9.3" -apollo-link-http-common@^0.2.15, apollo-link-http-common@^0.2.16: +apollo-link-http-common@^0.2.14, apollo-link-http-common@^0.2.16: version "0.2.16" resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== @@ -2054,7 +2061,7 @@ apollo-link-http@~1.5.17: apollo-link-http-common "^0.2.16" tslib "^1.9.3" -apollo-link@^1.0.0, apollo-link@^1.2.13, apollo-link@^1.2.14: +apollo-link@^1.0.0, apollo-link@^1.2.12, apollo-link@^1.2.14: version "1.2.14" resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== @@ -2211,6 +2218,16 @@ apollo-tracing@^0.12.0: apollo-server-env "^2.4.5" apollo-server-plugin-base "^0.10.2" +apollo-upload-client@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/apollo-upload-client/-/apollo-upload-client-13.0.0.tgz#146d1ddd85d711fcac8ca97a72d3ca6787f2b71b" + integrity sha512-lJ9/bk1BH1lD15WhWRha2J3+LrXrPIX5LP5EwiOUHv8PCORp4EUrcujrA3rI5hZeZygrTX8bshcuMdpqpSrvtA== + dependencies: + "@babel/runtime" "^7.9.2" + apollo-link "^1.2.12" + apollo-link-http-common "^0.2.14" + extract-files "^8.0.0" + apollo-utilities@1.3.3, apollo-utilities@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c" @@ -4299,10 +4316,10 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-files@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-7.0.0.tgz#3dc7853320ff7876ec62d6e98f2f4e6f3e6282f6" - integrity sha512-3AUlT7TD+DbQXNe3t70QrgJU6Wgcp7rk1Zm0vqWz8OYnw4vxihgG0TgZ2SIGrVqScc4WfOu7B4a0BezGJ0YqvQ== +extract-files@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-8.1.0.tgz#46a0690d0fe77411a2e3804852adeaa65cd59288" + integrity sha512-PTGtfthZK79WUMk+avLmwx3NGdU8+iVFXC2NMGxKsn0MnihOG2lvumj+AZo8CTwTrwjXDgZ5tztbRlEdRjBonQ== extsprintf@1.3.0: version "1.3.0" @@ -4849,19 +4866,19 @@ graphql-tag@^2.9.2, graphql-tag@~2.10.3: resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.3.tgz#ea1baba5eb8fc6339e4c4cf049dabe522b0edf03" integrity sha512-4FOv3ZKfA4WdOKJeHdz6B3F/vxBLSgmBcGeAFPf4n1F64ltJUvOOerNj0rsJxONQGdhUMynQIvd6LzB+1J5oKA== -graphql-tools-fork@9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/graphql-tools-fork/-/graphql-tools-fork-9.0.1.tgz#fc8df40c108bdba3268999dea355cc614c765038" - integrity sha512-kM6mUNVekgnWKtVqLGQ9HvQqQ3zZVPZRg1esltBoohsbUMaChl+9QkjBjoMxnZPnbTGOOGGagopNBQALIBysNg== +graphql-tools@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-5.0.0.tgz#67281c834a0e29f458adba8018f424816fa627e9" + integrity sha512-5zn3vtn//382b7G3Wzz3d5q/sh+f7tVrnxeuhTMTJ7pWJijNqLxH7VEzv8VwXCq19zAzHYEosFHfXiK7qzvk7w== dependencies: - apollo-link "^1.2.13" - apollo-link-http-common "^0.2.15" + apollo-link "^1.2.14" + apollo-upload-client "^13.0.0" deprecated-decorator "^0.1.6" - extract-files "^7.0.0" form-data "^3.0.0" iterall "^1.3.0" node-fetch "^2.6.0" - uuid "^7.0.2" + tslib "^1.11.1" + uuid "^7.0.3" graphql-tools@^4.0.0, graphql-tools@^4.0.4, graphql-tools@^4.0.5: version "4.0.8" @@ -6606,13 +6623,13 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= -merge-graphql-schemas@^1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/merge-graphql-schemas/-/merge-graphql-schemas-1.7.7.tgz#673898f97c384d88fd66e49359b2f604e5864441" - integrity sha512-3mjFHXpsF+bnsnSy/FlZiWCcNo7AULuG8kEBE+YVX8qbzNrEPJVhSg7ANr5LjQZbGtSlTz7fa3Wqw0bfbQ5R5Q== +merge-graphql-schemas@^1.7.8: + version "1.7.8" + resolved "https://registry.yarnpkg.com/merge-graphql-schemas/-/merge-graphql-schemas-1.7.8.tgz#11a0a672a38a61d988c09ffdebe1bd4f8418de48" + integrity sha512-C3EJ1i86OjmbcCT524wVPRl17M5VZzgyh9kIGYAlYnAILX+7xfh8cCbMKfehh9n4opZg6CtcPogCiVZ6PB2NyQ== dependencies: - "@graphql-toolkit/file-loading" "0.9.12" - "@graphql-toolkit/schema-merging" "0.9.12" + "@graphql-toolkit/file-loading" "0.10.4" + "@graphql-toolkit/schema-merging" "0.10.4" tslib "1.11.1" merge-stream@^2.0.0: @@ -9406,15 +9423,15 @@ ts-invariant@^0.4.0: dependencies: tslib "^1.9.3" -tslib@1.11.1, tslib@^1.9.0: +tslib@1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== -tslib@^1.10.0, tslib@^1.9.3: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== +tslib@^1.10.0, tslib@^1.11.1, tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tunnel-agent@^0.6.0: version "0.6.0" @@ -9689,7 +9706,7 @@ uuid@^3.1.0, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^7.0.2: +uuid@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== From da041db83af82f1599fcbb5d30aecd3b68fd38f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 27 Jan 2021 11:08:11 +0100 Subject: [PATCH 003/462] Add Story for CreateUserAccount.vue, as well for experimenting with storybook --- .../Registration/CreateUserAccount.story.js | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 webapp/components/Registration/CreateUserAccount.story.js diff --git a/webapp/components/Registration/CreateUserAccount.story.js b/webapp/components/Registration/CreateUserAccount.story.js new file mode 100644 index 000000000..054ee71b4 --- /dev/null +++ b/webapp/components/Registration/CreateUserAccount.story.js @@ -0,0 +1,84 @@ +import { storiesOf } from '@storybook/vue' +import { withA11y } from '@storybook/addon-a11y' +import { action } from '@storybook/addon-actions' +import Vuex from 'vuex' +import helpers from '~/storybook/helpers' +import links from '~/constants/links.js' +import metadata from '~/constants/metadata.js' +import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch' +import CreateUserAccount from './CreateUserAccount.vue' + +helpers.init() + +const createStore = ({ loginSuccess }) => { + return new Vuex.Store({ + modules: { + auth: { + namespaced: true, + state: () => ({ + pending: false, + }), + mutations: { + SET_PENDING(state, pending) { + state.pending = pending + }, + }, + getters: { + pending(state) { + return !!state.pending + }, + }, + actions: { + async login({ commit, dispatch }, args) { + action('Vuex action `auth/login`')(args) + return new Promise((resolve, reject) => { + commit('SET_PENDING', true) + setTimeout(() => { + commit('SET_PENDING', false) + if (loginSuccess) { + resolve(loginSuccess) + } else { + reject(new Error('Login unsuccessful')) + } + }, 1000) + }) + }, + }, + }, + }, + }) +} + +storiesOf('CreateUserAccount', module) + .addDecorator(withA11y) + .addDecorator(helpers.layout) + .add('standard', () => ({ + components: { LocaleSwitch, CreateUserAccount }, + store: createStore({ loginSuccess: true }), + data: () => ({ + links, + metadata, + nonce: 'A34RB56', + email: 'user@example.org', + }), + methods: { + handleSuccess() { + action('You are logged in!')() + }, + }, + template: ` + + + + + + + + `, + })) From 1ffcb0f077355f3a2c3f7d9f3fc13c8295458b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 27 Jan 2021 11:11:35 +0100 Subject: [PATCH 004/462] Add ComponentSlider and RegistrationSlider, as well as story, starting --- .../ComponentSlider/ComponentSlider.story.js | 128 ++++++++++ .../ComponentSlider/ComponentSlider.vue | 163 +++++++++++++ .../RegistrationItemCreateUserAccount.vue | 222 ++++++++++++++++++ .../Registration/RegistrationSlider.story.js | 127 ++++++++++ .../Registration/RegistrationSlider.vue | 214 +++++++++++++++++ 5 files changed, 854 insertions(+) create mode 100644 webapp/components/ComponentSlider/ComponentSlider.story.js create mode 100644 webapp/components/ComponentSlider/ComponentSlider.vue create mode 100644 webapp/components/Registration/RegistrationItemCreateUserAccount.vue create mode 100644 webapp/components/Registration/RegistrationSlider.story.js create mode 100644 webapp/components/Registration/RegistrationSlider.vue diff --git a/webapp/components/ComponentSlider/ComponentSlider.story.js b/webapp/components/ComponentSlider/ComponentSlider.story.js new file mode 100644 index 000000000..8a7bac923 --- /dev/null +++ b/webapp/components/ComponentSlider/ComponentSlider.story.js @@ -0,0 +1,128 @@ +import { storiesOf } from '@storybook/vue' +import { withA11y } from '@storybook/addon-a11y' +import ComponentSlider from './ComponentSlider.vue' +import helpers from '~/storybook/helpers' + +helpers.init() + +// export const searchResults = [ +// { +// id: 'post-by-jenny', +// __typename: 'Post', +// slug: 'user-post-by-jenny', +// title: 'User Post by Jenny', +// value: 'User Post by Jenny', +// shoutedCount: 0, +// commentsCount: 4, +// createdAt: '2019-11-13T03:03:16.155Z', +// author: { +// id: 'u3', +// name: 'Jenny Rostock', +// slug: 'jenny-rostock', +// }, +// }, +// { +// id: 'f48f00a0-c412-432f-8334-4276a4e15d1c', +// __typename: 'Post', +// slug: 'eum-quos-est-molestiae-enim-magni-consequuntur-sed-commodi-eos', +// title: 'Eum quos est molestiae enim magni consequuntur sed commodi eos.', +// value: 'Eum quos est molestiae enim magni consequuntur sed commodi eos.', +// shoutedCount: 0, +// commentsCount: 0, +// createdAt: '2019-11-13T03:00:45.478Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'p7', +// __typename: 'Post', +// slug: 'this-is-post-7', +// title: 'This is post #7', +// value: 'This is post #7', +// shoutedCount: 1, +// commentsCount: 1, +// createdAt: '2019-11-13T03:00:23.098Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'p12', +// __typename: 'Post', +// slug: 'this-is-post-12', +// title: 'This is post #12', +// value: 'This is post #12', +// shoutedCount: 0, +// commentsCount: 12, +// createdAt: '2019-11-13T03:00:23.098Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'u1', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Peter Lustig', +// slug: 'peter-lustig', +// }, +// { +// id: 'cdbca762-0632-4564-b646-415a0c42d8b8', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Herbert Schultz', +// slug: 'herbert-schultz', +// }, +// { +// id: 'u2', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Bob der Baumeister', +// slug: 'bob-der-baumeister', +// }, +// { +// id: '7b654f72-f4da-4315-8bed-39de0859754b', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Tonya Mohr', +// slug: 'tonya-mohr', +// }, +// { +// id: 'Hashtag', +// __typename: 'Tag', +// }, +// ] + +storiesOf('ComponentSlider', module) + .addDecorator(withA11y) + .addDecorator(helpers.layout) + .add('standard', () => ({ + components: { ComponentSlider }, + store: helpers.store, + data: () => ({ + // searchResults, + }), + template: ` + + + `, + })) diff --git a/webapp/components/ComponentSlider/ComponentSlider.vue b/webapp/components/ComponentSlider/ComponentSlider.vue new file mode 100644 index 000000000..1d2c1b9bc --- /dev/null +++ b/webapp/components/ComponentSlider/ComponentSlider.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/webapp/components/Registration/RegistrationItemCreateUserAccount.vue b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue new file mode 100644 index 000000000..fb855017a --- /dev/null +++ b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue @@ -0,0 +1,222 @@ + + + + + diff --git a/webapp/components/Registration/RegistrationSlider.story.js b/webapp/components/Registration/RegistrationSlider.story.js new file mode 100644 index 000000000..7acce0bf0 --- /dev/null +++ b/webapp/components/Registration/RegistrationSlider.story.js @@ -0,0 +1,127 @@ +import { storiesOf } from '@storybook/vue' +import { withA11y } from '@storybook/addon-a11y' +import RegistrationSlider from './RegistrationSlider.vue' +import helpers from '~/storybook/helpers' + +helpers.init() + +// export const searchResults = [ +// { +// id: 'post-by-jenny', +// __typename: 'Post', +// slug: 'user-post-by-jenny', +// title: 'User Post by Jenny', +// value: 'User Post by Jenny', +// shoutedCount: 0, +// commentsCount: 4, +// createdAt: '2019-11-13T03:03:16.155Z', +// author: { +// id: 'u3', +// name: 'Jenny Rostock', +// slug: 'jenny-rostock', +// }, +// }, +// { +// id: 'f48f00a0-c412-432f-8334-4276a4e15d1c', +// __typename: 'Post', +// slug: 'eum-quos-est-molestiae-enim-magni-consequuntur-sed-commodi-eos', +// title: 'Eum quos est molestiae enim magni consequuntur sed commodi eos.', +// value: 'Eum quos est molestiae enim magni consequuntur sed commodi eos.', +// shoutedCount: 0, +// commentsCount: 0, +// createdAt: '2019-11-13T03:00:45.478Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'p7', +// __typename: 'Post', +// slug: 'this-is-post-7', +// title: 'This is post #7', +// value: 'This is post #7', +// shoutedCount: 1, +// commentsCount: 1, +// createdAt: '2019-11-13T03:00:23.098Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'p12', +// __typename: 'Post', +// slug: 'this-is-post-12', +// title: 'This is post #12', +// value: 'This is post #12', +// shoutedCount: 0, +// commentsCount: 12, +// createdAt: '2019-11-13T03:00:23.098Z', +// author: { +// id: 'u6', +// name: 'Louie', +// slug: 'louie', +// }, +// }, +// { +// id: 'u1', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Peter Lustig', +// slug: 'peter-lustig', +// }, +// { +// id: 'cdbca762-0632-4564-b646-415a0c42d8b8', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Herbert Schultz', +// slug: 'herbert-schultz', +// }, +// { +// id: 'u2', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Bob der Baumeister', +// slug: 'bob-der-baumeister', +// }, +// { +// id: '7b654f72-f4da-4315-8bed-39de0859754b', +// __typename: 'User', +// avatar: { +// url: +// 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', +// }, +// name: 'Tonya Mohr', +// slug: 'tonya-mohr', +// }, +// { +// id: 'Hashtag', +// __typename: 'Tag', +// }, +// ] + +storiesOf('RegistrationSlider', module) + .addDecorator(withA11y) + .addDecorator(helpers.layout) + .add('standard', () => ({ + components: { RegistrationSlider }, + store: helpers.store, + data: () => ({ + // searchResults, + }), + template: ` + + `, + })) diff --git a/webapp/components/Registration/RegistrationSlider.vue b/webapp/components/Registration/RegistrationSlider.vue new file mode 100644 index 000000000..3cb248931 --- /dev/null +++ b/webapp/components/Registration/RegistrationSlider.vue @@ -0,0 +1,214 @@ + + + + + From e062cbaa0c631c250486f7e55c67597f38f8f70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 27 Jan 2021 17:14:36 +0100 Subject: [PATCH 005/462] Implement ResistrationEnterInvite.vue, start --- .../ComponentSlider/ComponentSlider.vue | 176 +++++------------- .../RegistrationItemCreateUserAccount.vue | 1 + .../RegistrationItemEnterInvite.vue | 78 ++++++++ .../Registration/RegistrationSlider.vue | 173 ++--------------- 4 files changed, 146 insertions(+), 282 deletions(-) create mode 100644 webapp/components/Registration/RegistrationItemEnterInvite.vue diff --git a/webapp/components/ComponentSlider/ComponentSlider.vue b/webapp/components/ComponentSlider/ComponentSlider.vue index 1d2c1b9bc..41bf9b1cb 100644 --- a/webapp/components/ComponentSlider/ComponentSlider.vue +++ b/webapp/components/ComponentSlider/ComponentSlider.vue @@ -1,12 +1,18 @@

{{ $t('components.registration.signup.title', metadata) }}

- - - - - Test!!! - + + + - @@ -68,6 +29,7 @@ From 2068dd507bba76349ffa4e6cf4c29a696d76f4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 28 Jan 2021 13:51:26 +0100 Subject: [PATCH 006/462] Play with callbacks --- .../ComponentSlider/ComponentSlider.vue | 42 ++++++------------- .../RegistrationItemEnterInvite.vue | 11 ++++- .../Registration/RegistrationSlider.vue | 31 ++++++++------ 3 files changed, 41 insertions(+), 43 deletions(-) diff --git a/webapp/components/ComponentSlider/ComponentSlider.vue b/webapp/components/ComponentSlider/ComponentSlider.vue index 41bf9b1cb..80f5de462 100644 --- a/webapp/components/ComponentSlider/ComponentSlider.vue +++ b/webapp/components/ComponentSlider/ComponentSlider.vue @@ -1,19 +1,7 @@

{{ $t('components.registration.signup.title', metadata) }}

- + +

{{ $t('components.registration.signup.title', metadata) }}

- - +

{{ $t('components.registration.signup.title', metadata) }}

+ + + + + @@ -31,20 +48,24 @@ diff --git a/webapp/components/utils/PasswordFormHelper.js b/webapp/components/utils/PasswordFormHelper.js index 578238aca..da6cead90 100644 --- a/webapp/components/utils/PasswordFormHelper.js +++ b/webapp/components/utils/PasswordFormHelper.js @@ -15,7 +15,7 @@ export default function PasswordForm({ translate }) { }, passwordConfirmation: [ { - validator(rule, value, callback, source, options) { + validator(_rule, value, callback, source, _options) { var errors = [] if (source.password !== value) { errors.push(new Error(passwordMismatchMessage)) From a93d70b2d646f5d15a382af324d2987a4220f58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 4 Feb 2021 15:33:17 +0100 Subject: [PATCH 020/462] Add experimental own validators and set values on mounted --- .../RegistrationItemCreateUserAccount.vue | 226 +++++------------- .../Registration/RegistrationSlider.vue | 5 +- 2 files changed, 68 insertions(+), 163 deletions(-) diff --git a/webapp/components/Registration/RegistrationItemCreateUserAccount.vue b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue index cd3814984..e63f24c3c 100644 --- a/webapp/components/Registration/RegistrationItemCreateUserAccount.vue +++ b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue @@ -160,10 +160,14 @@ export default { supportEmail: emails.SUPPORT, formData: { name: '', - // about: '', - // Wolle name: this.sliderData.collectedInputData.name ? this.sliderData.collectedInputData.name : '', - about: this.sliderData.collectedInputData.about ? this.sliderData.collectedInputData.about : '', + about: '', + // name: this.sliderData.collectedInputData.name ? this.sliderData.collectedInputData.name : '', + // about: this.sliderData.collectedInputData.about ? this.sliderData.collectedInputData.about : '', ...passwordForm.formData, + // ...{ + // password: this.sliderData.collectedInputData.password ? this.sliderData.collectedInputData.password : '', + // passwordConfirmation: this.sliderData.collectedInputData.passwordConfirmation ? this.sliderData.collectedInputData.passwordConfirmation : '', + // } }, formSchema: { name: { @@ -183,191 +187,91 @@ export default { // TODO: Our styleguide does not support checkmarks. // Integrate termsAndConditionsConfirmed into `this.formData` once we // have checkmarks available. - // termsAndConditionsConfirmed: false, - // dataPrivacy: false, - // minimumAge: false, - // noCommercial: false, - // noPolitical: false, + termsAndConditionsConfirmed: false, + dataPrivacy: false, + minimumAge: false, + noCommercial: false, + noPolitical: false, // TODO: Our styleguide does not support checkmarks. // Integrate termsAndConditionsConfirmed into `this.formData` once we // have checkmarks available. - termsAndConditionsConfirmed: this.sliderData.collectedInputData.termsAndConditionsConfirmed ? this.sliderData.collectedInputData.termsAndConditionsConfirmed : false, - dataPrivacy: this.sliderData.collectedInputData.dataPrivacy ? this.sliderData.collectedInputData.dataPrivacy : false, - minimumAge: this.sliderData.collectedInputData.minimumAge ? this.sliderData.collectedInputData.minimumAge : false, - noCommercial: this.sliderData.collectedInputData.noCommercial ? this.sliderData.collectedInputData.noCommercial : false, - noPolitical: this.sliderData.collectedInputData.noPolitical ? this.sliderData.collectedInputData.noPolitical : false, + // termsAndConditionsConfirmed: this.sliderData.collectedInputData.termsAndConditionsConfirmed ? this.sliderData.collectedInputData.termsAndConditionsConfirmed : false, + // dataPrivacy: this.sliderData.collectedInputData.dataPrivacy ? this.sliderData.collectedInputData.dataPrivacy : false, + // minimumAge: this.sliderData.collectedInputData.minimumAge ? this.sliderData.collectedInputData.minimumAge : false, + // noCommercial: this.sliderData.collectedInputData.noCommercial ? this.sliderData.collectedInputData.noCommercial : false, + // noPolitical: this.sliderData.collectedInputData.noPolitical ? this.sliderData.collectedInputData.noPolitical : false, } }, + mounted: function () { + this.$nextTick(function () { + // Code that will run only after the + // entire view has been rendered + console.log('mounted !!! ') + this.formData.name = this.sliderData.collectedInputData.name ? this.sliderData.collectedInputData.name : '', + this.formData.about = this.sliderData.collectedInputData.about ? this.sliderData.collectedInputData.about : '', + this.formData.password = this.sliderData.collectedInputData.password ? this.sliderData.collectedInputData.password : '' + this.formData.passwordConfirmation = this.sliderData.collectedInputData.passwordConfirmation ? this.sliderData.collectedInputData.passwordConfirmation : '' + this.termsAndConditionsConfirmed = this.sliderData.collectedInputData.termsAndConditionsConfirmed ? this.sliderData.collectedInputData.termsAndConditionsConfirmed : false + this.dataPrivacy = this.sliderData.collectedInputData.dataPrivacy ? this.sliderData.collectedInputData.dataPrivacy : false + this.minimumAge = this.sliderData.collectedInputData.minimumAge ? this.sliderData.collectedInputData.minimumAge : false + this.noCommercial = this.sliderData.collectedInputData.noCommercial ? this.sliderData.collectedInputData.noCommercial : false + this.noPolitical = this.sliderData.collectedInputData.noPolitical ? this.sliderData.collectedInputData.noPolitical : false + }) + }, computed: { valid() { - // console.log('valid !!! this.formErrors: ', this.formErrors) - // console.log('valid !!! this.$slots: ', this.$slots) - // console.log('valid !!! this.$scopedSlots: ', this.$scopedSlots) - // console.log('this.formSchema: ', this.formSchema) - // console.log('this.formData: ', this.formData) - // return (this.formErrors || - // !this.termsAndConditionsConfirmed || - // !this.dataPrivacy || - // !this.minimumAge || - // !this.noCommercial || - // !this.noPolitical) - // const isNotValid = - // // this.formErrors || - // this.formErrors || - // !this.termsAndConditionsConfirmed || - // !this.dataPrivacy || - // !this.minimumAge || - // !this.noCommercial || - // !this.noPolitical + // console.log('valid !!! this.formData: ', this.formData, ' this.formData.password === this.formData.passwordConfirmation: ', this.formData.password === this.formData.passwordConfirmation) + // console.log('this.formData.name.length: ', this.formData.name.length, ' this.formData.password.length: ', this.formData.password.length) const isValid = - !this.formErrors && - this.formData.name.lenght >= 3 && + // !this.formErrors && + (this.formData.name.length >= 3) && + (this.formData.password.length >= 1) && + (this.formData.password === this.formData.passwordConfirmation) && this.termsAndConditionsConfirmed && this.dataPrivacy && this.minimumAge && this.noCommercial && this.noPolitical - // console.log('valid : ', !isNotValid) console.log('valid : ', isValid) - // const { name, about } = this.formData - // // const { email, nonce } = this - // // const { email, nonce } = this.sliderData.collectedInputData - // const termsAndConditionsAgreedVersion = VERSION - // const { - // termsAndConditionsConfirmed, - // dataPrivacy, - // minimumAge, - // noCommercial, - // noPolitical, - // } = this - // // const locale = this.$i18n.locale() - // // this.sliderData.validateCallback(true, { - // this.sliderData.validateCallback(!isNotValid, { - // name, - // // password, - // about, - // // email, - // // nonce, - // termsAndConditionsAgreedVersion, - // termsAndConditionsConfirmed, - // dataPrivacy, - // minimumAge, - // noCommercial, - // noPolitical, - // // locale, - // }) - // return !isNotValid return isValid }, }, watch: { - // notValid(newVal, _oldVal) { - // // Wolle const [oldPropertyA, oldProvertyB] = oldVal.split('|'); - // // const [newPropertyA, newProvertyB] = newVal.split('|'); - // // doSomething - // if (newVal) { - // this.sliderData.validateCallback(false) - // } else { - // const { name, about } = this.formData - // // const { email, nonce } = this - // // const { email, nonce } = this.sliderData.collectedInputData - // const termsAndConditionsAgreedVersion = VERSION - // const { - // termsAndConditionsConfirmed, - // dataPrivacy, - // minimumAge, - // noCommercial, - // noPolitical, - // } = this - // // const locale = this.$i18n.locale() - // // this.sliderData.validateCallback(true, { - // this.sliderData.validateCallback(true, { - // name, - // // password, - // about, - // // email, - // // nonce, - // termsAndConditionsAgreedVersion, - // termsAndConditionsConfirmed, - // dataPrivacy, - // minimumAge, - // noCommercial, - // noPolitical, - // // locale, - // }) - // } + // formData: { + // handler() { + // console.log('formData: ', this.formData) + // this.sendValidation() + // }, + // deep: true, + // immediate: true, // }, - valid(newVal) { - // Wolle const [oldPropertyA, oldProvertyB] = oldVal.split('|'); - // const [newPropertyA, newProvertyB] = newVal.split('|'); - // doSomething - if (newVal) { - this.sliderData.validateCallback(false) - } else { - const { name, about } = this.formData - // const { email, nonce } = this - // const { email, nonce } = this.sliderData.collectedInputData - const termsAndConditionsAgreedVersion = VERSION - const { - termsAndConditionsConfirmed, - dataPrivacy, - minimumAge, - noCommercial, - noPolitical, - } = this - // const locale = this.$i18n.locale() - // this.sliderData.validateCallback(true, { - this.sliderData.validateCallback(true, { - name, - // password, - about, - // email, - // nonce, - termsAndConditionsAgreedVersion, - termsAndConditionsConfirmed, - dataPrivacy, - minimumAge, - noCommercial, - noPolitical, - // locale, - }) - } + formData() { + console.log('formData: ', this.formData) + this.sendValidation() }, - formData: { - handler(newValue) { - this.sendValidation(newValue) - }, - deep: true, - immediate: true, + termsAndConditionsConfirmed() { + this.sendValidation() }, - termsAndConditionsConfirmed(newValue) { - this.sendValidation({termsAndConditionsConfirmed: newValue}) + dataPrivacy() { + this.sendValidation() }, - dataPrivacy(newValue) { - this.sendValidation({dataPrivacy: newValue}) + minimumAge() { + this.sendValidation() }, - minimumAge(newValue) { - this.sendValidation({minimumAge: newValue}) + noCommercial() { + this.sendValidation() }, - noCommercial(newValue) { - this.sendValidation({noCommercial: newValue}) - }, - noPolitical(newValue) { - this.sendValidation({noPolitical: newValue}) + noPolitical() { + this.sendValidation() }, }, methods: { - // setErrors(errors) { - // this.formErrors = errors - // // console.log('setErrors !!! this.formErrors: ', this.formErrors) - // return errors - // }, watchScopedSlotsCallback({errors}) { this.formErrors = errors console.log('watchScopedSlotsCallback !!! this.formErrors: ', this.formErrors) }, - sendValidation(newValues) { - const { name, about } = this.formData + sendValidation() { + const { name, about, password, passwordConfirmation } = this.formData // const { email, nonce } = this // const { email, nonce } = this.sliderData.collectedInputData const termsAndConditionsAgreedVersion = VERSION @@ -379,10 +283,11 @@ export default { noPolitical, } = this // const locale = this.$i18n.locale() - const nowValues = { + const value = { name, - // password, about, + password, + passwordConfirmation, // email, // nonce, termsAndConditionsAgreedVersion, @@ -393,7 +298,8 @@ export default { noPolitical, // locale, } - this.sliderData.validateCallback(this.valid, {...nowValues, ...newValues}) + console.log('sendValidation !!!', ' this.valid: ', this.valid, ' value: ', value) + this.sliderData.validateCallback(this.valid, value) }, async submit() { const { name, password, about } = this.formData diff --git a/webapp/components/Registration/RegistrationSlider.vue b/webapp/components/Registration/RegistrationSlider.vue index 51902a205..1fed20045 100644 --- a/webapp/components/Registration/RegistrationSlider.vue +++ b/webapp/components/Registration/RegistrationSlider.vue @@ -139,9 +139,8 @@ export default { }, }, methods: { - validateCallback(is, data = null) { - this.sliderData.sliders[this.sliderIndex].validated = is - // if (is) { + validateCallback(isValid, data = null) { + this.sliderData.sliders[this.sliderIndex].validated = isValid if (data) { this.sliderData.collectedInputData = { ...this.sliderData.collectedInputData, From d9e65597ceadc2b0740464405574d52ca2889b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 4 Feb 2021 15:45:29 +0100 Subject: [PATCH 021/462] Fix lint --- .../ComponentSlider/ComponentSlider.vue | 9 +- .../RegistrationItemCreateUserAccount.vue | 82 +++++++++---------- .../RegistrationItemEnterInvite.vue | 6 +- .../Registration/RegistrationSlider.vue | 28 +++---- .../Registration/WatchScopedSlotsCallback.vue | 8 +- 5 files changed, 62 insertions(+), 71 deletions(-) diff --git a/webapp/components/ComponentSlider/ComponentSlider.vue b/webapp/components/ComponentSlider/ComponentSlider.vue index 7b324f763..1be5c1371 100644 --- a/webapp/components/ComponentSlider/ComponentSlider.vue +++ b/webapp/components/ComponentSlider/ComponentSlider.vue @@ -13,15 +13,10 @@