diff --git a/package.json b/package.json index 45825c2ab..a790e437f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "vue-template-compiler": "^2.5.16", "vueify-insert-css": "^1.0.0", "vuex": "^3.0.1", - "vuex-flash": "^1.0.0", "vuex-i18n": "^1.10.5", "webpack": "^4.4.1", "webpack-stream": "^4.0.3", diff --git a/resources/assets/scripts/app.js b/resources/assets/scripts/app.js index 0c5dd17e1..f53781c09 100644 --- a/resources/assets/scripts/app.js +++ b/resources/assets/scripts/app.js @@ -1,19 +1,19 @@ import Vue from 'vue'; import Vuex from 'vuex'; import vuexI18n from 'vuex-i18n'; -import VuexFlash from 'vuex-flash'; import { createFlashStore } from 'vuex-flash'; import VueRouter from 'vue-router'; // Helpers import { Ziggy } from './helpers/ziggy'; import Locales from './../../../resources/lang/locales'; +import { flash } from './mixins/flash'; // Base Vuejs Templates import Login from './components/auth/Login'; import ResetPassword from './components/auth/ResetPassword'; -// Used for the route() helper. +window.events = new Vue; window.Ziggy = Ziggy; Vue.use(Vuex); @@ -23,10 +23,10 @@ const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default; Vue.config.productionTip = false; Vue.mixin({ methods: { route } }); +Vue.mixin(flash); Vue.use(VueRouter); Vue.use(vuexI18n.plugin, store); -Vue.use(VuexFlash, { mixin: true, template: require('./components/errors/Flash.template') }); Vue.i18n.add('en', Locales.en); Vue.i18n.set('en'); diff --git a/resources/assets/scripts/components/Flash.vue b/resources/assets/scripts/components/Flash.vue new file mode 100644 index 000000000..ac41e4dd9 --- /dev/null +++ b/resources/assets/scripts/components/Flash.vue @@ -0,0 +1,92 @@ + + + diff --git a/resources/assets/scripts/components/auth/ForgotPassword.vue b/resources/assets/scripts/components/auth/ForgotPassword.vue index 97029e1ce..e06fa40b4 100644 --- a/resources/assets/scripts/components/auth/ForgotPassword.vue +++ b/resources/assets/scripts/components/auth/ForgotPassword.vue @@ -1,12 +1,5 @@