mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
merging conflicts
This commit is contained in:
commit
f09d2328d3
@ -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",
|
||||
|
||||
@ -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)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
25
frontend/src/vee-validate.js
Normal file
25
frontend/src/vee-validate.js
Normal 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),
|
||||
})
|
||||
@ -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>
|
||||
|
||||
@ -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" >
|
||||
|
||||
@ -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==
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user