mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix add-login-fail-message
This commit is contained in:
parent
44fb453f9c
commit
f685b93c07
@ -40,6 +40,9 @@
|
||||
components: {
|
||||
FadeTransition
|
||||
},
|
||||
created() {
|
||||
console.log("base-alert gesetzt in =>", this.$route.path )
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
@ -64,7 +67,9 @@
|
||||
},
|
||||
methods: {
|
||||
dismissAlert() {
|
||||
console.log("sdddddddddddddddddddddddd")
|
||||
this.visible = false;
|
||||
this.$store.state.loginfail = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -37,7 +37,6 @@ import 'vue-good-table/dist/vue-good-table.css';
|
||||
|
||||
import VueMoment from 'vue-moment';
|
||||
|
||||
import CountryFlag from 'vue-country-flag'
|
||||
|
||||
|
||||
Object.keys(rules).forEach(rule => {
|
||||
@ -59,7 +58,6 @@ export default {
|
||||
Vue.use(VueQrcodeReader);
|
||||
Vue.use(VueQrcode);
|
||||
Vue.use(VueFlatPickr);
|
||||
Vue.use(CountryFlag);
|
||||
configure({
|
||||
classes: {
|
||||
valid: 'is-valid',
|
||||
|
||||
@ -12,6 +12,7 @@ export const store = new Vuex.Store({
|
||||
language: 'en',
|
||||
sizeDE: 'normal',
|
||||
sizeGB: 'big',
|
||||
loginfail: false,
|
||||
user : {
|
||||
name:"",
|
||||
balance: 0,
|
||||
@ -55,6 +56,10 @@ export const store = new Vuex.Store({
|
||||
}
|
||||
|
||||
},
|
||||
loginfail: (state, loginfail) => {
|
||||
//console.log('mutation: email')
|
||||
state.loginfail = loginfail
|
||||
},
|
||||
email: (state, email) => {
|
||||
//console.log('mutation: email')
|
||||
state.email = email
|
||||
@ -88,8 +93,10 @@ export const store = new Vuex.Store({
|
||||
router.push('/overview')
|
||||
} else {
|
||||
// Register failed, we perform a logout
|
||||
// console.log('action login to logout start')
|
||||
dispatch('logout')
|
||||
//alert('>>>>> FAIl LOGIN')
|
||||
commit('loginfail', true)
|
||||
|
||||
//dispatch('logout')
|
||||
}
|
||||
//}, (error) => {
|
||||
//console.log(error);
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
</b-row>
|
||||
</div>
|
||||
</b-container>
|
||||
|
||||
</div>
|
||||
<!-- Page content -->
|
||||
<b-container class="mt--8 pb-5">
|
||||
@ -20,7 +19,6 @@
|
||||
<b-col lg="5" md="7">
|
||||
<b-card no-body class="border-0 mb-0" style="background-color: #ebebeba3 !important;">
|
||||
<b-card-body class="px-lg-5 py-lg-5">
|
||||
|
||||
<div class="text-center text-muted mb-4">
|
||||
<small>{{ $t('login')}}</small>
|
||||
</div>
|
||||
@ -45,6 +43,27 @@
|
||||
v-model="model.password">
|
||||
</base-input>
|
||||
|
||||
|
||||
<b-alert v-show="$store.state.loginfail" show variant="warning" >
|
||||
|
||||
<span class="alert-text bv-example-row">
|
||||
<b-row>
|
||||
<b-col class="col-9 text-left">
|
||||
<strong>Leider konnten wir keinen Account finden mit diesen Daten!</strong>
|
||||
</b-col>
|
||||
<b-col class="text-right" >
|
||||
<a href="#!" @click="closeAlert">
|
||||
<div>
|
||||
|
||||
<b-icon-exclamation-triangle-fill class="h2 mb-0"></b-icon-exclamation-triangle-fill>
|
||||
<b-icon-x class="h1 pl-2"></b-icon-x>
|
||||
</div>
|
||||
</a>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</span>
|
||||
</b-alert>
|
||||
|
||||
<!-- <b-form-checkbox v-model="model.rememberMe">{{ $t('site.login.remember')}}</b-form-checkbox> -->
|
||||
<div class="text-center">
|
||||
<base-button type="secondary" native-type="submit" class="my-4">{{ $t('site.login.signin')}}</base-button>
|
||||
@ -67,6 +86,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "login",
|
||||
data() {
|
||||
@ -81,6 +101,9 @@
|
||||
methods: {
|
||||
onSubmit() {
|
||||
this.$store.dispatch('login', {"email": this.model.email, "password": this.model.password})
|
||||
},
|
||||
closeAlert(){
|
||||
this.$store.state.loginfail = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user