root.js 788 B

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