Merge branch 'community_15_04_2021' of github.com:gradido/gradido into community_15_04_2021

This commit is contained in:
Dario Rekowski on RockPI 2021-04-21 09:58:44 +00:00
commit 809e9133ab
25 changed files with 894 additions and 367 deletions

View File

@ -6,34 +6,13 @@ on:
- master
jobs:
##############################################################################
# JOB: PREPARE ###############################################################
##############################################################################
#prepare:
# name: Prepare
# runs-on: ubuntu-latest
# # needs: [nothing]
# steps:
# ##########################################################################
# # CHECKOUT CODE ##########################################################
# ##########################################################################
# - name: Checkout code
# uses: actions/checkout@v2
# ##########################################################################
# # TODO: DO STUFF ??? #####################################################
# ##########################################################################
# - name: Check translation files
# run: |
# scripts/translations/sort.sh
# scripts/translations/missing-keys.sh
##############################################################################
# JOB: DOCKER BUILD COMMUNITY NEO4J ##########################################
##############################################################################
build_production_frontend:
name: Docker Build Production - Frontend
runs-on: ubuntu-latest
#needs: [prepare] [nothing]
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@ -65,116 +44,154 @@ jobs:
path: /tmp/frontend.tar
##############################################################################
# JOB: DOCKER BUILD PRODUCTION BACKEND #######################################
# JOB: DOCKER BUILD PRODUCTION LOGIN SERVER ##################################
##############################################################################
#build_production_backend:
# name: Docker Build Production - Backend
# runs-on: ubuntu-latest
# needs: [prepare]
# steps:
# ##########################################################################
# # CHECKOUT CODE ##########################################################
# ##########################################################################
# - name: Checkout code
# uses: actions/checkout@v2
# ##########################################################################
# # SET ENVS ###############################################################
# ##########################################################################
# - name: ENV - VERSION
# run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
# - name: ENV - BUILD_DATE
# run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
# - name: ENV - BUILD_VERSION
# run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
# - name: ENV - BUILD_COMMIT
# run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
# ##########################################################################
# # BUILD BACKEND DOCKER IMAGE (production) ################################
# ##########################################################################
# - name: backend | Build `production` image
# run: |
# docker build --target production -t "ocelotsocialnetwork/backend:latest" -t "ocelotsocialnetwork/backend:${VERSION}" -t "ocelotsocialnetwork/backend:${BUILD_VERSION}" backend/
# docker save "ocelotsocialnetwork/backend" > /tmp/backend.tar
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: docker-backend-production
# path: /tmp/backend.tar
build_production_login_server:
name: Docker Build Production - Login Server
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
##########################################################################
# SET ENVS ###############################################################
##########################################################################
- name: ENV - VERSION
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: ENV - BUILD_DATE
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: ENV - BUILD_VERSION
run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: ENV - BUILD_COMMIT
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
##########################################################################
# LOGIN SERVER ###########################################################
##########################################################################
- name: Login Server | Build `production` image
run: |
docker build -t "gradido/login_server:latest" -t "gradido/login_server:production" -t "gradido/login_server:${VERSION}" -t "gradido/login_server:${BUILD_VERSION}" login_server/
docker save "gradido/login_server" > /tmp/login_server.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-login-server-production
path: /tmp/login_server.tar
##############################################################################
# JOB: DOCKER BUILD PRODUCTION WEBAPP ########################################
# JOB: DOCKER BUILD PRODUCTION COMMUNITY SERVER ##############################
##############################################################################
#build_production_webapp:
# name: Docker Build Production - WebApp
# runs-on: ubuntu-latest
# needs: [prepare]
# steps:
# ##########################################################################
# # CHECKOUT CODE ##########################################################
# ##########################################################################
# - name: Checkout code
# uses: actions/checkout@v2
# ##########################################################################
# # SET ENVS ###############################################################
# ##########################################################################
# - name: ENV - VERSION
# run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
# - name: ENV - BUILD_DATE
# run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
# - name: ENV - BUILD_VERSION
# run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
# - name: ENV - BUILD_COMMIT
# run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
# ##########################################################################
# # BUILD WEBAPP DOCKER IMAGE (build) ######################################
# ##########################################################################
# - name: webapp | Build `production` image
# run: |
# docker build --target production -t "ocelotsocialnetwork/webapp:latest" -t "ocelotsocialnetwork/webapp:${VERSION}" -t "ocelotsocialnetwork/webapp:${BUILD_VERSION}" webapp/
# docker save "ocelotsocialnetwork/webapp" > /tmp/webapp.tar
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: docker-webapp-production
# path: /tmp/webapp.tar
build_production_community_server:
name: Docker Build Production - Community Server
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# SET ENVS ###############################################################
##########################################################################
- name: ENV - VERSION
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: ENV - BUILD_DATE
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: ENV - BUILD_VERSION
run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: ENV - BUILD_COMMIT
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
##########################################################################
# COMMUNITY SERVER #######################################################
##########################################################################
- name: Community Server | Build `production` image
run: |
docker build -t "gradido/community_server:latest" -t "gradido/community_server:production" -t "gradido/community_server:${VERSION}" -t "gradido/community_server:${BUILD_VERSION}" -f ./community_server/Dockerfile ./
docker save "gradido/community_server" > /tmp/community_server.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-community-server-production
path: /tmp/community_server.tar
##############################################################################
# JOB: DOCKER BUILD PRODUCTION MAINTENANCE ###################################
# JOB: DOCKER BUILD PRODUCTION MARIADB #######################################
##############################################################################
#build_production_maintenance:
# name: Docker Build Production - Maintenance
# runs-on: ubuntu-latest
# needs: [prepare]
# steps:
# ##########################################################################
# # CHECKOUT CODE ##########################################################
# ##########################################################################
# - name: Checkout code
# uses: actions/checkout@v2
# ##########################################################################
# # SET ENVS ###############################################################
# ##########################################################################
# - name: ENV - VERSION
# run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
# - name: ENV - BUILD_DATE
# run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
# - name: ENV - BUILD_VERSION
# run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
# - name: ENV - BUILD_COMMIT
# run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
# ##########################################################################
# # BUILD MAINTENANCE DOCKER IMAGE (build) #################################
# ##########################################################################
# - name: maintenance | Build `production` image
# # TODO: --target production
# run: |
# docker build -t "ocelotsocialnetwork/maintenance:latest" -t "ocelotsocialnetwork/maintenance:${VERSION}" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" webapp/ -f webapp/Dockerfile.maintenance
# docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: docker-maintenance-production
# path: /tmp/maintenance.tar
build_production_mariadb:
name: Docker Build Production - MariaDB
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# SET ENVS ###############################################################
##########################################################################
- name: ENV - VERSION
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: ENV - BUILD_DATE
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: ENV - BUILD_VERSION
run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: ENV - BUILD_COMMIT
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
##########################################################################
# MARIADB ################################################################
##########################################################################
- name: MariaDB | Build `production` image
run: |
docker build -t "gradido/mariadb:latest" -t "gradido/mariadb:production" -t "gradido/mariadb:${VERSION}" -t "gradido/mariadb:${BUILD_VERSION}" -f ./mariadb/Dockerfile ./
docker save "gradido/mariadb" > /tmp/mariadb.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-mariadb-production
path: /tmp/mariadb.tar
##############################################################################
# JOB: DOCKER BUILD PRODUCTION NGINX #########################################
##############################################################################
build_production_nginx:
name: Docker Build Production - Nginx
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# SET ENVS ###############################################################
##########################################################################
- name: ENV - VERSION
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- name: ENV - BUILD_DATE
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: ENV - BUILD_VERSION
run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: ENV - BUILD_COMMIT
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
##########################################################################
# NGINX ##################################################################
##########################################################################
- name: Nginx | Build `production` image
run: |
docker build -t "gradido/nginx:latest" -t "gradido/nginx:production" -t "gradido/nginx:${VERSION}" -t "gradido/nginx:${BUILD_VERSION}" -f ./nginx/Dockerfile ./
docker save "gradido/nginx" > /tmp/nginx.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-nginx-production
path: /tmp/nginx.tar
##############################################################################
# JOB: UPLOAD TO DOCKERHUB ###################################################
@ -182,7 +199,7 @@ jobs:
upload_to_dockerhub:
name: Upload to Dockerhub
runs-on: ubuntu-latest
needs: [build_production_frontend]
needs: [build_production_frontend, build_production_login_server, build_production_community_server, build_production_mariadb, build_production_nginx]
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@ -202,27 +219,34 @@ jobs:
path: /tmp
- name: Load Docker Image
run: docker load < /tmp/frontend.tar
#- name: Download Docker Image (Backend)
# uses: actions/download-artifact@v2
# with:
# name: docker-backend-production
# path: /tmp
#- name: Load Docker Image
# run: docker load < /tmp/backend.tar
#- name: Download Docker Image (WebApp)
# uses: actions/download-artifact@v2
# with:
# name: docker-webapp-production
# path: /tmp
#- name: Load Docker Image
# run: docker load < /tmp/webapp.tar
#- name: Download Docker Image (Maintenance)
# uses: actions/download-artifact@v2
# with:
# name: docker-maintenance-production
# path: /tmp
#- name: Load Docker Image
# run: docker load < /tmp/maintenance.tar
- name: Download Docker Image (Login Server)
uses: actions/download-artifact@v2
with:
name: docker-login-server-production
path: /tmp
- name: Load Docker Image
run: docker load < /tmp/login_server.tar
- name: Download Docker Image (Community Server)
uses: actions/download-artifact@v2
with:
name: docker-community-server-production
path: /tmp
- name: Load Docker Image
run: docker load < /tmp/community_server.tar
- name: Download Docker Image (MariaDB)
uses: actions/download-artifact@v2
with:
name: docker-mariadb-production
path: /tmp
- name: Load Docker Image
run: docker load < /tmp/mariadb.tar
- name: Download Docker Image (Nginx)
uses: actions/download-artifact@v2
with:
name: docker-nginx-production
path: /tmp
- name: Load Docker Image
run: docker load < /tmp/nginx.tar
##########################################################################
# Upload #################################################################
##########################################################################
@ -230,16 +254,18 @@ jobs:
run: echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
- name: Push frontend
run: docker push --all-tags gradido/frontend
#- name: Push backend
# run: docker push --all-tags ocelotsocialnetwork/backend
#- name: Push webapp
# run: docker push --all-tags ocelotsocialnetwork/webapp
#- name: Push maintenance
# run: docker push --all-tags ocelotsocialnetwork/maintenance
- name: Push login_server
run: docker push --all-tags gradido/login_server
- name: Push community_server
run: docker push --all-tags gradido/community_server
- name: Push MariaDB
run: docker push --all-tags gradido/mariadb
- name: Push Nginx
run: docker push --all-tags gradido/nginx
##############################################################################
# JOB: GITHUB TAG LATEST VERSION #############################################
##############################################################################
##############################################################################
github_tag:
name: Tag latest version on Github
runs-on: ubuntu-latest

