merged master in

This commit is contained in:
Grzegorz Leoniec 2018-11-30 12:09:37 +01:00
commit d54fa3f85b
17 changed files with 5431 additions and 3318 deletions

View File

@ -15,11 +15,11 @@ RUN apk --no-cache add git
COPY package.json .
COPY yarn.lock .
COPY styleguide/ ./styleguide
RUN yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines
RUN yarn install --production=false --frozen-lockfile --non-interactive
# Install and build Styleguide
COPY styleguide/ ./styleguide
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive --ignore-engines \
RUN cd styleguide && yarn install --production=false --frozen-lockfile --non-interactive \
&& cd .. \
&& yarn run styleguide:build \
&& rm -Rf styleguide/node_modules

View File

@ -7,11 +7,10 @@
### Install
``` bash
# NOTE: currently we need the --ignore-engines parameter as one package is an idiot and dont like new node versions
# install all dependencies
$ cd styleguide && yarn install --ignore-engines && cd ..
$ cd styleguide && yarn install && cd ..
$ yarn run styleguide:build
$ yarn install --ignore-engines
$ yarn install
```
### Development

View File

@ -1,5 +1,5 @@
const pkg = require('./package')
const envWhitelist = ['NODE_ENV', 'BACKEND_URL', 'MAINTENANCE']
const envWhitelist = ['NODE_ENV', 'MAINTENANCE']
const dev = process.env.NODE_ENV !== 'production'
module.exports = {
@ -100,16 +100,39 @@ module.exports = {
** Nuxt.js modules
*/
modules: [
'@nuxtjs/apollo',
'@nuxtjs/axios',
['@nuxtjs/dotenv', { only: envWhitelist }],
['nuxt-env', { keys: envWhitelist }]
['nuxt-env', { keys: envWhitelist }],
'@nuxtjs/apollo',
'@nuxtjs/axios'
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
debug: dev,
proxy: true
},
proxy: {
'/api': {
// make this configurable (nuxt-dotenv)
target: process.env.BACKEND_URL || 'http://localhost:4000',
pathRewrite: { '^/api': '' },
toProxy: true, // cloudflare needs that
changeOrigin: true,
headers: {
Accept: 'application/json',
'X-UI-Request': true,
'X-API-TOKEN': process.env.BACKEND_TOKEN || 'NULL'
}
}
},
// Give apollo module options
apollo: {
// tokenName: 'yourApolloTokenName', // optional, default: apollo-token
tokenExpires: 1, // optional, default: 7 (days)
tokenName: 'human-connection-token', // optional, default: apollo-token
tokenExpires: 3, // optional, default: 7 (days)
// includeNodeModules: true, // optional, default: false (this includes graphql-tag for node_modules folder)
// optional
errorHandler(error) {

View File

@ -11,7 +11,7 @@
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue .",
"styleguide": "cd ./styleguide && yarn dev",
"styleguide:build": "cd ./styleguide && yarn build:lib && cd ../ && yarn upgrade vue-cion-design-system --ignore-engines",
"styleguide:build": "cd ./styleguide && yarn build:lib && cd ../ && yarn upgrade vue-cion-design-system",
"test": "jest",
"precommit": "yarn lint"
},
@ -33,12 +33,13 @@
},
"dependencies": {
"@nuxtjs/apollo": "^4.0.0-rc3",
"@nuxtjs/axios": "^5.3.4",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/dotenv": "^1.3.0",
"accounting": "^0.4.1",
"cross-env": "^5.2.0",
"date-fns": "^2.0.0-alpha.24",
"express": "^4.16.3",
"graphql": "^14.0.2",
"graphql-tag": "^2.10.0",
"jsonwebtoken": "^8.3.0",
"nuxt": "^2.0.0",
@ -46,7 +47,7 @@
"v-tooltip": "^2.0.0-rc.33",
"vue-cion-design-system": "file:./styleguide",
"vue-count-to": "^1.0.13",
"vue-izitoast": "^1.1.0"
"vue-izitoast": "git://github.com/arthurvasconcelos/vue-izitoast.git"
},
"devDependencies": {
"@vue/eslint-config-prettier": "^4.0.1",

View File

@ -92,7 +92,7 @@ export default {
try {
await this.$store.dispatch('auth/login', { ...this.form })
this.$toast.success('You are logged in!')
this.$router.replace('/')
this.$router.replace(this.$route.query.path || '/')
} catch (err) {
this.$toast.error(err.message)
}

View File

@ -1,12 +1,12 @@
export default function({ app }) {
const backendUrl = app.$env.BACKEND_URL || 'http://localhost:4000'
const backendUrl = process.BACKEND_URL || 'http://localhost:4000'
return {
httpEndpoint: backendUrl,
httpEndpoint: process.server ? backendUrl : '/api',
httpLinkOptions: {
credentials: 'same-origin'
},
credentials: true,
tokenName: 'apollo-token',
tokenName: 'human-connection-token',
persisting: false,
websocketsOnly: false
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -23,7 +23,7 @@
"@vue/cli-plugin-eslint": "^3.0.0-rc.12",
"@vue/cli-plugin-unit-jest": "^3.0.1",
"@vue/cli-service": "^3.0.0-rc.12",
"@vue/eslint-config-prettier": "^3.0.0-rc.12",
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/test-utils": "^1.0.0-beta.20",
"async-validator": "^1.8.5",
"babel-core": "7.0.0-bridge.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 90 KiB

File diff suppressed because it is too large Load Diff

2982
yarn.lock

File diff suppressed because it is too large Load Diff