root.js 818 B

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