View File

@ -46,17 +46,17 @@ jobs:
with:
submodules: recursive
##########################################################################
# BUILD LOGIN SERVER DOCKER IMAGE (build) ################################
# BUILD LOGIN SERVER DOCKER IMAGE ########################################
##########################################################################
- name: login server | Build `test` image
run: |
docker build --target login_server_debug -t "gradido/loginserver:test" -f ./login_server/Dockerfile.debug login_server/
docker save "gradido/loginserver:test" > /tmp/loginserver.tar
docker build --target login_server_debug -t "gradido/login_server:test" -f ./login_server/Dockerfile.debug login_server/
docker save "gradido/login_server:test" > /tmp/login_server.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-loginserver-test
path: /tmp/loginserver.tar
name: docker-login-server-test
path: /tmp/login_server.tar
##############################################################################
# JOB: DOCKER BUILD TEST COMMUNITY SERVER ####################################
@ -72,23 +72,75 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# BUILD COMMUNITY SERVER DOCKER IMAGE (build) ############################
# BUILD COMMUNITY SERVER DOCKER IMAGE ####################################
##########################################################################
- name: community server | Build `test` image
run: |
docker build -t "gradido/communityserver:test" -f ./community_server/Dockerfile ./
docker save "gradido/communityserver:test" > /tmp/communityserver.tar
docker build -t "gradido/community_server:test" -f ./community_server/Dockerfile ./
docker save "gradido/community_server:test" > /tmp/community_server.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-communityserver-test
path: /tmp/communityserver.tar
name: docker-community-server-test
path: /tmp/community_server.tar
##############################################################################
# JOB: DOCKER BUILD TEST MARIADB #############################################
##############################################################################
build_test_mariadb:
name: Docker Build Test - MariaDB
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# BUILD MARIADB DOCKER IMAGE #############################################
##########################################################################
- name: mariadb | Build `test` image
run: |
docker build -t "gradido/mariadb:test" -f ./mariadb/Dockerfile ./
docker save "gradido/mariadb:test" > /tmp/mariadb.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-mariadb-test
path: /tmp/mariadb.tar
##############################################################################
# JOB: DOCKER BUILD TEST NGINX ###############################################
##############################################################################
build_test_nginx:
name: Docker Build Test - Nginx
runs-on: ubuntu-latest
#needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
##########################################################################
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
# BUILD NGINX DOCKER IMAGE #############################################
##########################################################################
- name: nginx | Build `test` image
run: |
docker build -t "gradido/nginx:test" -f ./nginx/Dockerfile ./
docker save "gradido/nginx:test" > /tmp/nginx.tar
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: docker-nginx-test
path: /tmp/nginx.tar
##############################################################################
# JOB: LINT FRONTEND #########################################################
##############################################################################
lint_frontend:
name: Lint frontend
name: Lint - Frontend
runs-on: ubuntu-latest
needs: [build_test_frontend]
steps:
@ -155,11 +207,12 @@ jobs:
# COVERAGE CHECK FRONTEND ################################################
##########################################################################
- name: frontend | Coverage check
uses: devmasx/coverage-check-action@v1.2.0
uses: webcraftmedia/coverage-check-action@master
with:
report_name: Coverage Frontend
type: lcov
result_path: ./coverage/lcov.info
min_coverage: 10
min_coverage: 11
token: ${{ github.token }}
#test:

