merging conflicts

This commit is contained in:
Moriz Wahl 2021-03-24 18:10:51 +01:00
commit f09d2328d3
10 changed files with 81 additions and 53 deletions

View File

@ -48,7 +48,7 @@
"qrcode": "^1.4.4",
"quill": "^1.3.6",
"sweetalert2": "^9.5.4",
"vee-validate": "^3.2.1",
"vee-validate": "^3.4.5",
"vue": "^2.6.11",
"vue-bootstrap-typeahead": "^0.2.6",
"vue-chartjs": "^3.5.0",

View File

@ -29,6 +29,7 @@
<script>
import { ParticlesBg } from 'particles-bg-vue'
import icon from './icon.js'
import { localeChanged } from 'vee-validate'
export default {
name: 'app',
@ -36,13 +37,17 @@ export default {
ParticlesBg,
},
created() {
//console.log('xx', $cookies.get('gdd_lang'))
//console.log('%cWillkommen bei Gradido %cgreen text', 'font-weight:bold', 'color: green')
if ($cookies.isKey('gdd_session_id') == true) {
//console.log('%cHey %c' + $cookies.get('gdd_u') + '', 'font-weight:bold', 'color: orange')
this.$store.commit('session_id', $cookies.get('gdd_session_id'))
this.$store.commit('email', $cookies.get('gdd_u'))
this.$store.commit('language', $cookies.get('gdd_lang'))
this.$i18n.locale = $cookies.get('gdd_lang')
this.$router.push('overview')
} else {
//console.log('app.vue to Logout')
this.$store.dispatch('logout')
}
},
@ -68,6 +73,7 @@ export default {
setLocale(locale) {
this.$i18n.locale = locale
this.$store.commit('language', this.$i18n.locale)
localeChanged(locale)
},
},
}

View File

@ -1,6 +1,9 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import en from 'vee-validate/dist/locale/en'
import de from 'vee-validate/dist/locale/de'
Vue.use(VueI18n)
function loadLocaleMessages() {
@ -11,6 +14,18 @@ function loadLocaleMessages() {
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
if (locale === 'de') {
messages[locale] = {
validations: de,
...messages[locale],
}
}
if (locale === 'en') {
messages[locale] = {
validations: en,
...messages[locale],
}
}
}
})
return messages

View File

@ -11,8 +11,8 @@
"transactions":"transactions",
"language":"Sprache",
"languages":{
"de": "Deutsch",
"en": "English"
"de": "Deutsch",
"en": "English"
},
"form": {
"cancel":"Cancel",
@ -74,31 +74,31 @@
"support":"Support"
},
"sidebar" : {
"community":"Community",
"members_area":"Members area",
"membership":"Membership"
"community":"Community",
"members_area":"Members area",
"membership":"Membership"
},
"landing1" : {
"explore":"Explore Gradido",
"text":"If you want to get inspiration or just show something directly to your clients, you can jump start your development with our pre-built example pages.",
"link":"Explore pages"
"explore":"Explore Gradido",
"text":"If you want to get inspiration or just show something directly to your clients, you can jump start your development with our pre-built example pages.",
"link":"Explore pages"
},
"404" : {
"ooops" : "Ooops!",
"text" : "Page not found. Don't worry though, we have plenty of other pages to explore",
"back" : "Back to dashboard!"
"ooops" : "Ooops!",
"text" : "Page not found. Don't worry though, we have plenty of other pages to explore",
"back" : "Back to dashboard!"
}
},
"admin": {
"site": {
"overview": {
"creation": "Creation",
"transience" : "Transience",
"exchanged": "Exchanged",
"members" : "Members"
},
"admin": {
"site": {
"overview": {
"creation": "Creation",
"transience" : "Transience",
"exchanged": "Exchanged",
"members" : "Members"
}
}
}
},
},
"nav": {
"features": "Features"
}

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import DashboardPlugin from './plugins/dashboard-plugin'
import App from './App.vue'
import i18n from './i18n.js'
import VeeValidate from './vee-validate.js'
import VueCookies from 'vue-cookies'
// store

View File

@ -0,0 +1,25 @@
import { configure, extend } from 'vee-validate'
import { required, email, min } from 'vee-validate/dist/rules'
import i18n from './i18n'
configure({
defaultMessage: (field, values) => {
values._field_ = i18n.t(`fields.${field}`)
return i18n.t(`validations.messages.${values._rule_}`, values)
},
})
extend('email', {
...email,
message: (_, values) => i18n.t('validations.messages.email', values),
})
extend('required', {
...required,
message: (_, values) => i18n.t('validations.messages.required', values),
})
extend('min', {
...min,
message: (_, values) => i18n.t('validations.messages.min', values),
})

View File

@ -14,30 +14,5 @@ export default {
components: {
ContentFooter,
},
data() {
return {
year: new Date().getFullYear(),
pageClass: 'login-page',
}
},
computed: {
title() {
return `${this.$route.name} Page`
},
},
methods: {
setLocale(locale) {
this.$i18n.locale = locale
//this.$router.push({
// params: { lang: locale }
//})
//this.hideDropdown()
},
},
}
</script>
<style lang="scss">
.card {
background-color: rgba(136, 130, 131, 0.3);
}
</style>

View File

@ -13,13 +13,13 @@
<b-row align-v="center" class="justify-content-lg-between">
<b-col>
<b-nav class="nav-footer justify-content-center">
<b-nav-item ref="https://gradido.net/" target="_blank">
<b-nav-item :href="`https://gradido.net/${$i18n.locale}`" target="_blank">
Gradido
</b-nav-item>
<b-nav-item href="https://gradido.net/de/impressum/" target="_blank">
<b-nav-item :href="`https://gradido.net/${$i18n.locale}/impressum/`" target="_blank">
{{ $t('imprint') }}
</b-nav-item>
<b-nav-item href="https://gradido.net/de/datenschutz/" target="_blank">
<b-nav-item :href="`https://gradido.net/${$i18n.locale}/datenschutz/`" target="_blank">
{{ $t('privacy_policy') }}
</b-nav-item>
<!--<b-nav-item href="#!" to="/explorer" >

View File

@ -11643,7 +11643,7 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vee-validate@^3.2.1:
vee-validate@^3.4.5:
version "3.4.5"
resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-3.4.5.tgz#96a456c309f7bdb2cce62c3b554f96d893e9f6ae"
integrity sha512-ZEcLqOAZzSkMhDvPcTx0xcwVOijFnMW9J+BA20j+rDmo24T8RCCqVQyRwwrDrcWJZV2dRYl/yYNa2GB6UCoBvg==

View File

@ -227,7 +227,13 @@ int SigningTransaction::run() {
//printf("[JsonRequestHandler::handleRequest] Exception: %s\n", ex.displayText().data());
addError(new ParamError("SigningTransaction", "error parsing request answer", ex.displayText().data()));
FILE* f = fopen("response.html", "wt");
std::string log_Path = "/var/log/grd_login/";
//#ifdef _WIN32
#if defined(_WIN32) || defined(_WIN64)
log_Path = "./";
#endif
log_Path += "response.html";
FILE* f = fopen(log_Path.data(), "wt");
if (f) {
std::string responseString = responseStringStream.str();
fwrite(responseString.data(), 1, responseString.size(), f);