Add custom flash library that works as expected

This commit is contained in:
Dane Everitt 2018-05-26 14:50:38 -07:00
parent bab20812a0
commit 0a706d1b45
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
13 changed files with 233 additions and 37 deletions

View file

@ -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');