root.js 700 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // initial state
  2. const state = {
  3. config: {},
  4. settings: {
  5. accessToken: '',
  6. limit: 20,
  7. expanded: [],
  8. expandedSeries: [],
  9. showCounts: true,
  10. showRate: true,
  11. showGenres: true,
  12. showDeleted: false,
  13. abCacheEnabled: true,
  14. langDefault: '',
  15. },
  16. };
  17. // getters
  18. const getters = {};
  19. // actions
  20. const actions = {};
  21. // mutations
  22. const mutations = {
  23. setConfig(state, value) {
  24. state.config = value;
  25. },
  26. setSettings(state, value) {
  27. state.settings = Object.assign({}, state.settings, value);
  28. },
  29. };
  30. export default {
  31. namespaced: true,
  32. state,
  33. getters,
  34. actions,
  35. mutations
  36. };