Skip to content

Instantly share code, notes, and snippets.

@acacha
Created April 16, 2018 15:56
Show Gist options
  • Save acacha/159f7d5a7955d91ed410ffd3c1d7a416 to your computer and use it in GitHub Desktop.
Save acacha/159f7d5a7955d91ed410ffd3c1d7a416 to your computer and use it in GitHub Desktop.
// AUTH MODULE
export const LOGIN = 'LOGIN'
export const LOGOUT = 'LOGOUT'
export const REGISTER = 'REGISTER'
export const REMEMBER_PASSWORD = 'REMEMBER_PASSWORD'
export const RESET_PASSWORD = 'RESET_PASSWORD'
// USERS MODULE
export const FETCH_USERS = 'FETCH_USERS'
export const UPDATE_USER = 'UPDATE_USER'
export const SELECTED_USER = 'SELECTED_USER'
import Vue from 'vue'
import Vuex from 'vuex'
import auth from './modules/auth'
import snackbar from './modules/snackbar'
import users from './modules/users'
Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'
export default new Vuex.Store({
modules: {
auth,
snackbar,
users
},
strict: debug
})
// AUTH
export const LOGGED = 'LOGGED'
export const USER = 'USER'
// SNACKBAR
export const SET_SNACKBAR_SHOW = 'SET_SNACKBAR_SHOW'
export const SET_SNACKBAR_COLOR = 'SET_SNACKBAR_COLOR'
export const SET_SNACKBAR_TEXT = 'SET_SNACKBAR_TEXT'
export const SET_SNACKBAR_SUBTEXT = 'SET_SNACKBAR_SUBTEXT'
export const SET_SNACKBAR_TIMEOUT = 'SET_SNACKBAR_TIMEOUT'
// USERS
export const SELECTED_USER = 'SELECTED_USER'
export const SET_USERS = 'SET_USERS'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment