Vue: Auth page fixes..

This commit is contained in:
Cüneyt Şentürk 2020-01-03 12:24:54 +03:00
parent 38ad7f7f0a
commit 1c0697b266
3 changed files with 62 additions and 16 deletions

View File

@ -8,25 +8,43 @@ require('./../../bootstrap');
import Vue from 'vue';
import DashboardPlugin from './../../plugins/dashboard-plugin';
import Global from './../../mixins/global';
import Form from './../../plugins/form';
// plugin setup
Vue.use(DashboardPlugin);
const app = new Vue({
el: '#app',
mixins: [
Global
],
data: function () {
return {
form: new Form('forgot')
}
},
mounted() {
this.checkNotify();
},
methods: {
// Check Default set notify > store / update action
checkNotify: function () {
if (!flash_notification) {
return false;
}
flash_notification.forEach(notify => {
let type = notify.level;
this.$notify({
message: notify.message,
timeout: 5000,
icon: 'fas fa-bell',
type
});
});
},
// Form Submit
onSubmit() {
this.form.submit();
},
}
});

View File

@ -17,5 +17,34 @@ const app = new Vue({
return {
form: new Form('login')
}
},
mounted() {
this.checkNotify();
},
methods: {
// Check Default set notify > store / update action
checkNotify: function () {
if (!flash_notification) {
return false;
}
flash_notification.forEach(notify => {
let type = notify.level;
this.$notify({
message: notify.message,
timeout: 5000,
icon: 'fas fa-bell',
type
});
});
},
// Form Submit
onSubmit() {
this.form.submit();
},
}
});

View File

@ -8,13 +8,8 @@ require('./../../bootstrap');
import Vue from 'vue';
import DashboardPlugin from './../../plugins/dashboard-plugin';
import Form from './../../plugins/form';
// plugin setup
Vue.use(DashboardPlugin);
const app = new Vue({
el: '#app',
@ -24,6 +19,10 @@ const app = new Vue({
}
},
mounted() {
this.checkNotify();
},
methods: {
// Check Default set notify > store / update action
checkNotify: function () {