feat: 2FA UI + modal
This commit is contained in:
@@ -12,6 +12,7 @@ import modalCreateUser from './modules/modal-create-user'
|
||||
import modalDeleteUser from './modules/modal-delete-user'
|
||||
import modalDiscardPage from './modules/modal-discard-page'
|
||||
import modalMovePage from './modules/modal-move-page'
|
||||
import modalProfile2fa from './modules/modal-profile-2fa'
|
||||
import modalUpgradeSystem from './modules/modal-upgrade-system'
|
||||
import pageLoader from './modules/page-loader'
|
||||
|
||||
@@ -41,6 +42,7 @@ export default new Vuex.Store({
|
||||
modalDeleteUser,
|
||||
modalDiscardPage,
|
||||
modalMovePage,
|
||||
modalProfile2fa,
|
||||
modalUpgradeSystem,
|
||||
pageLoader
|
||||
}
|
||||
|
21
client/js/store/modules/modal-profile-2fa.js
Normal file
21
client/js/store/modules/modal-profile-2fa.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
step: 'confirm'
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
stepChange: (state, stepState) => { state.step = stepState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, opts) {
|
||||
commit('shownChange', true)
|
||||
commit('stepChange', 'confirm')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user