View File

@ -37,9 +37,9 @@ services:
#########################################################
## COMMUNITY SERVER (cakephp with php-fpm) ##############
#########################################################
community-server:
volumes:
- ./community_server
#community-server:
# volumes:
# - ./community_server
#########################################################

View File

@ -17,7 +17,7 @@
</header>
<div class="">
<particles-bg type="custom" :config="config" :bg="true" />
<router-view />
<component :is="$store.state.session_id ? 'DashboardLayout' : 'AuthLayoutGDD'" />
</div>
</div>
</template>
@ -26,11 +26,15 @@
import { ParticlesBg } from 'particles-bg-vue'
import icon from './icon.js'
import { localeChanged } from 'vee-validate'
import DashboardLayout from '@/views/Layout/DashboardLayout_gdd.vue'
import AuthLayoutGDD from '@/views/Layout/AuthLayout_gdd.vue'
export default {
name: 'app',
components: {
ParticlesBg,
DashboardLayout,
AuthLayoutGDD,
},
data() {
return {
@ -56,8 +60,11 @@ export default {
this.$router.push('overview')
} else {
//console.log('app.vue to Logout')
if (this.$route.path == '/reset') {
} else {
this.$store.dispatch('logout')
}
}
},
data() {
return {

View File

@ -36,7 +36,9 @@ const communityAPI = {
return apiGet(CONFIG.COMMUNITY_API_STATE_BALANCE_URL + 'getBalance/' + session_id)
},
transactions: async (session_id) => {
return apiGet(CONFIG.COMMUNITY_API_STATE_BALANCE_URL + 'listTransactions/1/25/ASC/' + session_id)
return apiGet(
CONFIG.COMMUNITY_API_STATE_BALANCE_URL + 'listTransactions/1/25/ASC/' + session_id,
)
},
/*create: async (session_id, email, amount, memo, target_date = new Date() ) => {
const payload = {

View File

@ -63,6 +63,15 @@ const loginAPI = {
}
return apiPost(CONFIG.LOGIN_API_URL + 'createUser', payload)
},
sendEmail: async (email, email_text = 7, email_verification_code_type = 'resetPassword') => {
//console.log('api email', email)
const payload = {
email,
email_text,
email_verification_code_type,
}
return apiPost(CONFIG.LOGIN_API_URL + 'sendEmail', payload)
},
}
export default loginAPI

View File

@ -8,6 +8,7 @@
"imprint":"Impressum",
"privacy_policy":"Datenschutzerklärung",
"members_area": "Mitgliedsbereich",
"whitepaper": "Whitepaper",
"back":"Zurück",
"send":"Senden",
"transactions":"Transaktionen",
@ -24,7 +25,7 @@
"sender":"Absender",
"firstname":"Vorname",
"lastname":"Nachname",
"email":"eMail",
"email":"E-Mail",
"email_repeat":"eMail wiederholen",
"password":"Passwort",
"password_repeat":"Passwort wiederholen",
@ -59,9 +60,12 @@
"signup": {
"title": "Erstelle dein Gradido-Konto",
"subtitle": "Werde Teil der Gemeinschaft!",
"strength":"Passwortsicherheit:",
"strong":"stark",
"agree":"habe ich gelesen und verstanden und stimme diesen zu."
"agree":"Ich stimme der <a href='https://gradido.net/de/datenschutz/' target='_blank' >Datenschutzerklärung</a> zu.",
"lowercase":"Ein Kleinbuchstabe erforderlich.",
"uppercase":"Ein Großbuchstabe erforderlich.",
"minimum":"Mindestens 8 Zeichen.",
"one_number":"Eine Zahl erforderlich.",
"dont_match":"Die Passwörter stimmen nicht überein."
},
"password": {
"title": "Passwort zurücksetzen",

View File

@ -8,6 +8,7 @@
"imprint":"Legal notice",
"privacy_policy":"Privacy policy",
"members_area": "Member's area",
"whitepaper": "Whitepaper",
"back":"Back",
"send":"Send",
"transactions":"Transactions",
@ -59,9 +60,12 @@
"signup": {
"title": "Create your Gradido account",
"subtitle": "Become a part of the community!",
"strength":"Password strength:",
"strong":"strong",
"agree":"I have read and understood and agree to them"
"agree":"I agree to the <a href='https://gradido.net/en/datenschutz/' target='_blank' > privacy policy</a>.",
"lowercase":"One lowercase letter required.",
"uppercase":"One uppercase letter required.",
"minimum":"8 characters minimum.",
"one_number":"One number required.",
"dont_match":"Passwords don't match."
},
"password": {
"title": "Reset password",

View File

@ -21,10 +21,6 @@ const router = new VueRouter({
})
router.beforeEach((to, from, next) => {
let language = to.params.lang
if (!language) {
language = 'de'
}
next()
})

View File

@ -1,45 +1,9 @@
import DashboardLayout from '@/views/Layout/DashboardLayout_gdd.vue'
import AuthLayoutGDD from '@/views/Layout/AuthLayout_gdd.vue'
import NotFound from '@/views/NotFoundPage.vue'
const routes = [
{
path: '/login',
redirect: 'login',
component: AuthLayoutGDD,
children: [
{
path: '/login',
component: () => import('../views/Pages/Login.vue'),
},
{
path: '/thx',
component: () => import('../views/Pages/thx.vue'),
},
{
path: '/register',
component: () => import('../views/Pages/Register.vue'),
},
{
path: '/password',
component: () => import('../views/Pages/Password.vue'),
},
{
path: '/explorer',
name: 'Explorer',
component: () => import('../views/Pages/Explorer.vue'),
},
],
},
{
path: '/overview',
redirect: 'overview',
component: DashboardLayout,
children: [
{
path: '/overview',
component: () => import('../views/KontoOverview.vue'),
component: () => import('../views/Pages/KontoOverview.vue'),
meta: {
requiresAuth: true,
},
@ -60,7 +24,25 @@ const routes = [
path: '/transactions',
component: () => import('../views/Pages/UserProfileTransactionList.vue'),
},
],
{
path: '/login',
component: () => import('../views/Pages/Login.vue'),
},
{
path: '/thx',
component: () => import('../views/Pages/thx.vue'),
},
{
path: '/register',
component: () => import('../views/Pages/Register.vue'),
},
{
path: '/password',
component: () => import('../views/Pages/ForgotPassword.vue'),
},
{
path: '/reset',
component: () => import('../views/Pages/ResetPassword.vue'),
},
{ path: '*', component: NotFound },
]

View File

@ -63,7 +63,6 @@ export const store = new Vuex.Store({
state.user.balance_gdt = balance / 10000
},
},
// Asyncronous actions - used for api calls
actions: {
login: async ({ dispatch, commit }, data) => {
const result = await loginAPI.login(data.email, data.password)
@ -74,19 +73,11 @@ export const store = new Vuex.Store({
$cookies.set('gdd_u', data.email)
router.push('/overview')
} else {
// Register failed, we perform a logout
//alert('>>>>> FAIl LOGIN')
commit('loginfail', true)
//dispatch('logout')
}
},
passwordReset: async (data) => {
//console.log('<<<<<<<<<<< PASSWORT RESET TODO >>>>>>>>>>>', data.email)
},
schoepfen: async (data) => {
// http://localhost/transaction-creations/ajaxCreate
},
createUser: async ({ commit, dispatch }, data) => {
// console.log('action: createUser')
const result = await loginAPI.create(

View File

@ -1,17 +0,0 @@
<template>
<div class="content">
<fade-transition :duration="200" mode="out-in">
<!-- your content here -->
<router-view></router-view>
</fade-transition>
</div>
</template>
<script>
import { FadeTransition } from 'vue2-transitions'
export default {
components: {
FadeTransition,
},
}
</script>
<style></style>

View File

@ -41,63 +41,97 @@ describe('ContentFooter', () => {
})
it('links to the login page when clicked on copyright', () => {
expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual('#/Login')
expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual(
'https://gradido.net/en',
)
})
})
describe('version', () => {
it('shows the current version', async () => {
wrapper.setData({ version: 1.23 })
await wrapper.vm.$nextTick()
expect(wrapper.find('div.copyright').findAll('a').at(1).text()).toEqual('App version 1.23')
})
it('links to latest release on GitHub', () => {
expect(wrapper.find('div.copyright').findAll('a').at(1).attributes('href')).toEqual(
'https://github.com/gradido/gradido/releases/latest',
)
})
})
describe('links to gradido.net', () => {
it('has a link to the gradido.net', () => {
expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('Gradido')
})
it('links to the https://gradido.net/en when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/en',
)
})
it('has a link to the legal notice', () => {
expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('imprint')
expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('imprint')
})
it('links to the https://gradido.net/en/impressum when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/en/impressum/',
)
})
it('has a link to the privacy policy', () => {
expect(wrapper.findAll('a.nav-link').at(2).text()).toEqual('privacy_policy')
expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('privacy_policy')
})
it('links to the https://gradido.net/en/datenschutz when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
'https://gradido.net/en/datenschutz/',
)
})
it('has a link to the members area', () => {
expect(wrapper.findAll('a.nav-link').at(2).text()).toEqual('members_area')
})
it('links to the elopage', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
'https://elopage.com/s/gradido/sign_in?locale=en',
)
})
it('links to the whitepaper', () => {
expect(wrapper.findAll('a.nav-link').at(3).attributes('href')).toEqual(
'https://docs.google.com/document/d/1kcX1guOi6tDgnFHD9tf7fB_MneKTx-0nHJxzdN8ygNs/edit?usp=sharing',
)
})
describe('links are localized', () => {
beforeEach(() => {
mocks.$i18n.locale = 'de'
})
it('links to the https://gradido.net/de when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual(
'https://gradido.net/de',
)
})
it('links to the https://gradido.net/de/impressum when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/de/impressum/',
)
})
it('links to the https://gradido.net/de/datenschutz when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
'https://gradido.net/de/datenschutz/',
)
})
it('links to the German elopage when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
'https://elopage.com/s/gradido/sign_in?locale=de',
)
})
it('links to the German whitepaper when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(3).attributes('href')).toEqual(
'https://docs.google.com/document/d/1jZp-DiiMPI9ZPNXmjsvOQ1BtnfDFfx8BX7CDmA8KKjY/edit?usp=sharing',
)
})
})
})
})

View File

@ -4,10 +4,12 @@
<b-col>
<div class="copyright text-center text-lg-center text-muted">
© {{ year }}
<a href="#/Login" class="font-weight-bold ml-1">Gradido-Akademie</a>
<a :href="`https://gradido.net/${$i18n.locale}`" class="font-weight-bold ml-1">
Gradido-Akademie
</a>
|
<a href="https://github.com/gradido/gradido/releases/latest" target="_blank">
App Verion {{ version }}
App version {{ version }}
</a>
</div>
</b-col>
@ -15,9 +17,6 @@
<b-row align-v="center" class="justify-content-lg-between">
<b-col>
<b-nav class="nav-footer justify-content-center">
<b-nav-item :href="`https://gradido.net/${$i18n.locale}`" target="_blank">
Gradido
</b-nav-item>
<b-nav-item :href="`https://gradido.net/${$i18n.locale}/impressum/`" target="_blank">
{{ $t('imprint') }}
</b-nav-item>
@ -30,6 +29,16 @@
>
{{ $t('members_area') }}
</b-nav-item>
<b-nav-item
:href="
$i18n.locale === 'de'
? 'https://docs.google.com/document/d/1jZp-DiiMPI9ZPNXmjsvOQ1BtnfDFfx8BX7CDmA8KKjY/edit?usp=sharing'
: 'https://docs.google.com/document/d/1kcX1guOi6tDgnFHD9tf7fB_MneKTx-0nHJxzdN8ygNs/edit?usp=sharing'
"
target="_blank"
>
{{ $t('whitepaper') }}
</b-nav-item>
</b-nav>
</b-col>
</b-row>

View File

@ -26,17 +26,10 @@
:placeholder="$t('form.email')"
name="Email"
:rules="{ required: true, email: true }"
v-model="model.email"
v-model="form.email"
></base-input>
{{ form }}
<div class="text-center">
<b-button
type="submit"
outline
variant="secondary"
class="mt-4"
:disabled="disable"
>
<b-button type="submit" outline variant="secondary" class="mt-4">
{{ $t('site.password.reset_now') }}
</b-button>
</div>
@ -53,21 +46,26 @@
</div>
</template>
<script>
import loginAPI from '../../apis/loginAPI.js'
export default {
name: 'password',
data() {
return {
disable: 'disabled',
model: {
form: {
email: '',
},
}
},
methods: {
onSubmit() {
this.$store.dispatch('passwordReset', { email: this.model.email })
this.model.email = ''
this.$router.push('/thx')
async onSubmit() {
const result = await loginAPI.sendEmail(this.form.email)
if (result.success) {
this.$router.push({ path: '/thx', params: { id: 'resetmail' } })
} else {
alert(result.result)
}
},
},
}

View File

@ -20,9 +20,9 @@
</div>
</template>
<script>
import GddStatus from './KontoOverview/GddStatus.vue'
import GddSend from './KontoOverview/GddSend.vue'
import GddTable from './KontoOverview/GddTable.vue'
import GddStatus from '../KontoOverview/GddStatus.vue'
import GddSend from '../KontoOverview/GddSend.vue'
import GddTable from '../KontoOverview/GddTable.vue'
export default {
name: 'Overview',

View File

@ -89,6 +89,9 @@
</router-link>
</b-col>
</b-row>
<b-row>
<b-col><router-link to="/reset">reset</router-link></b-col>
</b-row>
</b-col>
</b-row>
</b-container>

View File

@ -0,0 +1,107 @@
import { mount, RouterLinkStub } from '@vue/test-utils'
import Vuex from 'vuex'
import flushPromises from 'flush-promises'
import Register from './Register'
const localVue = global.localVue
describe('Register', () => {
let wrapper
let mocks = {
$i18n: {
locale: 'en',
},
$t: jest.fn((t) => t),
}
let state = {
// loginfail: false,
}
let store = new Vuex.Store({
state,
})
let stubs = {
RouterLink: RouterLinkStub,
}
const Wrapper = () => {
return mount(Register, { localVue, mocks, store, stubs })
}
describe('mount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the Register form', () => {
expect(wrapper.find('div.register-form').exists()).toBeTruthy()
})
describe('Register header', () => {
it('has a welcome message', () => {
expect(wrapper.find('div.header').text()).toBe('site.signup.title site.signup.subtitle')
})
})
describe('links', () => {
it('has a link "Back"', () => {
expect(wrapper.findAllComponents(RouterLinkStub).at(0).text()).toEqual('back')
})
it('links to /login when clicking "Back"', () => {
expect(wrapper.findAllComponents(RouterLinkStub).at(0).props().to).toBe('/login')
})
})
describe('Register form', () => {
it('has a register form', () => {
expect(wrapper.find('form').exists()).toBeTruthy()
})
it('has 3 text input fields', () => {
expect(wrapper.findAll('input[type="text"]').length).toBe(3)
})
it('has 2 password input fields', () => {
expect(wrapper.findAll('input[type="password"]').length).toBe(2)
})
it('has 1 checkbox input fields', () => {
expect(wrapper.findAll('input[type="checkbox"]').length).toBe(1)
})
it('has no submit button when not completely filled', () => {
expect(wrapper.find('button[type="submit"]').exists()).toBe(false)
})
it('shows a warning when no valid Email is entered', async () => {
wrapper.findAll('input[type="text"]').at(2).setValue('no_valid@Email')
await flushPromises()
await expect(wrapper.find('.invalid-feedback').text()).toEqual(
'The Email field must be a valid email',
)
})
it('shows 4 warnings when no password is set', async () => {
const passwords = wrapper.findAll('input[type="password"]')
passwords.at(0).setValue('')
passwords.at(1).setValue('')
await flushPromises()
await expect(wrapper.find('div.hints').text()).toContain(
'site.signup.lowercase',
'site.signup.uppercase',
'site.signup.minimum',
'site.signup.one_number',
)
})
// TODO test different invalid password combinations
})
// TODO test submit button
})
})

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="register-form">
<!-- Header -->
<div class="header p-4">
<b-container class="container">
@ -26,52 +26,81 @@
<validation-observer v-slot="{ handleSubmit }" ref="formValidator">
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
<base-input
:label="$t('form.firstname')"
alternative
class="mb-3"
prepend-icon="ni ni-hat-3"
:placeholder="$t('form.firstname')"
name="Vorname"
:rules="{ required: true }"
name="firstname"
:rules="{ required: true, min: 3 }"
v-model="model.firstname"
></base-input>
<base-input
:label="$t('form.lastname')"
alternative
class="mb-3"
prepend-icon="ni ni-hat-3"
:placeholder="$t('form.lastname')"
name="Nachname"
:rules="{ required: true }"
name="lastname"
:rules="{ required: true, min: 2 }"
v-model="model.lastname"
></base-input>
<base-input
:label="$t('form.email')"
alternative
class="mb-3"
prepend-icon="ni ni-email-83"
:placeholder="$t('form.email')"
name="Email"
:rules="{ required: true, email: true }"
v-model="model.email"
></base-input>
<base-input
alternative
class="mb-3"
<hr />
<b-form-group :label="$t('form.password')">
<b-input-group>
<b-form-input
class="mb-0"
v-model="password"
name="password"
:class="{ valid: passwordValidation.valid }"
:type="passwordVisible ? 'text' : 'password'"
prepend-icon="ni ni-lock-circle-open"
:placeholder="$t('form.password')"
></b-form-input>
<b-input-group-append>
<b-button variant="outline-primary">
<b-icon
:icon="passwordVisible ? 'eye' : 'eye-slash'"
@click="togglePasswordVisibility"
/>
</b-button>
</b-input-group-append>
</b-input-group>
</b-form-group>
<base-input
:label="$t('form.password_repeat')"
type="password"
name="Password"
:rules="{ required: true, min: 6 }"
v-model="model.password"
></base-input>
<div class="text-muted font-italic">
<small>
{{ $t('site.signup.strength') }}
<span class="text-success font-weight-700">
{{ $t('site.signup.strong') }}
</span>
</small>
name="password-repeat"
:placeholder="$t('form.password_repeat')"
prepend-icon="ni ni-lock-circle-open"
v-model.lazy="checkPassword"
:class="{ valid: passwordValidation.valid }"
/>
<transition name="hint" appear>
<div v-if="passwordValidation.errors.length > 0 && !submitted" class="hints">
<ul>
<li v-for="error in passwordValidation.errors" :key="error">
<small>{{ error }}</small>
</li>
</ul>
</div>
<div class="matches" v-else-if="!samePasswords">
<p>
{{ $t('site.signup.dont_match') }}
<i class="ni ni-active-40" color="danger"></i>
</p>
</div>
</transition>
<b-row class="my-4">
<b-col cols="12">
<base-input
@ -79,17 +108,22 @@
name="Privacy Policy"
>
<b-form-checkbox v-model="model.agree">
<span class="text-muted">
<a href="https://gradido.net/de/datenschutz/" target="_blank">
{{ $t('privacy_policy') }}
</a>
- {{ $t('site.signup.agree') }}
</span>
<span class="text-muted" v-html="$t('site.signup.agree')"></span>
</b-form-checkbox>
</base-input>
</b-col>
</b-row>
<div class="text-center">
<div
class="text-center"
v-if="
passwordsFilled &&
samePasswords &&
passwordValidation.valid &&
namesFilled &&
emailFilled &&
model.agree
"
>
<b-button type="submit" variant="secondary" class="mt-4">
{{ $t('signup') }}
</b-button>
@ -101,7 +135,7 @@
</b-col>
</b-row>
<div class="text-center py-lg-4">
<router-link to="/Login" class="mt-3">{{ $t('back') }}</router-link>
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
</div>
</b-container>
</div>
@ -115,15 +149,25 @@ export default {
firstname: '',
lastname: '',
email: '',
password: '',
password2: '',
agree: false,
},
rules: [
{ message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ },
{ message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ },
{ message: this.$t('site.signup.minimum'), regex: /.{8,}/ },
{ message: this.$t('site.signup.one_number'), regex: /[0-9]+/ },
],
password: '',
checkPassword: '',
passwordVisible: false,
submitted: false,
}
},
methods: {
togglePasswordVisibility() {
this.passwordVisible = !this.passwordVisible
},
onSubmit() {
// console.log("this.modals =>", this.modals)
this.$store.dispatch('createUser', {
email: this.model.email,
first_name: this.model.firstname,
@ -138,6 +182,37 @@ export default {
this.$router.push('/thx')
},
},
computed: {
samePasswords() {
return this.password === this.checkPassword
},
passwordsFilled() {
return this.password !== '' && this.checkPassword !== ''
},
namesFilled() {
return (
this.model.firstname !== '' &&
this.model.firstname.length > 2 &&
this.model.lastname !== '' &&
this.model.lastname.length > 1
)
},
emailFilled() {
return this.model.email !== ''
},
passwordValidation() {
let errors = []
for (let condition of this.rules) {
if (!condition.regex.test(this.password)) {
errors.push(condition.message)
}
}
if (errors.length === 0) {
return { valid: true, errors }
}
return { valid: false, errors }
},
},
}
</script>
<style></style>

View File

@ -0,0 +1,107 @@
import { mount, RouterLinkStub } from '@vue/test-utils'
import Vuex from 'vuex'
import flushPromises from 'flush-promises'
import ResetPassword from './ResetPassword'
const localVue = global.localVue
describe('ResetPassword', () => {
let wrapper
let mocks = {
$i18n: {
locale: 'en',
},
$t: jest.fn((t) => t),
}
let state = {
// loginfail: false,
}
let store = new Vuex.Store({
state,
})
let stubs = {
RouterLink: RouterLinkStub,
}
const Wrapper = () => {
return mount(ResetPassword, { localVue, mocks, store, stubs })
}
describe('mount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the Reset Password form', () => {
expect(wrapper.find('div.resetpwd-form').exists()).toBeTruthy()
})
//describe('Register header', () => {
// it('has a welcome message', () => {
// expect(wrapper.find('div.header').text()).toBe('site.signup.title site.signup.subtitle')
// })
//})
//describe('links', () => {
// it('has a link "Back"', () => {
// expect(wrapper.findAllComponents(RouterLinkStub).at(0).text()).toEqual('back')
// })
// it('links to /login when clicking "Back"', () => {
// expect(wrapper.findAllComponents(RouterLinkStub).at(0).props().to).toBe('/login')
// })
//})
//describe('Register form', () => {
// it('has a register form', () => {
// expect(wrapper.find('form').exists()).toBeTruthy()
// })
// it('has 3 text input fields', () => {
// expect(wrapper.findAll('input[type="text"]').length).toBe(3)
// })
// it('has 2 password input fields', () => {
// expect(wrapper.findAll('input[type="password"]').length).toBe(2)
// })
// it('has 1 checkbox input fields', () => {
// expect(wrapper.findAll('input[type="checkbox"]').length).toBe(1)
// })
// it('has no submit button when not completely filled', () => {
// expect(wrapper.find('button[type="submit"]').exists()).toBe(false)
// })
// it('shows a warning when no valid Email is entered', async () => {
// wrapper.findAll('input[type="text"]').at(2).setValue('no_valid@Email')
// await flushPromises()
// await expect(wrapper.find('.invalid-feedback').text()).toEqual(
// 'The Email field must be a valid email',
// )
// })
// it('shows 4 warnings when no password is set', async () => {
// const passwords = wrapper.findAll('input[type="password"]')
// passwords.at(0).setValue('')
// passwords.at(1).setValue('')
// await flushPromises()
// await expect(wrapper.find('div.hints').text()).toContain(
// 'site.signup.lowercase',
// 'site.signup.uppercase',
// 'site.signup.minimum',
// 'site.signup.one_number',
// )
// })
// //TODO test different invalid password combinations
//})
// TODO test submit button
})
})

View File

@ -0,0 +1,147 @@
<template>
<div class="resetpwd-form">
<!-- Header -->
<div class="header p-4">
<b-container class="container">
<div class="header-body text-center mb-7">
<b-row class="justify-content-center">
<b-col xl="5" lg="6" md="8" class="px-2">
<h1>Reset Password</h1>
<div class="pb-4">
Jetzt kannst du ein neues Passwort speichern, mit welchem du dich zukünfitg in der
GRADIDO App anmelden kannst.
</div>
</b-col>
</b-row>
</div>
</b-container>
</div>
<!-- Page content -->
<b-container class="mt--8 p-1">
<!-- Table -->
<b-row class="justify-content-center">
<b-col lg="6" md="8">
<b-card no-body class="border-0" style="background-color: #ebebeba3 !important">
<b-card-body class="py-lg-4 px-sm-0 px-0 px-md-2 px-lg-4">
<validation-observer v-slot="{ handleSubmit }" ref="formValidator">
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
<b-form-group :label="$t('form.password')">
<b-input-group>
<b-form-input
class="mb-0"
v-model="password"
name="password"
:class="{ valid: passwordValidation.valid }"
:type="passwordVisible ? 'text' : 'password'"
prepend-icon="ni ni-lock-circle-open"
:placeholder="$t('form.password')"
></b-form-input>
<b-input-group-append>
<b-button variant="outline-primary">
<b-icon
:icon="passwordVisible ? 'eye' : 'eye-slash'"
@click="togglePasswordVisibility"
/>
</b-button>
</b-input-group-append>
</b-input-group>
</b-form-group>
<base-input
:label="$t('form.password_repeat')"
type="password"
name="password-repeat"
:placeholder="$t('form.password_repeat')"
prepend-icon="ni ni-lock-circle-open"
v-model.lazy="checkPassword"
:class="{ valid: passwordValidation.valid }"
/>
<transition name="hint" appear>
<div v-if="passwordValidation.errors.length > 0 && !submitted" class="hints">
<ul>
<li v-for="error in passwordValidation.errors" :key="error">
<small>{{ error }}</small>
</li>
</ul>
</div>
<div class="matches" v-else-if="!samePasswords">
<p>
{{ $t('site.signup.dont_match') }}
<i class="ni ni-active-40" color="danger"></i>
</p>
</div>
</transition>
<div
class="text-center"
v-if="passwordsFilled && samePasswords && passwordValidation.valid"
>
<b-button type="submit" variant="secondary" class="mt-4">
{{ $t('signup') }}
</b-button>
</div>
</b-form>
</validation-observer>
</b-card-body>
</b-card>
</b-col>
</b-row>
</b-container>
</div>
</template>
<script>
export default {
name: 'reset',
data() {
return {
rules: [
{ message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ },
{ message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ },
{ message: this.$t('site.signup.minimum'), regex: /.{8,}/ },
{ message: this.$t('site.signup.one_number'), regex: /[0-9]+/ },
],
password: '',
checkPassword: '',
passwordVisible: false,
submitted: false,
}
},
methods: {
togglePasswordVisibility() {
this.passwordVisible = !this.passwordVisible
},
onSubmit() {
this.$store.dispatch('createUser', {
password: this.model.password,
})
this.model.password = ''
this.$router.push('/thx')
},
},
computed: {
samePasswords() {
return this.password === this.checkPassword
},
passwordsFilled() {
return this.password !== '' && this.checkPassword !== ''
},
passwordValidation() {
let errors = []
for (let condition of this.rules) {
if (!condition.regex.test(this.password)) {
errors.push(condition.message)
}
}
if (errors.length === 0) {
return { valid: true, errors }
}
return { valid: false, errors }
},
},
created() {
//console.log('resetpage', this.$route)
},
}
</script>
<style></style>

View File

@ -1,47 +1,36 @@
#########################################################################################################
# Build release
#########################################################################################################
From conanio/gcc7 as release
From conanio/gcc9 as release
ENV DOCKER_WORKDIR="/code"
USER root
COPY --from=unicorny/protoc:3.9.1 /usr/bin/protoc /usr/bin/
COPY --from=unicorny/protoc:3.9.1 /usr/lib/libprotobuf.so.20 /usr/lib/libprotobuf.so.20
COPY --from=unicorny/protoc:3.9.1 /usr/lib/libprotoc.so.20 /usr/lib/libprotoc.so.20
COPY --from=unicorny/protoc:3.9.1 /usr/include/google/protobuf/* /usr/include/google/protobuf/
RUN mkdir -p ${DOCKER_WORKDIR}
WORKDIR ${DOCKER_WORKDIR}
COPY . .
#RUN git submodule update --init --recursive
RUN ls -la
RUN cd dependencies/iroha-ed25519 && \
ls -la && \
mkdir build && \
cd build && \
cmake .. -DEDIMPL=ref10 -DHASH=sha2_sphlib -DRANDOM=bcryptgen -DBUILD=STATIC && \
make -j$(nproc)
RUN cd dependencies/mariadb-connector-c && \
mkdir build && \
cd build && \
cmake -DWITH_SSL=OFF ..
RUN chmod +x compile_proto.sh
RUN chmod +x compile_pot.sh
RUN ls -la
RUN ./compile_pot.sh
RUN ./compile_proto.sh
RUN chmod +x compile_pot.sh && ./compile_pot.sh
RUN mkdir build && \
cd build && \
conan install .. --build=missing && \
cmake .. && \
make -j$(nproc) Gradido_LoginServer
make -j$(nproc) protoc grpc_cpp_plugin
RUN chmod +x unix_parse_proto.sh && ./unix_parse_proto.sh
RUN cd build && \
cmake .. && \
make -j$(nproc) Gradido_LoginServer
CMD ["./code"]

View File

@ -192,7 +192,8 @@ void PendingTasksManager::checkForFinishedTasks(Poco::Timer& timer)
auto json = transaction->getModel()->getResultJson();
bool removeIt = false;
if (!json.isNull()) {
if (json->get("state").toString() == "success") {
auto state = json->get("state");
if (!state.isEmpty() && state.toString() == "success") {
removeIt = true;
}
}

@ -1 +1 @@
Subproject commit ff412f735667b30233c0ce00d461f209ac7dde7c
Subproject commit 924b51c87fea29d5aaf053af43251dab44c2eeb7