root.js 941 B

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