You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
582 B

  1. 'use strict'
  2. export default {
  3. namespaced: true,
  4. state: {
  5. shown: false,
  6. mode: 'upgrade',
  7. step: 'confirm'
  8. },
  9. getters: {},
  10. mutations: {
  11. shownChange: (state, shownState) => { state.shown = shownState },
  12. modeChange: (state, modeState) => { state.mode = modeState },
  13. stepChange: (state, stepState) => { state.step = stepState }
  14. },
  15. actions: {
  16. open({ commit }, opts) {
  17. commit('shownChange', true)
  18. commit('modeChange', opts.mode)
  19. commit('stepChange', 'confirm')
  20. },
  21. close({ commit }) { commit('shownChange', false) }
  22. }
  23. }