root.js 737 B

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