root.js 843 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. showJson: false,
  20. },
  21. };
  22. // getters
  23. const getters = {};
  24. // actions
  25. const actions = {};
  26. // mutations
  27. const mutations = {
  28. setConfig(state, value) {
  29. state.config = value;
  30. },
  31. setSettings(state, value) {
  32. state.settings = Object.assign({}, state.settings, value);
  33. },
  34. };
  35. export default {
  36. namespaced: true,
  37. state,
  38. getters,
  39. actions,
  40. mutations
  41. };