root.js 764 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. showRates: true,
  12. showGenres: true,
  13. showDates: false,
  14. showDeleted: false,
  15. abCacheEnabled: true,
  16. langDefault: '',
  17. },
  18. };
  19. // getters
  20. const getters = {};
  21. // actions
  22. const actions = {};
  23. // mutations
  24. const mutations = {
  25. setConfig(state, value) {
  26. state.config = value;
  27. },
  28. setSettings(state, value) {
  29. state.settings = Object.assign({}, state.settings, value);
  30. },
  31. };
  32. export default {
  33. namespaced: true,
  34. state,
  35. getters,
  36. actions,
  37. mutations
  38. };