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", "qrcode": "^1.4.4",
"quill": "^1.3.6", "quill": "^1.3.6",
"sweetalert2": "^9.5.4", "sweetalert2": "^9.5.4",
"vee-validate": "^3.2.1", "vee-validate": "^3.4.5",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-bootstrap-typeahead": "^0.2.6", "vue-bootstrap-typeahead": "^0.2.6",
"vue-chartjs": "^3.5.0", "vue-chartjs": "^3.5.0",

View File

@ -29,6 +29,7 @@
<script> <script>
import { ParticlesBg } from 'particles-bg-vue' import { ParticlesBg } from 'particles-bg-vue'
import icon from './icon.js' import icon from './icon.js'
import { localeChanged } from 'vee-validate'
export default { export default {
name: 'app', name: 'app',
@ -36,13 +37,17 @@ export default {
ParticlesBg, ParticlesBg,
}, },
created() { 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) { 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('session_id', $cookies.get('gdd_session_id'))
this.$store.commit('email', $cookies.get('gdd_u')) this.$store.commit('email', $cookies.get('gdd_u'))
this.$store.commit('language', $cookies.get('gdd_lang')) this.$store.commit('language', $cookies.get('gdd_lang'))
this.$i18n.locale = $cookies.get('gdd_lang') this.$i18n.locale = $cookies.get('gdd_lang')
this.$router.push('overview') this.$router.push('overview')
} else { } else {
//console.log('app.vue to Logout')
this.$store.dispatch('logout') this.$store.dispatch('logout')
} }
}, },
@ -68,6 +73,7 @@ export default {
setLocale(locale) { setLocale(locale) {
this.$i18n.locale = locale this.$i18n.locale = locale
this.$store.commit('language', this.$i18n.locale) this.$store.commit('language', this.$i18n.locale)
localeChanged(locale)
}, },
}, },
} }

View File

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

View File

@ -88,8 +88,8 @@
"text" : "Page not found. Don't worry though, we have plenty of other pages to explore", "text" : "Page not found. Don't worry though, we have plenty of other pages to explore",
"back" : "Back to dashboard!" "back" : "Back to dashboard!"
} }
}, },
"admin": { "admin": {
"site": { "site": {
"overview": { "overview": {
"creation": "Creation", "creation": "Creation",
@ -98,7 +98,7 @@
"members" : "Members" "members" : "Members"
} }
} }
}, },
"nav": { "nav": {
"features": "Features" "features": "Features"
} }

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import DashboardPlugin from './plugins/dashboard-plugin' import DashboardPlugin from './plugins/dashboard-plugin'
import App from './App.vue' import App from './App.vue'
import i18n from './i18n.js' import i18n from './i18n.js'
import VeeValidate from './vee-validate.js'
import VueCookies from 'vue-cookies' import VueCookies from 'vue-cookies'
// store // 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: { components: {
ContentFooter, 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> </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-row align-v="center" class="justify-content-lg-between">
<b-col> <b-col>
<b-nav class="nav-footer justify-content-center"> <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 Gradido
</b-nav-item> </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') }} {{ $t('imprint') }}
</b-nav-item> </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') }} {{ $t('privacy_policy') }}
</b-nav-item> </b-nav-item>
<!--<b-nav-item href="#!" to="/explorer" > <!--<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" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vee-validate@^3.2.1: vee-validate@^3.4.5:
version "3.4.5" version "3.4.5"
resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-3.4.5.tgz#96a456c309f7bdb2cce62c3b554f96d893e9f6ae" resolved "https://registry.yarnpkg.com/vee-validate/-/vee-validate-3.4.5.tgz#96a456c309f7bdb2cce62c3b554f96d893e9f6ae"
integrity sha512-ZEcLqOAZzSkMhDvPcTx0xcwVOijFnMW9J+BA20j+rDmo24T8RCCqVQyRwwrDrcWJZV2dRYl/yYNa2GB6UCoBvg== integrity sha512-ZEcLqOAZzSkMhDvPcTx0xcwVOijFnMW9J+BA20j+rDmo24T8RCCqVQyRwwrDrcWJZV2dRYl/yYNa2GB6UCoBvg==

View File

@ -227,7 +227,13 @@ int SigningTransaction::run() {
//printf("[JsonRequestHandler::handleRequest] Exception: %s\n", ex.displayText().data()); //printf("[JsonRequestHandler::handleRequest] Exception: %s\n", ex.displayText().data());
addError(new ParamError("SigningTransaction", "error parsing request answer", 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) { if (f) {
std::string responseString = responseStringStream.str(); std::string responseString = responseStringStream.str();
fwrite(responseString.data(), 1, responseString.size(), f); fwrite(responseString.data(), 1, responseString.size(), f);