root.js 672 B

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